From 6714d105a0c697f411996b5c67975b3703fb88f7 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 9 Feb 2005 15:33:52 -0800 Subject: [PATCH] [PATCH] [ALSA] Special AC97 patch for ASUS W1000/CMI9739 laptop This patch fixes sound output on the ASUS W1000 laptop with the CMI9739 chip. It wrongly reports that it has a SPDIF in, when in fact we wish to use the EAPD pin. Signed-off-by: James Courtier-Dutton Signed-off-by: Takashi Iwai Signed-off-by: Linus Torvalds --- sound/pci/ac97/ac97_patch.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 6031db827a4d..04f7a4f59814 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c @@ -1903,6 +1903,15 @@ int patch_cm9739(ac97_t * ac97) /* FIXME: set up GPIO */ snd_ac97_write_cache(ac97, 0x70, 0x0100); snd_ac97_write_cache(ac97, 0x72, 0x0020); + /* Special exception for ASUS W1000/CMI9739. It does not have an SPDIF in. */ + if (ac97->pci && + ac97->subsystem_vendor == 0x1043 && + ac97->subsystem_device == 0x1843) { + snd_ac97_write_cache(ac97, AC97_CM9739_SPDIF_CTRL, + snd_ac97_read(ac97, AC97_CM9739_SPDIF_CTRL) & ~0x01); + snd_ac97_write_cache(ac97, AC97_CM9739_MULTI_CHAN, + snd_ac97_read(ac97, AC97_CM9739_MULTI_CHAN) | (1 << 14)); + } return 0; } -- 2.39.5