diff options
author | Bo Shen <voice.shen@atmel.com> | 2012-11-28 07:46:13 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-02 08:29:19 +0400 |
commit | 3951e4aae2ce7e4593e575e91cbb22f1ba153596 (patch) | |
tree | f210f5e34e8172e1d8c5b2aa96db70b9a2d16922 /sound/soc/atmel/atmel_ssc_dai.c | |
parent | 92dfa61986237f849bb6ff5190380b3bf69335d2 (diff) | |
download | linux-3951e4aae2ce7e4593e575e91cbb22f1ba153596.tar.xz |
ASoC: atmel-pcm: dma support based on pcm dmaengine
Specify overrun bit in interrupt mask
Add dmaengine specific routines
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
[voice.shen@atmel.com: adapt to soc dmaengine framework]
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/atmel/atmel_ssc_dai.c')
-rw-r--r-- | sound/soc/atmel/atmel_ssc_dai.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index 170561407f61..1c7663422054 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c @@ -721,6 +721,8 @@ static struct snd_soc_dai_driver atmel_ssc_dai = { static int asoc_ssc_init(struct device *dev) { + struct platform_device *pdev = to_platform_device(dev); + struct ssc_device *ssc = platform_get_drvdata(pdev); int ret; ret = snd_soc_register_dai(dev, &atmel_ssc_dai); @@ -729,7 +731,11 @@ static int asoc_ssc_init(struct device *dev) goto err; } - ret = atmel_pcm_pdc_platform_register(dev); + if (ssc->pdata->use_dma) + ret = atmel_pcm_dma_platform_register(dev); + else + ret = atmel_pcm_pdc_platform_register(dev); + if (ret) { dev_err(dev, "Could not register PCM: %d\n", ret); goto err_unregister_dai; @@ -745,7 +751,14 @@ err: static void asoc_ssc_exit(struct device *dev) { - atmel_pcm_pdc_platform_unregister(dev); + struct platform_device *pdev = to_platform_device(dev); + struct ssc_device *ssc = platform_get_drvdata(pdev); + + if (ssc->pdata->use_dma) + atmel_pcm_dma_platform_unregister(dev); + else + atmel_pcm_pdc_platform_unregister(dev); + snd_soc_unregister_dai(dev); } |