* [PATCH] ASoC: DMIC codec - Add input widget
@ 2011-05-12 15:26 Liam Girdwood
2011-05-12 15:40 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Liam Girdwood @ 2011-05-12 15:26 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Misael Lopez Cruz, Liam Girdwood
From: Misael Lopez Cruz <misael.lopez@ti.com>
Digital microphones can have some additional elements in their
audio path (like microphone bias). An input widget is required
for digital microphone CODEC driver to allow external connections
in machine drivers.
Change-Id: Ice9fcb2dbe9acccd859f90ae875d2280926bf08a
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
---
sound/soc/codecs/dmic.c | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/dmic.c b/sound/soc/codecs/dmic.c
index 57e9dac..f9a8773 100644
--- a/sound/soc/codecs/dmic.c
+++ b/sound/soc/codecs/dmic.c
@@ -39,7 +39,31 @@ static struct snd_soc_dai_driver dmic_dai = {
},
};
-static struct snd_soc_codec_driver soc_dmic = {};
+static const struct snd_soc_dapm_widget dmic_dapm_widgets[] = {
+ SND_SOC_DAPM_AIF_OUT("DMIC AIF", "Capture", 0,
+ SND_SOC_NOPM, 0, 0),
+ SND_SOC_DAPM_INPUT("DMic"),
+};
+
+static const struct snd_soc_dapm_route intercon[] = {
+ {"DMIC AIF", NULL, "DMic"},
+};
+
+static int dmic_probe(struct snd_soc_codec *codec)
+{
+ struct snd_soc_dapm_context *dapm = &codec->dapm;
+
+ snd_soc_dapm_new_controls(dapm, dmic_dapm_widgets,
+ ARRAY_SIZE(dmic_dapm_widgets));
+ snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
+ snd_soc_dapm_new_widgets(dapm);
+
+ return 0;
+}
+
+static struct snd_soc_codec_driver soc_dmic = {
+ .probe = dmic_probe,
+};
static int __devinit dmic_dev_probe(struct platform_device *pdev)
{
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: DMIC codec - Add input widget
2011-05-12 15:26 [PATCH] ASoC: DMIC codec - Add input widget Liam Girdwood
@ 2011-05-12 15:40 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2011-05-12 15:40 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, Misael Lopez Cruz
On Thu, May 12, 2011 at 04:26:20PM +0100, Liam Girdwood wrote:
> From: Misael Lopez Cruz <misael.lopez@ti.com>
>
> Digital microphones can have some additional elements in their
> audio path (like microphone bias). An input widget is required
> for digital microphone CODEC driver to allow external connections
> in machine drivers.
>
> Change-Id: Ice9fcb2dbe9acccd859f90ae875d2280926bf08a
Applied, with the Change-Id stripped out.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-12 15:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-12 15:26 [PATCH] ASoC: DMIC codec - Add input widget Liam Girdwood
2011-05-12 15:40 ` Mark Brown
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.