]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.3.4/alsa-hda-conexant-don-t-set-hp-pin-control-bit.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.3.4 / alsa-hda-conexant-don-t-set-hp-pin-control-bit.patch
1 From ca3649de026ff95c6f2847e8d096cf2f411c02b3 Mon Sep 17 00:00:00 2001
2 From: Takashi Iwai <tiwai@suse.de>
3 Date: Thu, 19 Apr 2012 15:15:25 +0200
4 Subject: ALSA: hda/conexant - Don't set HP pin-control bit unconditionally
5
6 From: Takashi Iwai <tiwai@suse.de>
7
8 commit ca3649de026ff95c6f2847e8d096cf2f411c02b3 upstream.
9
10 Some output pins on Conexant chips have no HP control bit, but the
11 auto-parser initializes these pins unconditionally with PIN_HP.
12
13 Check the pin-capability and avoid the HP bit if not supported.
14
15 Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17
18 ---
19 sound/pci/hda/patch_conexant.c | 9 +++++++--
20 1 file changed, 7 insertions(+), 2 deletions(-)
21
22 --- a/sound/pci/hda/patch_conexant.c
23 +++ b/sound/pci/hda/patch_conexant.c
24 @@ -3951,9 +3951,14 @@ static void cx_auto_init_output(struct h
25 int i;
26
27 mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids);
28 - for (i = 0; i < cfg->hp_outs; i++)
29 + for (i = 0; i < cfg->hp_outs; i++) {
30 + unsigned int val = PIN_OUT;
31 + if (snd_hda_query_pin_caps(codec, cfg->hp_pins[i]) &
32 + AC_PINCAP_HP_DRV)
33 + val |= AC_PINCTL_HP_EN;
34 snd_hda_codec_write(codec, cfg->hp_pins[i], 0,
35 - AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP);
36 + AC_VERB_SET_PIN_WIDGET_CONTROL, val);
37 + }
38 mute_outputs(codec, cfg->hp_outs, cfg->hp_pins);
39 mute_outputs(codec, cfg->line_outs, cfg->line_out_pins);
40 mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins);