]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.drivers/alsa-hda-stac92xx-mic-pin-fix
Disable build of xen kernel.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.drivers / alsa-hda-stac92xx-mic-pin-fix
1 From: Takashi Iwai <tiwai@suse.de>
2 Subject: ALSA: hda - Fix input pin initialization for STAC/IDT codecs
3 Patch-mainline:
4 References: bnc#443738
5
6 The input pins are sometimes not initialized properly because
7 of the optimization check of the current pinctl code.
8
9 Force to initialize the mic input pins so that they can be set up
10 properly even if they were in a weird state. But keep other input
11 pins if already set up as input, since this could be an extra mic
12 pin.
13
14 Reference: Novell bnc#443738
15 https://bugzilla.novell.com/show_bug.cgi?id=443738
16
17 Signed-off-by: Takashi Iwai <tiwai@suse.de>
18
19 ---
20 sound/pci/hda/patch_sigmatel.c | 20 ++++++++++++--------
21 1 file changed, 12 insertions(+), 8 deletions(-)
22
23 --- a/sound/pci/hda/patch_sigmatel.c
24 +++ b/sound/pci/hda/patch_sigmatel.c
25 @@ -3658,14 +3658,18 @@ static int stac92xx_init(struct hda_code
26 for (i = 0; i < AUTO_PIN_LAST; i++) {
27 hda_nid_t nid = cfg->input_pins[i];
28 if (nid) {
29 - unsigned int pinctl = snd_hda_codec_read(codec, nid,
30 - 0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
31 - /* if PINCTL already set then skip */
32 - if (pinctl & AC_PINCAP_IN)
33 - continue;
34 - pinctl = AC_PINCTL_IN_EN;
35 - if (i == AUTO_PIN_MIC || i == AUTO_PIN_FRONT_MIC)
36 - pinctl |= stac92xx_get_vref(codec, nid);
37 + unsigned int pinctl;
38 + if (i == AUTO_PIN_MIC || i == AUTO_PIN_FRONT_MIC) {
39 + /* for mic pins, force to initialize */
40 + pinctl = stac92xx_get_vref(codec, nid);
41 + } else {
42 + pinctl = snd_hda_codec_read(codec, nid, 0,
43 + AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
44 + /* if PINCTL already set then skip */
45 + if (pinctl & AC_PINCTL_IN_EN)
46 + continue;
47 + }
48 + pinctl |= AC_PINCTL_IN_EN;
49 stac92xx_auto_set_pinctl(codec, nid, pinctl);
50 }
51 }