ALSA: hda - Fix codec muted after rebooting from Windows
authorCharles <charles@Test-PC.(none)>
Mon, 18 Oct 2010 08:22:00 +0000 (16:22 +0800)
committerTakashi Iwai <tiwai@suse.de>
Tue, 19 Oct 2010 09:14:44 +0000 (11:14 +0200)
Windows may leave pin power-down registers set after reboot, and
this resulted in muted output on Linux.  Reset these registers
at initialization properly.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_sigmatel.c

index 1a563a2fbbec9467ee9069e97b8692d41dfe5196..7d70f8ca37427956c715e555b795084f219b5a49 100644 (file)
@@ -5334,6 +5334,9 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
        if (spec == NULL)
                return -ENOMEM;
 
+       /* reset pin power-down; Windows may leave these bits after reboot */
+       snd_hda_codec_write_cache(codec, codec->afg, 0, 0x7EC, 0);
+       snd_hda_codec_write_cache(codec, codec->afg, 0, 0x7ED, 0);
        codec->no_trigger_sense = 1;
        codec->spec = spec;
        spec->linear_tone_beep = 1;