]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.6.2/alsa-hda-via-don-t-report-presence-on-hps-with-no-presence-support.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.6.2 / alsa-hda-via-don-t-report-presence-on-hps-with-no-presence-support.patch
1 From cf55e904516947597d75fd3844acc24891a95772 Mon Sep 17 00:00:00 2001
2 From: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
3 Date: Fri, 21 Sep 2012 20:45:19 -0300
4 Subject: ALSA: hda/via - don't report presence on HPs with no presence support
5
6 From: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
7
8 commit cf55e904516947597d75fd3844acc24891a95772 upstream.
9
10 If headphone jack can't detect plug presence, and we have the jack in
11 the jack table, snd_hda_jack_detect will return the plug as always
12 present (as it'll be considered as a phantom jack). The problem is that
13 when this happens, line out pins will always be disabled, resulting in
14 no sound if there are no headphones connected.
15
16 This was reported as a no sound problem after suspend on
17 http://bugs.launchpad.net/bugs/1052499, since the bug doesn't manifests
18 on first initialization before the phantom jack is added, but on resume
19 we reexecute the initialization code, and via_hp_automute starts
20 reporting HP always present with the jack now on the table.
21
22 BugLink: https://bugs.launchpad.net/bugs/1052499
23 Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
24 Signed-off-by: Takashi Iwai <tiwai@suse.de>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26
27 ---
28 sound/pci/hda/patch_via.c | 3 ++-
29 1 file changed, 2 insertions(+), 1 deletion(-)
30
31 --- a/sound/pci/hda/patch_via.c
32 +++ b/sound/pci/hda/patch_via.c
33 @@ -1672,7 +1672,8 @@ static void via_hp_automute(struct hda_c
34 struct via_spec *spec = codec->spec;
35
36 if (!spec->hp_independent_mode && spec->autocfg.hp_pins[0] &&
37 - (spec->codec_type != VT1708 || spec->vt1708_jack_detect))
38 + (spec->codec_type != VT1708 || spec->vt1708_jack_detect) &&
39 + is_jack_detectable(codec, spec->autocfg.hp_pins[0]))
40 present = snd_hda_jack_detect(codec, spec->autocfg.hp_pins[0]);
41
42 if (spec->smart51_enabled)