]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.27/0029-ALSA-hda-Fix-invalid-D3-of-headphone-DAC-on-VT202x-c.patch
linux-ti33x-psp 3.2: update to 3.2.28 and add motorcape support
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / 3.2.27 / 0029-ALSA-hda-Fix-invalid-D3-of-headphone-DAC-on-VT202x-c.patch
1 From 82ed7ed6d4c89cbcaa138eb1fd0075357e8c06d3 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: [PATCH 29/70] ALSA: hda - Fix invalid D3 of headphone DAC on VT202x
5  codecs
7 commit 6162552b0de6ba80937c3dd53e084967851cd199 upstream.
9 We've got a bug report about the silent output from the headphone on a
10 mobo with VT2021, and spotted out that this was because of the wrong
11 D3 state on the DAC for the headphone output.  The bug is triggered by
12 the incomplete check for this DAC in set_widgets_power_state_vt1718S().
13 It checks only the connectivity of the primary output (0x27) but
14 doesn't consider the path from the headphone pin (0x28).
16 Now this patch fixes the problem by checking both pins for DAC 0x0b.
18 Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 [bwh: Backported to 3.2: keep using snd_hda_codec_write() as
20  update_power_state() is missing]
21 Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22 ---
23  sound/pci/hda/patch_via.c |    7 +++++--
24  1 files changed, 5 insertions(+), 2 deletions(-)
26 diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
27 index 1fe1308..7160ff2 100644
28 --- a/sound/pci/hda/patch_via.c
29 +++ b/sound/pci/hda/patch_via.c
30 @@ -3227,7 +3227,7 @@ static void set_widgets_power_state_vt1718S(struct hda_codec *codec)
31  {
32         struct via_spec *spec = codec->spec;
33         int imux_is_smixer;
34 -       unsigned int parm;
35 +       unsigned int parm, parm2;
36         /* MUX6 (1eh) = stereo mixer */
37         imux_is_smixer =
38         snd_hda_codec_read(codec, 0x1e, 0, AC_VERB_GET_CONNECT_SEL, 0x00) == 5;
39 @@ -3250,7 +3250,7 @@ static void set_widgets_power_state_vt1718S(struct hda_codec *codec)
40         parm = AC_PWRST_D3;
41         set_pin_power_state(codec, 0x27, &parm);
42         snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_POWER_STATE, parm);
43 -       snd_hda_codec_write(codec, 0xb, 0, AC_VERB_SET_POWER_STATE, parm);
44 +       parm2 = parm; /* for pin 0x0b */
45  
46         /* PW2 (26h), AOW2 (ah) */
47         parm = AC_PWRST_D3;
48 @@ -3265,6 +3265,9 @@ static void set_widgets_power_state_vt1718S(struct hda_codec *codec)
49         if (!spec->hp_independent_mode) /* check for redirected HP */
50                 set_pin_power_state(codec, 0x28, &parm);
51         snd_hda_codec_write(codec, 0x8, 0, AC_VERB_SET_POWER_STATE, parm);
52 +       if (!spec->hp_independent_mode && parm2 != AC_PWRST_D3)
53 +               parm = parm2;
54 +       snd_hda_codec_write(codec, 0xb, 0, AC_VERB_SET_POWER_STATE, parm);
55         /* MW9 (21h), Mw2 (1ah), AOW0 (8h) */
56         snd_hda_codec_write(codec, 0x21, 0, AC_VERB_SET_POWER_STATE,
57                             imux_is_smixer ? AC_PWRST_D0 : parm);
58 -- 
59 1.7.7.6