diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-09 07:02:26 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-09 07:02:26 -0400 |
commit | bf564ea99797f6e66796d0d0a24a8fe872d5f26e (patch) | |
tree | eb39d79c3ab5d59817b7d886c584b91c1651b480 /sound/soc/fsl/fsl_dma.c | |
parent | 147dfe90f7302f2472d83c25b983420a727aec5a (diff) | |
parent | 0cd114fff9ace7014c0d3ef8ab385fc5d3cf2d2f (diff) |
Merge branch 'for-3.0' into for-3.1
Diffstat (limited to 'sound/soc/fsl/fsl_dma.c')
-rw-r--r-- | sound/soc/fsl/fsl_dma.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c index 3872598d04aa..732208c8c0b4 100644 --- a/sound/soc/fsl/fsl_dma.c +++ b/sound/soc/fsl/fsl_dma.c | |||
@@ -312,7 +312,7 @@ static int fsl_dma_new(struct snd_soc_pcm_runtime *rtd) | |||
312 | * should allocate a DMA buffer only for the streams that are valid. | 312 | * should allocate a DMA buffer only for the streams that are valid. |
313 | */ | 313 | */ |
314 | 314 | ||
315 | if (dai->driver->playback.channels_min) { | 315 | if (pcm->streams[0].substream) { |
316 | ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, | 316 | ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, |
317 | fsl_dma_hardware.buffer_bytes_max, | 317 | fsl_dma_hardware.buffer_bytes_max, |
318 | &pcm->streams[0].substream->dma_buffer); | 318 | &pcm->streams[0].substream->dma_buffer); |
@@ -322,13 +322,13 @@ static int fsl_dma_new(struct snd_soc_pcm_runtime *rtd) | |||
322 | } | 322 | } |
323 | } | 323 | } |
324 | 324 | ||
325 | if (dai->driver->capture.channels_min) { | 325 | if (pcm->streams[1].substream) { |
326 | ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, | 326 | ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, |
327 | fsl_dma_hardware.buffer_bytes_max, | 327 | fsl_dma_hardware.buffer_bytes_max, |
328 | &pcm->streams[1].substream->dma_buffer); | 328 | &pcm->streams[1].substream->dma_buffer); |
329 | if (ret) { | 329 | if (ret) { |
330 | snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer); | ||
331 | dev_err(card->dev, "can't alloc capture dma buffer\n"); | 330 | dev_err(card->dev, "can't alloc capture dma buffer\n"); |
331 | snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer); | ||
332 | return ret; | 332 | return ret; |
333 | } | 333 | } |
334 | } | 334 | } |
@@ -451,7 +451,8 @@ static int fsl_dma_open(struct snd_pcm_substream *substream) | |||
451 | dma_private->ld_buf_phys = ld_buf_phys; | 451 | dma_private->ld_buf_phys = ld_buf_phys; |
452 | dma_private->dma_buf_phys = substream->dma_buffer.addr; | 452 | dma_private->dma_buf_phys = substream->dma_buffer.addr; |
453 | 453 | ||
454 | ret = request_irq(dma_private->irq, fsl_dma_isr, 0, "DMA", dma_private); | 454 | ret = request_irq(dma_private->irq, fsl_dma_isr, 0, "fsldma-audio", |
455 | dma_private); | ||
455 | if (ret) { | 456 | if (ret) { |
456 | dev_err(dev, "can't register ISR for IRQ %u (ret=%i)\n", | 457 | dev_err(dev, "can't register ISR for IRQ %u (ret=%i)\n", |
457 | dma_private->irq, ret); | 458 | dma_private->irq, ret); |