Skip to content

Commit

Permalink
ALSA: hda - Do not set GPIOs for speakers on IDT if there are no spea…
Browse files Browse the repository at this point in the history
…kers

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>
  • Loading branch information
David Henningsson authored and Takashi Iwai committed Aug 22, 2012
1 parent 53e1719 commit 042b92c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 042b92c

Please sign in to comment.