Skip to content

Commit

Permalink
ALSA: hda/via - don't report presence on HPs with no presence support
Browse files Browse the repository at this point in the history
If headphone jack can't detect plug presence, and we have the jack in
the jack table, snd_hda_jack_detect will return the plug as always
present (as it'll be considered as a phantom jack). The problem is that
when this happens, line out pins will always be disabled, resulting in
no sound if there are no headphones connected.

This was reported as a no sound problem after suspend on
http://bugs.launchpad.net/bugs/1052499, since the bug doesn't manifests
on first initialization before the phantom jack is added, but on resume
we reexecute the initialization code, and via_hp_automute starts
reporting HP always present with the jack now on the table.

BugLink: https://bugs.launchpad.net/bugs/1052499
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Cc: <stable@vger.kernel.org> [v3.6+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Herton Ronaldo Krzesinski authored and Takashi Iwai committed Sep 22, 2012
1 parent 148728f commit cf55e90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,8 @@ static void via_hp_automute(struct hda_codec *codec)
struct via_spec *spec = codec->spec;

if (!spec->hp_independent_mode && spec->autocfg.hp_pins[0] &&
(spec->codec_type != VT1708 || spec->vt1708_jack_detect))
(spec->codec_type != VT1708 || spec->vt1708_jack_detect) &&
is_jack_detectable(codec, spec->autocfg.hp_pins[0]))
present = snd_hda_jack_detect(codec, spec->autocfg.hp_pins[0]);

if (spec->smart51_enabled)
Expand Down

0 comments on commit cf55e90

Please sign in to comment.