summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2011-12-21 14:08:28 +0000
committerAndy Green <andy.green@linaro.org>2012-04-11 12:52:38 +0800
commitff8e1aadf0d2d85af33a64e795803444a8e7eadc (patch)
treebfb76a0b6b670faf197664ec4915211f07bbb6cf /sound
parentb6df1b2402c28eaed25d3d0f5716be0e353dd3c3 (diff)
ASoC: OMAP DMIC - Add initial ABE support.
To be completed. Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/omap/omap-dmic.c39
1 files changed, 36 insertions, 3 deletions
diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c
index 0855c1cfa7fd..dc907e28ba20 100644
--- a/sound/soc/omap/omap-dmic.c
+++ b/sound/soc/omap/omap-dmic.c
@@ -436,7 +436,8 @@ static int omap_dmic_remove(struct snd_soc_dai *dai)
return 0;
}
-static struct snd_soc_dai_driver omap_dmic_dai = {
+static struct snd_soc_dai_driver omap_dmic_dai[] = {
+{
.name = "omap-dmic",
.probe = omap_dmic_probe,
.remove = omap_dmic_remove,
@@ -447,6 +448,37 @@ static struct snd_soc_dai_driver omap_dmic_dai = {
.formats = SNDRV_PCM_FMTBIT_S32_LE,
},
.ops = &omap_dmic_dai_ops,
+},
+{
+ .name = "omap-dmic-abe-dai-0",
+ .capture = {
+ .channels_min = 2,
+ .channels_max = 2,
+ .rates = SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000,
+ .formats = SNDRV_PCM_FMTBIT_S32_LE,
+ },
+ .ops = &omap_dmic_dai_ops,
+},
+{
+ .name = "omap-dmic-abe-dai-1",
+ .capture = {
+ .channels_min = 2,
+ .channels_max = 2,
+ .rates = SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000,
+ .formats = SNDRV_PCM_FMTBIT_S32_LE,
+ },
+ .ops = &omap_dmic_dai_ops,
+},
+{
+ .name = "omap-dmic-abe-dai-2",
+ .capture = {
+ .channels_min = 2,
+ .channels_max = 2,
+ .rates = SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000,
+ .formats = SNDRV_PCM_FMTBIT_S32_LE,
+ },
+ .ops = &omap_dmic_dai_ops,
+},
};
static __devinit int asoc_dmic_probe(struct platform_device *pdev)
@@ -508,7 +540,8 @@ static __devinit int asoc_dmic_probe(struct platform_device *pdev)
goto err_put_clk;
}
- ret = snd_soc_register_dai(&pdev->dev, &omap_dmic_dai);
+ ret = snd_soc_register_dais(&pdev->dev, omap_dmic_dai,
+ ARRAY_SIZE(omap_dmic_dai));
if (ret)
goto err_put_clk;
@@ -523,7 +556,7 @@ static int __devexit asoc_dmic_remove(struct platform_device *pdev)
{
struct omap_dmic *dmic = platform_get_drvdata(pdev);
- snd_soc_unregister_dai(&pdev->dev);
+ snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(omap_dmic_dai));
clk_put(dmic->fclk);
return 0;