]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.drivers/alsa-post-ga-stac-hp-detect-fix
Updated xen patches taken from suse.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / alsa-post-ga-stac-hp-detect-fix
1 From ffd0e56c606836581da5df742a43ce8015ca7475 Mon Sep 17 00:00:00 2001
2 From: Takashi Iwai <tiwai@suse.de>
3 Subject: ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs
4 Patch-mainline: 2.6.30-rc3
5 References: bnc#495515
6
7 When the headphone can have no unique DAC, the current code doesn't
8 check the HP-detection although it should. Put the hp-detection check
9 before the DAC check to fix this bug.
10
11 Signed-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;