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>

+44 -1
+44 -1
sound/pci/hda/patch_analog.c
··· 3817 { } /* end */ 3818 }; 3819 3820 /* 3821 * Thinkpad X300 3822 * 0x11 - HP ··· 4031 break; 4032 case AD1884A_MOBILE: 4033 spec->mixers[0] = ad1884a_mobile_mixers; 4034 - spec->init_verbs[spec->num_init_verbs++] = ad1884a_laptop_verbs; 4035 spec->multiout.dig_out_nid = 0; 4036 codec->patch_ops.unsol_event = ad1884a_hp_unsol_event; 4037 codec->patch_ops.init = ad1884a_hp_init;
··· 3817 { } /* end */ 3818 }; 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 + 3863 /* 3864 * Thinkpad X300 3865 * 0x11 - HP ··· 3988 break; 3989 case AD1884A_MOBILE: 3990 spec->mixers[0] = ad1884a_mobile_mixers; 3991 + spec->init_verbs[0] = ad1884a_mobile_verbs; 3992 spec->multiout.dig_out_nid = 0; 3993 codec->patch_ops.unsol_event = ad1884a_hp_unsol_event; 3994 codec->patch_ops.init = ad1884a_hp_init;