aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/omap-mcpdm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap/omap-mcpdm.c')
-rw-r--r--sound/soc/omap/omap-mcpdm.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
index 2f5b1536477e..d8ebb52645a9 100644
--- a/sound/soc/omap/omap-mcpdm.c
+++ b/sound/soc/omap/omap-mcpdm.c
@@ -42,6 +42,7 @@
42#include <sound/dmaengine_pcm.h> 42#include <sound/dmaengine_pcm.h>
43 43
44#include "omap-mcpdm.h" 44#include "omap-mcpdm.h"
45#include "omap-pcm.h"
45 46
46struct mcpdm_link_config { 47struct mcpdm_link_config {
47 u32 link_mask; /* channel mask for the direction */ 48 u32 link_mask; /* channel mask for the direction */
@@ -265,9 +266,6 @@ static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream,
265 } 266 }
266 mutex_unlock(&mcpdm->mutex); 267 mutex_unlock(&mcpdm->mutex);
267 268
268 snd_soc_dai_set_dma_data(dai, substream,
269 &mcpdm->dma_data[substream->stream]);
270
271 return 0; 269 return 0;
272} 270}
273 271
@@ -406,6 +404,11 @@ static int omap_mcpdm_probe(struct snd_soc_dai *dai)
406 mcpdm->config[SNDRV_PCM_STREAM_PLAYBACK].threshold = 2; 404 mcpdm->config[SNDRV_PCM_STREAM_PLAYBACK].threshold = 2;
407 mcpdm->config[SNDRV_PCM_STREAM_CAPTURE].threshold = 405 mcpdm->config[SNDRV_PCM_STREAM_CAPTURE].threshold =
408 MCPDM_UP_THRES_MAX - 3; 406 MCPDM_UP_THRES_MAX - 3;
407
408 snd_soc_dai_init_dma_data(dai,
409 &mcpdm->dma_data[SNDRV_PCM_STREAM_PLAYBACK],
410 &mcpdm->dma_data[SNDRV_PCM_STREAM_CAPTURE]);
411
409 return ret; 412 return ret;
410} 413}
411 414
@@ -460,6 +463,7 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
460{ 463{
461 struct omap_mcpdm *mcpdm; 464 struct omap_mcpdm *mcpdm;
462 struct resource *res; 465 struct resource *res;
466 int ret;
463 467
464 mcpdm = devm_kzalloc(&pdev->dev, sizeof(struct omap_mcpdm), GFP_KERNEL); 468 mcpdm = devm_kzalloc(&pdev->dev, sizeof(struct omap_mcpdm), GFP_KERNEL);
465 if (!mcpdm) 469 if (!mcpdm)
@@ -490,9 +494,13 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
490 494
491 mcpdm->dev = &pdev->dev; 495 mcpdm->dev = &pdev->dev;
492 496
493 return devm_snd_soc_register_component(&pdev->dev, 497 ret = devm_snd_soc_register_component(&pdev->dev,
494 &omap_mcpdm_component, 498 &omap_mcpdm_component,
495 &omap_mcpdm_dai, 1); 499 &omap_mcpdm_dai, 1);
500 if (ret)
501 return ret;
502
503 return omap_pcm_platform_register(&pdev->dev);
496} 504}
497 505
498static const struct of_device_id omap_mcpdm_of_match[] = { 506static const struct of_device_id omap_mcpdm_of_match[] = {