alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: Route Mic Bias in Visstrim_M10 board.
@ 2012-01-11 12:21 Javier Martin
  2012-01-12  3:05 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Javier Martin @ 2012-01-11 12:21 UTC (permalink / raw)
  To: alsa-devel; +Cc: broonie, lrg, lars, Javier Martin

Visstrim_M10 board uses an external microphone
that can be enabled/disabled by the user

---
Changes since v1:
 - Change "audio_map" to "aic32x4_dapm_routes".
 - Use snd_soc_card fields to register controls,
   routes and widgets.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
---
 sound/soc/imx/mx27vis-aic32x4.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/sound/soc/imx/mx27vis-aic32x4.c b/sound/soc/imx/mx27vis-aic32x4.c
index 054110b..30adbe1 100644
--- a/sound/soc/imx/mx27vis-aic32x4.c
+++ b/sound/soc/imx/mx27vis-aic32x4.c
@@ -74,6 +74,24 @@ static struct snd_soc_ops mx27vis_aic32x4_snd_ops = {
 	.hw_params	= mx27vis_aic32x4_hw_params,
 };
 
+static const struct snd_kcontrol_new mx27vis_aic32x4_controls[] = {
+	SOC_DAPM_PIN_SWITCH("External Mic"),
+};
+
+static const struct snd_soc_dapm_widget aic32x4_dapm_widgets[] = {
+	SND_SOC_DAPM_MIC("External Mic", NULL),
+};
+
+static const struct snd_soc_dapm_route aic32x4_dapm_routes[] = {
+	{"Mic Bias", NULL, "External Mic"},
+	{"IN1_R", NULL, "Mic Bias"},
+	{"IN2_R", NULL, "Mic Bias"},
+	{"IN3_R", NULL, "Mic Bias"},
+	{"IN1_L", NULL, "Mic Bias"},
+	{"IN2_L", NULL, "Mic Bias"},
+	{"IN3_L", NULL, "Mic Bias"},
+};
+
 static struct snd_soc_dai_link mx27vis_aic32x4_dai = {
 	.name		= "tlv320aic32x4",
 	.stream_name	= "TLV320AIC32X4",
@@ -88,6 +106,12 @@ static struct snd_soc_card mx27vis_aic32x4 = {
 	.name		= "visstrim_m10-audio",
 	.dai_link	= &mx27vis_aic32x4_dai,
 	.num_links	= 1,
+	.controls	= mx27vis_aic32x4_controls,
+	.num_controls	= ARRAY_SIZE(mx27vis_aic32x4_controls),
+	.dapm_widgets	= aic32x4_dapm_widgets,
+	.num_dapm_widgets = ARRAY_SIZE(aic32x4_dapm_widgets),
+	.dapm_routes	= aic32x4_dapm_routes,
+	.num_dapm_routes = ARRAY_SIZE(aic32x4_dapm_routes),
 };
 
 static struct platform_device *mx27vis_aic32x4_snd_device;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] ASoC: Route Mic Bias in Visstrim_M10 board.
  2012-01-11 12:21 [PATCH v2] ASoC: Route Mic Bias in Visstrim_M10 board Javier Martin
@ 2012-01-12  3:05 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-01-12  3:05 UTC (permalink / raw)
  To: Javier Martin; +Cc: alsa-devel, lars, lrg

On Wed, Jan 11, 2012 at 01:21:05PM +0100, Javier Martin wrote:
> Visstrim_M10 board uses an external microphone
> that can be enabled/disabled by the user

Applied, thanks.  One note:

> 
> ---
> Changes since v1:
>  - Change "audio_map" to "aic32x4_dapm_routes".
>  - Use snd_soc_card fields to register controls,
>    routes and widgets.
> 
> Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>

Your signoff should come before the --- as tools like git am will
discard any text after the --- and the signoff needs to end up in the
changelog.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-12  3:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-11 12:21 [PATCH v2] ASoC: Route Mic Bias in Visstrim_M10 board Javier Martin
2012-01-12  3:05 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).