]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.drivers/alsa-post-ga-ad1884a-mobile-init-fix
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / alsa-post-ga-ad1884a-mobile-init-fix
1 From: Takashi Iwai <tiwai@suse.de>
2 Subject: ALSA: hda - Fix init verbs of AD1884A mobile model
3 Patch-mainline:
4 References: bnc#495668
5
6 The current ad1884a-mobile model has a problem that the speaker output
7 doesn't work sometimes after boot or power-saving on some HP laptops.
8 It seems that the verbs accessing to the non-functional widgets cause
9 this problem.
10
11 This patch simplifies the init verbs for mobile model not to touch
12 unnecessary setups so that it avoids the speaker-mute problem.
13
14 Signed-off-by: Takashi Iwai <tiwai@suse.de>
15
16 ---
17
18 ---
19 sound/pci/hda/patch_analog.c | 45 ++++++++++++++++++++++++++++++++++++++++++-
20 1 file changed, 44 insertions(+), 1 deletion(-)
21
22 --- a/sound/pci/hda/patch_analog.c
23 +++ b/sound/pci/hda/patch_analog.c
24 @@ -3798,6 +3798,49 @@ static struct hda_verb ad1884a_laptop_ve
25 { } /* end */
26 };
27
28 +static struct hda_verb ad1884a_mobile_verbs[] = {
29 + /* DACs; unmute as default */
30 + {0x03, AC_VERB_SET_AMP_GAIN_MUTE, 0x27}, /* 0dB */
31 + {0x04, AC_VERB_SET_AMP_GAIN_MUTE, 0x27}, /* 0dB */
32 + /* Port-A (HP) mixer - route only from analog mixer */
33 + {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
34 + {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
35 + /* Port-A pin */
36 + {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
37 + /* Port-A (HP) pin - always unmuted */
38 + {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
39 + /* Port-B (mic jack) pin */
40 + {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
41 + {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */
42 + /* Port-C (int mic) pin */
43 + {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
44 + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */
45 + /* Port-F (int speaker) mixer - route only from analog mixer */
46 + {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
47 + {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
48 + /* Port-F pin */
49 + {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
50 + {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
51 + /* Analog mixer; mute as default */
52 + {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
53 + {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
54 + {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
55 + {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
56 + {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
57 + {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)},
58 + /* Analog Mix output amp */
59 + {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
60 + /* capture sources */
61 + /* {0x0c, AC_VERB_SET_CONNECT_SEL, 0x0}, */ /* set via unsol */
62 + {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
63 + {0x0d, AC_VERB_SET_CONNECT_SEL, 0x0},
64 + {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
65 + /* unsolicited event for pin-sense */
66 + {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_HP_EVENT},
67 + {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_MIC_EVENT},
68 + { } /* end */
69 +};
70 +
71 /*
72 * Thinkpad X300
73 * 0x11 - HP
74 @@ -3976,7 +4019,7 @@ static int patch_ad1884a(struct hda_code
75 break;
76 case AD1884A_MOBILE:
77 spec->mixers[0] = ad1884a_mobile_mixers;
78 - spec->init_verbs[spec->num_init_verbs++] = ad1884a_laptop_verbs;
79 + spec->init_verbs[0] = ad1884a_mobile_verbs;
80 spec->multiout.dig_out_nid = 0;
81 codec->patch_ops.unsol_event = ad1884a_hp_unsol_event;
82 codec->patch_ops.init = ad1884a_hp_init;