Patch for ymfpci in 2.4.4
Hello:
Here are updates from ALSA. The interrupt acknowledge has a potential bug report for it in RH bugzilla. Power-up fix I include "just because", Alan bounced it to me from sound-hackers; Also Jeff Garzik asked for it. I wanted to include it with full PM support, but perhaps not.
-- Pete
drivers/sound/ymfpci.c +7 -5
@@ -989,11 +989,6 @@ status =ymfpci_readl (codec,YDSXGR_STATUS );if (status &0x80000000 ) { -spin_lock (&codec->reg_lock); -ymfpci_writel (codec,YDSXGR_STATUS ,0x80000000 ); - mode =ymfpci_readl (codec,YDSXGR_MODE ) |2 ; -ymfpci_writel (codec,YDSXGR_MODE , mode); -spin_unlock (&codec->reg_lock); codec->active_bank =ymfpci_readl (codec,YDSXGR_CTRLSELECT ) &1 ;spin_lock (&codec->voice_lock);for (nvoice =0 ; nvoice <64 ; nvoice++) {
@@ -1007,6 +1002,11 @@ymf_cap_interrupt (codec, cap); }spin_unlock (&codec->voice_lock); +spin_lock (&codec->reg_lock); +ymfpci_writel (codec,YDSXGR_STATUS ,0x80000000 ); + mode =ymfpci_readl (codec,YDSXGR_MODE ) |2 ; +ymfpci_writel (codec,YDSXGR_MODE , mode); +spin_unlock (&codec->reg_lock); } status =ymfpci_readl (codec,YDSXGR_INTFLAG );
@@ -2106,6 +2106,8 @@pci_write_config_byte (pci,PCIR_DSXGCTRL , cmd |0x03 );pci_write_config_byte (pci,PCIR_DSXGCTRL , cmd &0xfc ); } +pci_write_config_word (pci,PCIR_DSXPWRCTRL1 ,0 ); +pci_write_config_word (pci,PCIR_DSXPWRCTRL2 ,0 ); }static void ymfpci_enable_dsp (ymfpci_t *codec)
Due to a pilot error, my ymfpci update would not compile (forgot to submit .h change). Here is the missing part:
drivers/sound/ymfpci.h +2 -0
@@ -135,6 +135,8 @@#define PCIR_LEGCTRL 0x40#define PCIR_ELEGCTRL 0x42#define PCIR_DSXGCTRL 0x48 +#define PCIR_DSXPWRCTRL1 0x4a +#define PCIR_DSXPWRCTRL2 0x4e#define PCIR_OPLADR 0x60#define PCIR_SBADR 0x62#define PCIR_MPUADR 0x64
Original part:
drivers/sound/ymfpci.c +7 -5
@@ -989,11 +989,6 @@ status =ymfpci_readl (codec,YDSXGR_STATUS );if (status &0x80000000 ) { -spin_lock (&codec->reg_lock); -ymfpci_writel (codec,YDSXGR_STATUS ,0x80000000 ); - mode =ymfpci_readl (codec,YDSXGR_MODE ) |2 ; -ymfpci_writel (codec,YDSXGR_MODE , mode); -spin_unlock (&codec->reg_lock); codec->active_bank =ymfpci_readl (codec,YDSXGR_CTRLSELECT ) &1 ;spin_lock (&codec->voice_lock);for (nvoice =0 ; nvoice <64 ; nvoice++) {
@@ -1007,6 +1002,11 @@ymf_cap_interrupt (codec, cap); }spin_unlock (&codec->voice_lock); +spin_lock (&codec->reg_lock); +ymfpci_writel (codec,YDSXGR_STATUS ,0x80000000 ); + mode =ymfpci_readl (codec,YDSXGR_MODE ) |2 ; +ymfpci_writel (codec,YDSXGR_MODE , mode); +spin_unlock (&codec->reg_lock); } status =ymfpci_readl (codec,YDSXGR_INTFLAG );
@@ -2106,6 +2106,8 @@pci_write_config_byte (pci,PCIR_DSXGCTRL , cmd |0x03 );pci_write_config_byte (pci,PCIR_DSXGCTRL , cmd &0xfc ); } +pci_write_config_word (pci,PCIR_DSXPWRCTRL1 ,0 ); +pci_write_config_word (pci,PCIR_DSXPWRCTRL2 ,0 ); }static void ymfpci_enable_dsp (ymfpci_t *codec)
Sorry,
-- Pete