diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-10-06 07:21:54 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-10-06 07:21:54 -0400 |
commit | 01d4825df62d1d405035b90294bf38616d3f380b (patch) | |
tree | e74a6cc289d21a8da52d54bea61f6d7a978e225e /sound | |
parent | f8f25ba3563dab14b1c3ea4d829642b8a61ca5d7 (diff) |
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>
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); |