Commit 01d4825d authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Don't pick up invalid HP pins in alc_subsystem_id()

alc_subsystem_id() tries to pick up a headphone pin if not configured,
but this caused side-effects as the problem in commit
15870f05.

This patch fixes the driver behavior to pick up invalid HP pins; at least,
the pins that are listed as the primary outputs aren't taken any more.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f8f25ba3
...@@ -1332,15 +1332,20 @@ static int alc_subsystem_id(struct hda_codec *codec, ...@@ -1332,15 +1332,20 @@ static int alc_subsystem_id(struct hda_codec *codec,
* when the external headphone out jack is plugged" * when the external headphone out jack is plugged"
*/ */
if (!spec->autocfg.hp_pins[0]) { if (!spec->autocfg.hp_pins[0]) {
hda_nid_t nid;
tmp = (ass >> 11) & 0x3; /* HP to chassis */ tmp = (ass >> 11) & 0x3; /* HP to chassis */
if (tmp == 0) if (tmp == 0)
spec->autocfg.hp_pins[0] = porta; nid = porta;
else if (tmp == 1) else if (tmp == 1)
spec->autocfg.hp_pins[0] = porte; nid = porte;
else if (tmp == 2) else if (tmp == 2)
spec->autocfg.hp_pins[0] = portd; nid = portd;
else else
return 1; return 1;
for (i = 0; i < spec->autocfg.line_outs; i++)
if (spec->autocfg.line_out_pins[i] == nid)
return 1;
spec->autocfg.hp_pins[0] = nid;
} }
alc_init_auto_hp(codec); alc_init_auto_hp(codec);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment