Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Kernel Team (http://www.linux-archive.org/ubuntu-kernel-team/)
-   -   ALSA: hda/via - don't report presence on HPs with no presence support (http://www.linux-archive.org/ubuntu-kernel-team/707531-alsa-hda-via-dont-report-presence-hps-no-presence-support.html)

Herton Ronaldo Krzesinski 09-26-2012 01:25 PM

ALSA: hda/via - don't report presence on HPs with no presence support
 
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>
(cherry-picked from commit cf55e904516947597d75fd3844acc24891a95772 at
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git)
---
sound/pci/hda/patch_via.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

The patch was marked for 3.6 stable, but we are affected on Quantal since
we picked commit 80c8bfbe76869bfd6bdf3d260d316e7a32f318c3

diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 74fb6fd..5a45a91 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -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)
--
1.7.9.5


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team


All times are GMT. The time now is 08:35 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.