* [PATCH 21/30] ALSA: HDA VIA: Move backdoor verbs to vt17xx_volume_init_verb
@ 2009-10-10 11:08 Logan Li
0 siblings, 0 replies; 2+ messages in thread
From: Logan Li @ 2009-10-10 11:08 UTC (permalink / raw)
To: alsa-devel; +Cc: tiwai, HaraldWelte, LydiaWang
From: Lydia Wang <lydiawang@viatech.com.cn>
Subject: 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>
---
sound/pci/hda/patch_via.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -3085,6 +3085,8 @@
{0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
/* Enable Mic Boost Volume backdoor */
{0x1, 0xf98, 0x1},
+ /* don't bybass mixer */
+ {0x1, 0xf88, 0xc0},
{ }
};
@@ -3544,6 +3546,10 @@
/* PW6 PW7 Output enable */
{0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
{0x1C, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
+ /* mixer enable */
+ {0x1, 0xF88, 0x3},
+ /* GPIO 0~2 */
+ {0x1, 0xF82, 0x3F},
{ }
};
@@ -3785,8 +3791,6 @@
{
struct via_spec *spec;
int err;
- unsigned int response;
- unsigned char control;
/* create a codec specific record */
spec = kzalloc(sizeof(*spec), GFP_KERNEL);
@@ -3831,18 +3835,6 @@
spec->loopback.amplist = vt1702_loopbacks;
#endif
- /* Open backdoor */
- response = snd_hda_codec_read(codec, codec->afg, 0, 0xF8C, 0);
- control = (unsigned char)(response & 0xff);
- control |= 0x3;
- snd_hda_codec_write(codec, codec->afg, 0, 0xF88, control);
-
- /* Enable GPIO 0&1 for volume&mute control */
- /* Enable GPIO 2 for DMIC-DATA */
- response = snd_hda_codec_read(codec, codec->afg, 0, 0xF84, 0);
- control = (unsigned char)((response >> 16) & 0x3f);
- snd_hda_codec_write(codec, codec->afg, 0, 0xF82, control);
-
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 21/30] ALSA: HDA VIA: Move backdoor verbs to vt17xx_volume_init_verb
@ 2009-10-09 10:41 LoganLi
0 siblings, 0 replies; 2+ messages in thread
From: LoganLi @ 2009-10-09 10:41 UTC (permalink / raw)
To: alsa-devel; +Cc: tiwai, HaraldWelte, LydiaWang
From: Lydia Wang <lydiawang@viatech.com.cn>
Subject: 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>
---
pci/hda/patch_via.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
--- a/pci/hda/patch_via.c
+++ b/pci/hda/patch_via.c
@@ -3084,6 +3084,8 @@
{0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
/* Enable Mic Boost Volume backdoor */
{0x1, 0xf98, 0x1},
+ /* don't bybass mixer */
+ {0x1, 0xf88, 0xc0},
{ }
};
@@ -3543,6 +3545,10 @@
/* PW6 PW7 Output enable */
{0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
{0x1C, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
+ /* mixer enable */
+ {0x1, 0xF88, 0x3},
+ /* GPIO 0~2 */
+ {0x1, 0xF82, 0x3F},
{ }
};
@@ -3784,8 +3790,6 @@
{
struct via_spec *spec;
int err;
- unsigned int response;
- unsigned char control;
/* create a codec specific record */
spec = kzalloc(sizeof(*spec), GFP_KERNEL);
@@ -3830,18 +3834,6 @@
spec->loopback.amplist = vt1702_loopbacks;
#endif
- /* Open backdoor */
- response = snd_hda_codec_read(codec, codec->afg, 0, 0xF8C, 0);
- control = (unsigned char)(response & 0xff);
- control |= 0x3;
- snd_hda_codec_write(codec, codec->afg, 0, 0xF88, control);
-
- /* Enable GPIO 0&1 for volume&mute control */
- /* Enable GPIO 2 for DMIC-DATA */
- response = snd_hda_codec_read(codec, codec->afg, 0, 0xF84, 0);
- control = (unsigned char)((response >> 16) & 0x3f);
- snd_hda_codec_write(codec, codec->afg, 0, 0xF82, control);
-
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-10 11:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-10 11:08 [PATCH 21/30] ALSA: HDA VIA: Move backdoor verbs to vt17xx_volume_init_verb Logan Li
-- strict thread matches above, loose matches on Subject: below --
2009-10-09 10:41 LoganLi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.