EMU10K1 joystick bug
PATCH 1/1 EMU10K1 joystick bug
The EMU10K1 driver currently disables the joystick port on module load and unload. This patch preserves the HCFG_JOYENABLE bit when the HCFG register is modified.
Signature · 1 line
Brian Gerst
drivers/sound/emu10k1/main.c +6 -3
@@ -363,10 +363,11 @@static int __devinit hw_init (struct emu10k1_card *card) {int nCh; -u32 pagecount;/* tmp */ +u32 pagecount, tmp;/* Disable audio and lock cache */ -emu10k1_writefn0 (card,HCFG ,HCFG_LOCKSOUNDCACHE |HCFG_LOCKTANKCACHE_MASK |HCFG_MUTEBUTTONENABLE ); + tmp =emu10k1_readfn0 (card,HCFG ) &HCFG_JOYENABLE ; +emu10k1_writefn0 (card,HCFG , tmp |HCFG_LOCKSOUNDCACHE |HCFG_LOCKTANKCACHE_MASK |HCFG_MUTEBUTTONENABLE );/* Reset recording buffers */ sblive_writeptr_tag(card, 0,
@@ -557,6 +558,7 @@static void __devinit emu10k1_exit (struct emu10k1_card *card) {int ch; +u32 tmp;emu10k1_writefn0 (card,INTE ,0 );
@@ -574,7 +576,8 @@ }/* Disable audio and lock cache */ -emu10k1_writefn0 (card,HCFG ,HCFG_LOCKSOUNDCACHE |HCFG_LOCKTANKCACHE_MASK |HCFG_MUTEBUTTONENABLE ); + tmp =emu10k1_readfn0 (card,HCFG ) &HCFG_JOYENABLE ; +emu10k1_writefn0 (card,HCFG , tmp |HCFG_LOCKSOUNDCACHE |HCFG_LOCKTANKCACHE_MASK |HCFG_MUTEBUTTONENABLE ); sblive_writeptr_tag(card, 0, PTB, 0,