]> git.hungrycats.org Git - linux/commitdiff
[PATCH] [ALSA] Special AC97 patch for ASUS W1000/CMI9739 laptop
authorTakashi Iwai <tiwai@suse.de>
Wed, 9 Feb 2005 23:33:52 +0000 (15:33 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 9 Feb 2005 23:33:52 +0000 (15:33 -0800)
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 <James@superbug.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sound/pci/ac97/ac97_patch.c

index 6031db827a4de4b85cc513df9571b2a5715441bc..04f7a4f598141a5c95bf9abbfe3851d6a8e4a779 100644 (file)
@@ -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;
 }