aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_via.c
diff options
context:
space:
mode:
authorLydia Wang <lydiawang@viatech.com.cn>2009-10-10 07:08:32 -0400
committerTakashi Iwai <tiwai@suse.de>2009-10-11 11:58:30 -0400
commitbc7e7e5ce05047e16633a94d36fa144af1d2b4c7 (patch)
tree2f7f2cf33d9664341e5804fb8b821e74f2a5de35 /sound/pci/hda/patch_via.c
parent6369bcfccb57da28ad3e09b25fecd841a415ae95 (diff)
ALSA: HDA VIA: Move backdoor verbs to vt17xx_volume_init_verb
As init verbs, vt17xx_volume_init_verb is a better place to hold them. Signed-off-by: Lydia Wang <lydiawang@viatech.com.cn> Signed-off-by: Logan Li <loganli@viatech.com.cn> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_via.c')
-rw-r--r--sound/pci/hda/patch_via.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 4b7cd5971701..1c87231fa7e5 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -3068,6 +3068,8 @@ static struct hda_verb vt1708S_volume_init_verbs[] = {
3068 {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 3068 {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
3069 /* Enable Mic Boost Volume backdoor */ 3069 /* Enable Mic Boost Volume backdoor */
3070 {0x1, 0xf98, 0x1}, 3070 {0x1, 0xf98, 0x1},
3071 /* don't bybass mixer */
3072 {0x1, 0xf88, 0xc0},
3071 { } 3073 { }
3072}; 3074};
3073 3075
@@ -3527,6 +3529,10 @@ static struct hda_verb vt1702_volume_init_verbs[] = {
3527 /* PW6 PW7 Output enable */ 3529 /* PW6 PW7 Output enable */
3528 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 3530 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
3529 {0x1C, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40}, 3531 {0x1C, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
3532 /* mixer enable */
3533 {0x1, 0xF88, 0x3},
3534 /* GPIO 0~2 */
3535 {0x1, 0xF82, 0x3F},
3530 { } 3536 { }
3531}; 3537};
3532 3538
@@ -3768,8 +3774,6 @@ static int patch_vt1702(struct hda_codec *codec)
3768{ 3774{
3769 struct via_spec *spec; 3775 struct via_spec *spec;
3770 int err; 3776 int err;
3771 unsigned int response;
3772 unsigned char control;
3773 3777
3774 /* create a codec specific record */ 3778 /* create a codec specific record */
3775 spec = kzalloc(sizeof(*spec), GFP_KERNEL); 3779 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
@@ -3814,18 +3818,6 @@ static int patch_vt1702(struct hda_codec *codec)
3814 spec->loopback.amplist = vt1702_loopbacks; 3818 spec->loopback.amplist = vt1702_loopbacks;
3815#endif 3819#endif
3816 3820
3817 /* Open backdoor */
3818 response = snd_hda_codec_read(codec, codec->afg, 0, 0xF8C, 0);
3819 control = (unsigned char)(response & 0xff);
3820 control |= 0x3;
3821 snd_hda_codec_write(codec, codec->afg, 0, 0xF88, control);
3822
3823 /* Enable GPIO 0&1 for volume&mute control */
3824 /* Enable GPIO 2 for DMIC-DATA */
3825 response = snd_hda_codec_read(codec, codec->afg, 0, 0xF84, 0);
3826 control = (unsigned char)((response >> 16) & 0x3f);
3827 snd_hda_codec_write(codec, codec->afg, 0, 0xF82, control);
3828
3829 return 0; 3821 return 0;
3830} 3822}
3831 3823