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 24 Mar 2006 14:03:53 -0000 @@ -1782,6 +1796,9 @@ struct event ev; int last_tick = 0; bool play_pending = false; +#if CONFIG_CPU == PP5020 + unsigned int gpio_a; +#endif /* At first initialize audio system in background. */ playback_init(); @@ -1804,6 +1821,18 @@ ev.id = Q_AUDIO_PLAY; ev.data = (bool *)1; } + +#if CONFIG_CPU == PP5020 + if (!paused) //do not do the check while paused, because of CPU usage + { + gpio_a = GPIOA_INPUT_VAL; // read the GPIO A + if (gpio_a < 128) // check if the 2^7 bit is set? + { + ev.id = Q_AUDIO_PAUSE; // if so, initiate a pause. + ev.data = (bool *)1; + } + } +#endif switch (ev.id) { case Q_AUDIO_PLAY: