diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-04-23 02:24:48 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-04-23 02:24:48 -0400 |
commit | 7315613f87f4aa0a52f60814f4ee3802e0bb1ec5 (patch) | |
tree | dee3473d8532478ecff7d585bbc00e0aa2252ca1 /sound/pci/hda/patch_analog.c | |
parent | 5bd3729f6818721f76a2a2f7d2ecad899bace340 (diff) |
ALSA: hda - Fix init verbs of AD1884A mobile model
The current ad1884a-mobile model has a problem that the speaker output
doesn't work sometimes after boot or power-saving on some HP laptops.
It seems that the verbs accessing to the non-functional widgets cause
this problem.
This patch simplifies the init verbs for mobile model not to touch
unnecessary setups so that it avoids the speaker-mute problem.
Reference: Novell bnc#495668
https://bugzilla.novell.com/show_bug.cgi?id=495668
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_analog.c')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 9bcd8ab5a27..84cc49ca914 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -3817,6 +3817,49 @@ static struct hda_verb ad1884a_laptop_verbs[] = { | |||
3817 | { } /* end */ | 3817 | { } /* end */ |
3818 | }; | 3818 | }; |
3819 | 3819 | ||
3820 | static struct hda_verb ad1884a_mobile_verbs[] = { | ||
3821 | /* DACs; unmute as default */ | ||
3822 | {0x03, AC_VERB_SET_AMP_GAIN_MUTE, 0x27}, /* 0dB */ | ||
3823 | {0x04, AC_VERB_SET_AMP_GAIN_MUTE, 0x27}, /* 0dB */ | ||
3824 | /* Port-A (HP) mixer - route only from analog mixer */ | ||
3825 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
3826 | {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
3827 | /* Port-A pin */ | ||
3828 | {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
3829 | /* Port-A (HP) pin - always unmuted */ | ||
3830 | {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, | ||
3831 | /* Port-B (mic jack) pin */ | ||
3832 | {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
3833 | {0x14, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */ | ||
3834 | /* Port-C (int mic) pin */ | ||
3835 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80}, | ||
3836 | {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0x7002}, /* raise mic as default */ | ||
3837 | /* Port-F (int speaker) mixer - route only from analog mixer */ | ||
3838 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
3839 | {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, | ||
3840 | /* Port-F pin */ | ||
3841 | {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | ||
3842 | {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
3843 | /* Analog mixer; mute as default */ | ||
3844 | {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, | ||
3845 | {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, | ||
3846 | {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, | ||
3847 | {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, | ||
3848 | {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, | ||
3849 | {0x20, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)}, | ||
3850 | /* Analog Mix output amp */ | ||
3851 | {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
3852 | /* capture sources */ | ||
3853 | /* {0x0c, AC_VERB_SET_CONNECT_SEL, 0x0}, */ /* set via unsol */ | ||
3854 | {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
3855 | {0x0d, AC_VERB_SET_CONNECT_SEL, 0x0}, | ||
3856 | {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE}, | ||
3857 | /* unsolicited event for pin-sense */ | ||
3858 | {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_HP_EVENT}, | ||
3859 | {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | AD1884A_MIC_EVENT}, | ||
3860 | { } /* end */ | ||
3861 | }; | ||
3862 | |||
3820 | /* | 3863 | /* |
3821 | * Thinkpad X300 | 3864 | * Thinkpad X300 |
3822 | * 0x11 - HP | 3865 | * 0x11 - HP |
@@ -3988,7 +4031,7 @@ static int patch_ad1884a(struct hda_codec *codec) | |||
3988 | break; | 4031 | break; |
3989 | case AD1884A_MOBILE: | 4032 | case AD1884A_MOBILE: |
3990 | spec->mixers[0] = ad1884a_mobile_mixers; | 4033 | spec->mixers[0] = ad1884a_mobile_mixers; |
3991 | spec->init_verbs[spec->num_init_verbs++] = ad1884a_laptop_verbs; | 4034 | spec->init_verbs[0] = ad1884a_mobile_verbs; |
3992 | spec->multiout.dig_out_nid = 0; | 4035 | spec->multiout.dig_out_nid = 0; |
3993 | codec->patch_ops.unsol_event = ad1884a_hp_unsol_event; | 4036 | codec->patch_ops.unsol_event = ad1884a_hp_unsol_event; |
3994 | codec->patch_ops.init = ad1884a_hp_init; | 4037 | codec->patch_ops.init = ad1884a_hp_init; |