]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.drivers/alsa-post-ga-stac-hp-detect-fix
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / alsa-post-ga-stac-hp-detect-fix
CommitLineData
00e5a55c
BS
1From ffd0e56c606836581da5df742a43ce8015ca7475 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Subject: ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs
4Patch-mainline: 2.6.30-rc3
5References: bnc#495515
6
7When the headphone can have no unique DAC, the current code doesn't
8check the HP-detection although it should. Put the hp-detection check
9before the DAC check to fix this bug.
10
11Signed-off-by: Takashi Iwai <tiwai@suse.de>
12
13---
14 sound/pci/hda/patch_sigmatel.c | 10 +++++-----
15 1 file changed, 5 insertions(+), 5 deletions(-)
16
17--- a/sound/pci/hda/patch_sigmatel.c
18+++ b/sound/pci/hda/patch_sigmatel.c
19@@ -3025,6 +3025,11 @@
20 unsigned int wid_caps;
21
22 for (i = 0; i < num_outs && i < ARRAY_SIZE(chname); i++) {
23+ if (type == AUTO_PIN_HP_OUT && !spec->hp_detect) {
24+ wid_caps = get_wcaps(codec, pins[i]);
25+ if (wid_caps & AC_WCAP_UNSOL_CAP)
26+ spec->hp_detect = 1;
27+ }
28 nid = dac_nids[i];
29 if (!nid)
30 continue;
31@@ -3064,11 +3069,6 @@
32 err = create_controls(codec, name, nid, 3);
33 if (err < 0)
34 return err;
35- if (type == AUTO_PIN_HP_OUT && !spec->hp_detect) {
36- wid_caps = get_wcaps(codec, pins[i]);
37- if (wid_caps & AC_WCAP_UNSOL_CAP)
38- spec->hp_detect = 1;
39- }
40 }
41 }
42 return 0;