diff options
author | David Henningsson <david.henningsson@canonical.com> | 2012-08-22 16:10:43 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-08-22 16:26:05 +0200 |
commit | 042b92c185cbd7b4291710255510ae76b2d7797b (patch) | |
tree | cdd85f240c81b9579980075cfb6ce25c28352fdd /sound | |
parent | ALSA: snd-als100: fix suspend/resume (diff) | |
download | linux-042b92c185cbd7b4291710255510ae76b2d7797b.tar.xz linux-042b92c185cbd7b4291710255510ae76b2d7797b.zip |
ALSA: hda - Do not set GPIOs for speakers on IDT if there are no speakers
This fixes an issue with a machine where there were no speakers,
but GPIO0 had to be data=1 for the headphone to be functioning.
I'm not sure if we need a more advanced patch to solve all possible cases,
but if so, this patch would still provide a minor optimisation.
BugLink: https://bugs.launchpad.net/bugs/1040077
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index ea5775a1a7db..3edd73c3d361 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4543,6 +4543,9 @@ static void stac92xx_line_out_detect(struct hda_codec *codec, struct auto_pin_cfg *cfg = &spec->autocfg; int i; + if (cfg->speaker_outs == 0) + return; + for (i = 0; i < cfg->line_outs; i++) { if (presence) break; |