diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 901c2999ed64..a61fbbb41b29 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -1332,15 +1332,20 @@ do_sku: | |||
1332 | * when the external headphone out jack is plugged" | 1332 | * when the external headphone out jack is plugged" |
1333 | */ | 1333 | */ |
1334 | if (!spec->autocfg.hp_pins[0]) { | 1334 | if (!spec->autocfg.hp_pins[0]) { |
1335 | hda_nid_t nid; | ||
1335 | tmp = (ass >> 11) & 0x3; /* HP to chassis */ | 1336 | tmp = (ass >> 11) & 0x3; /* HP to chassis */ |
1336 | if (tmp == 0) | 1337 | if (tmp == 0) |
1337 | spec->autocfg.hp_pins[0] = porta; | 1338 | nid = porta; |
1338 | else if (tmp == 1) | 1339 | else if (tmp == 1) |
1339 | spec->autocfg.hp_pins[0] = porte; | 1340 | nid = porte; |
1340 | else if (tmp == 2) | 1341 | else if (tmp == 2) |
1341 | spec->autocfg.hp_pins[0] = portd; | 1342 | nid = portd; |
1342 | else | 1343 | else |
1343 | return 1; | 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 | alc_init_auto_hp(codec); | 1351 | alc_init_auto_hp(codec); |