diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-01-23 12:23:36 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-01-23 12:23:36 -0500 |
commit | b4ead019afc201f71c39cd0dfcaafed4a97b3dd2 (patch) | |
tree | 0fcef082871284b1976a782752b3ba718328ea18 | |
parent | 29c5fbbcfefba5225a6783683c46c39e10877703 (diff) |
ALSA: hda - Fix silent outputs from docking-station jacks of Dell laptops
The recent change of the power-widget handling for IDT codecs caused
the silent output from the docking-station line-out jack. This was
partially fixed by the commit f2cbba7602383cd9cdd21f0a5d0b8bd1aad47b33
"ALSA: hda - Fix the lost power-setup of seconary pins after PM resume".
But the line-out on the docking-station is still silent when booted
with the jack plugged even by this fix.
The remainig bug is that the power-widget is set off in stac92xx_init()
because the pins in cfg->line_out_pins[] aren't checked there properly
but only hp_pins[] are checked in is_nid_hp_pin().
This patch fixes the problem by checking both HP and line-out pins
and leaving the power-map correctly.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42637
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 1a26dbca9483..336cfcd324f9 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -4163,13 +4163,15 @@ static int enable_pin_detect(struct hda_codec *codec, hda_nid_t nid, | |||
4163 | return 1; | 4163 | return 1; |
4164 | } | 4164 | } |
4165 | 4165 | ||
4166 | static int is_nid_hp_pin(struct auto_pin_cfg *cfg, hda_nid_t nid) | 4166 | static int is_nid_out_jack_pin(struct auto_pin_cfg *cfg, hda_nid_t nid) |
4167 | { | 4167 | { |
4168 | int i; | 4168 | int i; |
4169 | for (i = 0; i < cfg->hp_outs; i++) | 4169 | for (i = 0; i < cfg->hp_outs; i++) |
4170 | if (cfg->hp_pins[i] == nid) | 4170 | if (cfg->hp_pins[i] == nid) |
4171 | return 1; /* nid is a HP-Out */ | 4171 | return 1; /* nid is a HP-Out */ |
4172 | 4172 | for (i = 0; i < cfg->line_outs; i++) | |
4173 | if (cfg->line_out_pins[i] == nid) | ||
4174 | return 1; /* nid is a line-Out */ | ||
4173 | return 0; /* nid is not a HP-Out */ | 4175 | return 0; /* nid is not a HP-Out */ |
4174 | }; | 4176 | }; |
4175 | 4177 | ||
@@ -4375,7 +4377,7 @@ static int stac92xx_init(struct hda_codec *codec) | |||
4375 | continue; | 4377 | continue; |
4376 | } | 4378 | } |
4377 | 4379 | ||
4378 | if (is_nid_hp_pin(cfg, nid)) | 4380 | if (is_nid_out_jack_pin(cfg, nid)) |
4379 | continue; /* already has an unsol event */ | 4381 | continue; /* already has an unsol event */ |
4380 | 4382 | ||
4381 | pinctl = snd_hda_codec_read(codec, nid, 0, | 4383 | pinctl = snd_hda_codec_read(codec, nid, 0, |