aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/codecs/dmic.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/sound/soc/codecs/dmic.c b/sound/soc/codecs/dmic.c
index 57e9dac88d38..f9a87737ec16 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 = {
39 }, 39 },
40}; 40};
41 41
42static struct snd_soc_codec_driver soc_dmic = {}; 42static const struct snd_soc_dapm_widget dmic_dapm_widgets[] = {
43 SND_SOC_DAPM_AIF_OUT("DMIC AIF", "Capture", 0,
44 SND_SOC_NOPM, 0, 0),
45 SND_SOC_DAPM_INPUT("DMic"),
46};
47
48static const struct snd_soc_dapm_route intercon[] = {
49 {"DMIC AIF", NULL, "DMic"},
50};
51
52static int dmic_probe(struct snd_soc_codec *codec)
53{
54 struct snd_soc_dapm_context *dapm = &codec->dapm;
55
56 snd_soc_dapm_new_controls(dapm, dmic_dapm_widgets,
57 ARRAY_SIZE(dmic_dapm_widgets));
58 snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
59 snd_soc_dapm_new_widgets(dapm);
60
61 return 0;
62}
63
64static struct snd_soc_codec_driver soc_dmic = {
65 .probe = dmic_probe,
66};
43 67
44static int __devinit dmic_dev_probe(struct platform_device *pdev) 68static int __devinit dmic_dev_probe(struct platform_device *pdev)
45{ 69{