[ALSA] Fix EAPD for MSI S270
authorTakashi Iwai <tiwai@suse.de>
Wed, 31 Aug 2005 15:31:07 +0000 (17:31 +0200)
committerJaroslav Kysela <perex@suse.cz>
Mon, 12 Sep 2005 08:35:10 +0000 (10:35 +0200)
AC97 Codec
Fix pin47 setting for EAPD control on MSI S270 laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ac97/ac97_patch.c

index b584172c1104d55c470a9f810ee0eb9e14f79f49..0acf51dd44786db53c7d671b5634537c8b95953a 100644 (file)
@@ -2145,8 +2145,13 @@ int patch_alc655(ac97_t * ac97)
        val = snd_ac97_read(ac97, 0x7a); /* misc control */
        if (ac97->id == 0x414c4780) /* ALC658 */
                val &= ~(1 << 1); /* Pin 47 is spdif input pin */
-       else /* ALC655 */
-               val |= (1 << 1); /* Pin 47 is spdif input pin */
+       else { /* ALC655 */
+               if (ac97->subsystem_vendor == 0x1462 &&
+                   ac97->subsystem_device == 0x0131) /* MSI S270 laptop */
+                       val &= ~(1 << 1); /* Pin 47 is EAPD (for internal speaker) */
+               else
+                       val |= (1 << 1); /* Pin 47 is spdif input pin */
+       }
        val &= ~(1 << 12); /* vref enable */
        snd_ac97_write_cache(ac97, 0x7a, val);
        /* set default: spdif-in enabled,