]>
Commit | Line | Data |
---|---|---|
aabc756e GKH |
1 | From 6162552b0de6ba80937c3dd53e084967851cd199 Mon Sep 17 00:00:00 2001 |
2 | From: Takashi Iwai <tiwai@suse.de> | |
3 | Date: Wed, 25 Jul 2012 13:54:55 +0200 | |
4 | Subject: ALSA: hda - Fix invalid D3 of headphone DAC on VT202x codecs | |
5 | ||
6 | From: Takashi Iwai <tiwai@suse.de> | |
7 | ||
8 | commit 6162552b0de6ba80937c3dd53e084967851cd199 upstream. | |
9 | ||
10 | We've got a bug report about the silent output from the headphone on a | |
11 | mobo with VT2021, and spotted out that this was because of the wrong | |
12 | D3 state on the DAC for the headphone output. The bug is triggered by | |
13 | the incomplete check for this DAC in set_widgets_power_state_vt1718S(). | |
14 | It checks only the connectivity of the primary output (0x27) but | |
15 | doesn't consider the path from the headphone pin (0x28). | |
16 | ||
17 | Now this patch fixes the problem by checking both pins for DAC 0x0b. | |
18 | ||
19 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
21 | ||
22 | --- | |
23 | sound/pci/hda/patch_via.c | 7 +++++-- | |
24 | 1 file changed, 5 insertions(+), 2 deletions(-) | |
25 | ||
26 | --- a/sound/pci/hda/patch_via.c | |
27 | +++ b/sound/pci/hda/patch_via.c | |
28 | @@ -3226,7 +3226,7 @@ static void set_widgets_power_state_vt17 | |
29 | { | |
30 | struct via_spec *spec = codec->spec; | |
31 | int imux_is_smixer; | |
32 | - unsigned int parm; | |
33 | + unsigned int parm, parm2; | |
34 | /* MUX6 (1eh) = stereo mixer */ | |
35 | imux_is_smixer = | |
36 | snd_hda_codec_read(codec, 0x1e, 0, AC_VERB_GET_CONNECT_SEL, 0x00) == 5; | |
37 | @@ -3249,7 +3249,7 @@ static void set_widgets_power_state_vt17 | |
38 | parm = AC_PWRST_D3; | |
39 | set_pin_power_state(codec, 0x27, &parm); | |
40 | update_power_state(codec, 0x1a, parm); | |
41 | - update_power_state(codec, 0xb, parm); | |
42 | + parm2 = parm; /* for pin 0x0b */ | |
43 | ||
44 | /* PW2 (26h), AOW2 (ah) */ | |
45 | parm = AC_PWRST_D3; | |
46 | @@ -3264,6 +3264,9 @@ static void set_widgets_power_state_vt17 | |
47 | if (!spec->hp_independent_mode) /* check for redirected HP */ | |
48 | set_pin_power_state(codec, 0x28, &parm); | |
49 | update_power_state(codec, 0x8, parm); | |
50 | + if (!spec->hp_independent_mode && parm2 != AC_PWRST_D3) | |
51 | + parm = parm2; | |
52 | + update_power_state(codec, 0xb, parm); | |
53 | /* MW9 (21h), Mw2 (1ah), AOW0 (8h) */ | |
54 | update_power_state(codec, 0x21, imux_is_smixer ? AC_PWRST_D0 : parm); | |
55 |