Commit 01d4825df62d1d405035b90294bf38616d3f380b

Authored by Takashi Iwai
1 parent f8f25ba356

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
15870f05e90a365f8022da416e713be0c5024e2f.

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: Takashi Iwai <tiwai@suse.de>

Showing 1 changed file with 8 additions and 3 deletions Side-by-side Diff

sound/pci/hda/patch_realtek.c
... ... @@ -1332,15 +1332,20 @@
1332 1332 * when the external headphone out jack is plugged"
1333 1333 */
1334 1334 if (!spec->autocfg.hp_pins[0]) {
  1335 + hda_nid_t nid;
1335 1336 tmp = (ass >> 11) & 0x3; /* HP to chassis */
1336 1337 if (tmp == 0)
1337   - spec->autocfg.hp_pins[0] = porta;
  1338 + nid = porta;
1338 1339 else if (tmp == 1)
1339   - spec->autocfg.hp_pins[0] = porte;
  1340 + nid = porte;
1340 1341 else if (tmp == 2)
1341   - spec->autocfg.hp_pins[0] = portd;
  1342 + nid = portd;
1342 1343 else
1343 1344 return 1;
  1345 + for (i = 0; i < spec->autocfg.line_outs; i++)
  1346 + if (spec->autocfg.line_out_pins[i] == nid)
  1347 + return 1;
  1348 + spec->autocfg.hp_pins[0] = nid;
1344 1349 }
1345 1350  
1346 1351 alc_init_auto_hp(codec);