diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-04-16 06:20:24 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-04-16 06:20:24 -0400 |
commit | ffd0e56c606836581da5df742a43ce8015ca7475 (patch) | |
tree | 6e5c2ab926e8bc7a7ea7ab34551d8fe31d971f84 /sound | |
parent | d523b0c808a5c5cbde9ac89427d98ee6288f5f2f (diff) |
ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs
When the headphone can have no unique DAC, the current code doesn't
check the HP-detection although it should. Put the hp-detection check
before the DAC check to fix this bug.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index ce30b459aee6..917bc5d3ac2c 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -3076,6 +3076,11 @@ static int create_multi_out_ctls(struct hda_codec *codec, int num_outs, | |||
3076 | unsigned int wid_caps; | 3076 | unsigned int wid_caps; |
3077 | 3077 | ||
3078 | for (i = 0; i < num_outs && i < ARRAY_SIZE(chname); i++) { | 3078 | for (i = 0; i < num_outs && i < ARRAY_SIZE(chname); i++) { |
3079 | if (type == AUTO_PIN_HP_OUT && !spec->hp_detect) { | ||
3080 | wid_caps = get_wcaps(codec, pins[i]); | ||
3081 | if (wid_caps & AC_WCAP_UNSOL_CAP) | ||
3082 | spec->hp_detect = 1; | ||
3083 | } | ||
3079 | nid = dac_nids[i]; | 3084 | nid = dac_nids[i]; |
3080 | if (!nid) | 3085 | if (!nid) |
3081 | continue; | 3086 | continue; |
@@ -3119,11 +3124,6 @@ static int create_multi_out_ctls(struct hda_codec *codec, int num_outs, | |||
3119 | err = create_controls_idx(codec, name, idx, nid, 3); | 3124 | err = create_controls_idx(codec, name, idx, nid, 3); |
3120 | if (err < 0) | 3125 | if (err < 0) |
3121 | return err; | 3126 | return err; |
3122 | if (type == AUTO_PIN_HP_OUT && !spec->hp_detect) { | ||
3123 | wid_caps = get_wcaps(codec, pins[i]); | ||
3124 | if (wid_caps & AC_WCAP_UNSOL_CAP) | ||
3125 | spec->hp_detect = 1; | ||
3126 | } | ||
3127 | } | 3127 | } |
3128 | } | 3128 | } |
3129 | return 0; | 3129 | return 0; |