mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 01:36:52 +09:00
ALSA: hda - Fix silent outputs from docking-station jacks of Dell laptops
commitb4ead019afupstream. 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 commitf2cbba7602"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 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
235eae6e5e
commit
a3c9ccb3e1
@@ -4162,13 +4162,15 @@ static int enable_pin_detect(struct hda_codec *codec, hda_nid_t nid,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int is_nid_hp_pin(struct auto_pin_cfg *cfg, hda_nid_t nid)
|
||||
static int is_nid_out_jack_pin(struct auto_pin_cfg *cfg, hda_nid_t nid)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < cfg->hp_outs; i++)
|
||||
if (cfg->hp_pins[i] == nid)
|
||||
return 1; /* nid is a HP-Out */
|
||||
|
||||
for (i = 0; i < cfg->line_outs; i++)
|
||||
if (cfg->line_out_pins[i] == nid)
|
||||
return 1; /* nid is a line-Out */
|
||||
return 0; /* nid is not a HP-Out */
|
||||
};
|
||||
|
||||
@@ -4354,7 +4356,7 @@ static int stac92xx_init(struct hda_codec *codec)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_nid_hp_pin(cfg, nid))
|
||||
if (is_nid_out_jack_pin(cfg, nid))
|
||||
continue; /* already has an unsol event */
|
||||
|
||||
pinctl = snd_hda_codec_read(codec, nid, 0,
|
||||
|
||||
Reference in New Issue
Block a user