Index: apps/playback.c =================================================================== RCS file: /cvsroot/rockbox/apps/playback.c,v retrieving revision 1.219 diff -u -r1.219 playback.c --- apps/playback.c 23 Mar 2006 17:11:00 -0000 1.219 +++ apps/playback.c 23 Mar 2006 18:59:08 -0000 @@ -1786,8 +1786,10 @@ /* At first initialize audio system in background. */ playback_init(); + int gpio_f; + while (1) { - if (!play_pending && queue_empty(&audio_queue)) + if (!play_pending && queue_empty(&audio_queue)) { yield_codecs(); audio_check_buffer(); @@ -1804,7 +1806,18 @@ ev.id = Q_AUDIO_PLAY; ev.data = (bool *)1; } - + +#if CONFIG_CPU == PP5020 + /* Stop on iPod's earphone plugged off */ + + gpio_f = GPIOF_INPUT_VAL; /* Why does this happen on both GPIO A & F? */ + if (gpio_f < 30) /* Quickhack Fixme! */ + { + ev.id = Q_AUDIO_PAUSE; /* Why does this NOT work properly? */ + ev.data = (bool *)1; + } +#endif + switch (ev.id) { case Q_AUDIO_PLAY: /* Don't start playing immediately if user is skipping tracks