aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/jz4740/jz4740-pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/jz4740/jz4740-pcm.c')
-rw-r--r--sound/soc/jz4740/jz4740-pcm.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/sound/soc/jz4740/jz4740-pcm.c b/sound/soc/jz4740/jz4740-pcm.c
index ee68d850c8dd..fb1483f7c966 100644
--- a/sound/soc/jz4740/jz4740-pcm.c
+++ b/sound/soc/jz4740/jz4740-pcm.c
@@ -109,7 +109,7 @@ static int jz4740_pcm_hw_params(struct snd_pcm_substream *substream,
109 struct snd_soc_pcm_runtime *rtd = substream->private_data; 109 struct snd_soc_pcm_runtime *rtd = substream->private_data;
110 struct jz4740_pcm_config *config; 110 struct jz4740_pcm_config *config;
111 111
112 config = snd_soc_dai_get_dma_data(rtd->dai->cpu_dai, substream); 112 config = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
113 113
114 if (!config) 114 if (!config)
115 return 0; 115 return 0;
@@ -310,14 +310,14 @@ int jz4740_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,
310 if (!card->dev->coherent_dma_mask) 310 if (!card->dev->coherent_dma_mask)
311 card->dev->coherent_dma_mask = DMA_BIT_MASK(32); 311 card->dev->coherent_dma_mask = DMA_BIT_MASK(32);
312 312
313 if (dai->playback.channels_min) { 313 if (dai->driver->playback.channels_min) {
314 ret = jz4740_pcm_preallocate_dma_buffer(pcm, 314 ret = jz4740_pcm_preallocate_dma_buffer(pcm,
315 SNDRV_PCM_STREAM_PLAYBACK); 315 SNDRV_PCM_STREAM_PLAYBACK);
316 if (ret) 316 if (ret)
317 goto err; 317 goto err;
318 } 318 }
319 319
320 if (dai->capture.channels_min) { 320 if (dai->driver->capture.channels_min) {
321 ret = jz4740_pcm_preallocate_dma_buffer(pcm, 321 ret = jz4740_pcm_preallocate_dma_buffer(pcm,
322 SNDRV_PCM_STREAM_CAPTURE); 322 SNDRV_PCM_STREAM_CAPTURE);
323 if (ret) 323 if (ret)
@@ -328,22 +328,20 @@ err:
328 return ret; 328 return ret;
329} 329}
330 330
331struct snd_soc_platform jz4740_soc_platform = { 331static struct snd_soc_platform_driver jz4740_soc_platform = {
332 .name = "jz4740-pcm", 332 .ops = &jz4740_pcm_ops,
333 .pcm_ops = &jz4740_pcm_ops,
334 .pcm_new = jz4740_pcm_new, 333 .pcm_new = jz4740_pcm_new,
335 .pcm_free = jz4740_pcm_free, 334 .pcm_free = jz4740_pcm_free,
336}; 335};
337EXPORT_SYMBOL_GPL(jz4740_soc_platform);
338 336
339static int __devinit jz4740_pcm_probe(struct platform_device *pdev) 337static int __devinit jz4740_pcm_probe(struct platform_device *pdev)
340{ 338{
341 return snd_soc_register_platform(&jz4740_soc_platform); 339 return snd_soc_register_platform(&pdev->dev, &jz4740_soc_platform);
342} 340}
343 341
344static int __devexit jz4740_pcm_remove(struct platform_device *pdev) 342static int __devexit jz4740_pcm_remove(struct platform_device *pdev)
345{ 343{
346 snd_soc_unregister_platform(&jz4740_soc_platform); 344 snd_soc_unregister_platform(&pdev->dev);
347 return 0; 345 return 0;
348} 346}
349 347
@@ -351,7 +349,7 @@ static struct platform_driver jz4740_pcm_driver = {
351 .probe = jz4740_pcm_probe, 349 .probe = jz4740_pcm_probe,
352 .remove = __devexit_p(jz4740_pcm_remove), 350 .remove = __devexit_p(jz4740_pcm_remove),
353 .driver = { 351 .driver = {
354 .name = "jz4740-pcm", 352 .name = "jz4740-pcm-audio",
355 .owner = THIS_MODULE, 353 .owner = THIS_MODULE,
356 }, 354 },
357}; 355};