diff -ruN linux.orig/Documentation/Configure.help linux/Documentation/Configure.help --- linux.orig/Documentation/Configure.help Mon Oct 9 23:10:46 2000 +++ linux/Documentation/Configure.help Wed Oct 11 10:20:55 2000 @@ -9695,6 +9695,9 @@ board_id, etc) Normally used by program "debug". Usually built as a module. +SongSkip Using Button +CONFIG_NWBUTTON_SKIPSONG + Sound card support CONFIG_SOUND If you have a sound card in your computer, i.e. if it can say more diff -ruN linux.orig/arch/arm/def-configs/netwinder linux/arch/arm/def-configs/netwinder --- linux.orig/arch/arm/def-configs/netwinder Fri Jun 9 16:09:32 2000 +++ linux/arch/arm/def-configs/netwinder Wed Oct 11 10:20:55 2000 @@ -189,7 +189,8 @@ CONFIG_977_WATCHDOG=y CONFIG_DS1620=y CONFIG_NWBUTTON=y -CONFIG_NWBUTTON_REBOOT=y +CONFIG_NWBUTTON_REBOOT=n +CONFIG_NWBUTTON_SKIPSONG=y CONFIG_NWFLASH=m CONFIG_NWLED=y # CONFIG_21285_FLASH is not set diff -ruN linux.orig/arch/arm/defconfig linux/arch/arm/defconfig --- linux.orig/arch/arm/defconfig Sat Jan 29 06:57:34 2000 +++ linux/arch/arm/defconfig Wed Oct 11 10:20:55 2000 @@ -195,7 +195,8 @@ CONFIG_977_WATCHDOG=m CONFIG_DS1620=y CONFIG_NWBUTTON=y -CONFIG_NWBUTTON_REBOOT=y +CONFIG_NWBUTTON_REBOOT=n +CONFIG_NWBUTTON_SKIPSONG=y CONFIG_NWFLASH=m # CONFIG_NWDEBUG is not set CONFIG_21285_FLASH=m diff -ruN linux.orig/drivers/char/Config.in linux/drivers/char/Config.in --- linux.orig/drivers/char/Config.in Thu Jun 8 10:59:54 2000 +++ linux/drivers/char/Config.in Wed Oct 11 10:20:55 2000 @@ -137,6 +137,9 @@ if [ "$CONFIG_NWBUTTON" != "n" ]; then bool ' Reboot Using Button' CONFIG_NWBUTTON_REBOOT fi + if [ "$CONFIG_NWBUTTON" != "n" ]; then + bool ' Skip Song Using Button' CONFIG_NWBUTTON_SKIPSONG + fi tristate 'NetWinder flash support' CONFIG_NWFLASH tristate 'NetWinder LED driver' CONFIG_NWLED fi diff -ruN linux.orig/drivers/char/nwbutton.c linux/drivers/char/nwbutton.c --- linux.orig/drivers/char/nwbutton.c Wed Apr 28 16:11:06 1999 +++ linux/drivers/char/nwbutton.c Wed Oct 11 10:20:55 2000 @@ -30,6 +30,9 @@ static int callback_count = 0; /* The number of callbacks registered */ static int reboot_count = NUM_PRESSES_REBOOT; /* Number of presses to reboot */ +// static char MP3PROG[16] = "xaudio"; /* MP3PROG to kill for skips. */ +static char *MP3PROG = "xaudio"; /* MP3PROG to kill for skips. */ + /* * This function is called by other drivers to register a callback function * to be called when a particular number of button presses occurs. @@ -126,6 +129,17 @@ kill_proc (1, SIGINT, 1); /* Ask init to reboot us */ } #endif /* CONFIG_NWBUTTON_REBOOT */ +#ifdef CONFIG_NWBUTTON_SKIPSONG /* Skipping song is enabled */ + if (button_press_count == 1) { + struct task_struct *p; + for_each_task(p) { + if (!strcmp(p->comm, MP3PROG)) { + /* Tell MP3PROG to die off */ + kill_proc (p->pid, SIGTERM, 1); + } + } + } +#endif /* CONFIG_NWBUTTON_SKIPSONG */ button_consume_callbacks (button_press_count); bcount = sprintf (button_output_buffer, "%d\n", button_press_count); button_press_count = 0; /* Reset the button press counter */