Commit bf564ea9 authored by Mark Brown's avatar Mark Brown

Merge branch 'for-3.0' into for-3.1

parents 147dfe90 0cd114ff
...@@ -680,20 +680,25 @@ static struct snd_soc_dai_ops wm8804_dai_ops = { ...@@ -680,20 +680,25 @@ static struct snd_soc_dai_ops wm8804_dai_ops = {
#define WM8804_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ #define WM8804_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
SNDRV_PCM_FMTBIT_S24_LE) SNDRV_PCM_FMTBIT_S24_LE)
#define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \
SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | \
SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000)
static struct snd_soc_dai_driver wm8804_dai = { static struct snd_soc_dai_driver wm8804_dai = {
.name = "wm8804-spdif", .name = "wm8804-spdif",
.playback = { .playback = {
.stream_name = "Playback", .stream_name = "Playback",
.channels_min = 2, .channels_min = 2,
.channels_max = 2, .channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_192000, .rates = WM8804_RATES,
.formats = WM8804_FORMATS, .formats = WM8804_FORMATS,
}, },
.capture = { .capture = {
.stream_name = "Capture", .stream_name = "Capture",
.channels_min = 2, .channels_min = 2,
.channels_max = 2, .channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_192000, .rates = WM8804_RATES,
.formats = WM8804_FORMATS, .formats = WM8804_FORMATS,
}, },
.ops = &wm8804_dai_ops, .ops = &wm8804_dai_ops,
......
...@@ -312,7 +312,7 @@ static int fsl_dma_new(struct snd_soc_pcm_runtime *rtd) ...@@ -312,7 +312,7 @@ static int fsl_dma_new(struct snd_soc_pcm_runtime *rtd)
* should allocate a DMA buffer only for the streams that are valid. * should allocate a DMA buffer only for the streams that are valid.
*/ */
if (dai->driver->playback.channels_min) { if (pcm->streams[0].substream) {
ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev,
fsl_dma_hardware.buffer_bytes_max, fsl_dma_hardware.buffer_bytes_max,
&pcm->streams[0].substream->dma_buffer); &pcm->streams[0].substream->dma_buffer);
...@@ -322,13 +322,13 @@ static int fsl_dma_new(struct snd_soc_pcm_runtime *rtd) ...@@ -322,13 +322,13 @@ static int fsl_dma_new(struct snd_soc_pcm_runtime *rtd)
} }
} }
if (dai->driver->capture.channels_min) { if (pcm->streams[1].substream) {
ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev,
fsl_dma_hardware.buffer_bytes_max, fsl_dma_hardware.buffer_bytes_max,
&pcm->streams[1].substream->dma_buffer); &pcm->streams[1].substream->dma_buffer);
if (ret) { if (ret) {
snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer);
dev_err(card->dev, "can't alloc capture dma buffer\n"); dev_err(card->dev, "can't alloc capture dma buffer\n");
snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer);
return ret; return ret;
} }
} }
...@@ -451,7 +451,8 @@ static int fsl_dma_open(struct snd_pcm_substream *substream) ...@@ -451,7 +451,8 @@ static int fsl_dma_open(struct snd_pcm_substream *substream)
dma_private->ld_buf_phys = ld_buf_phys; dma_private->ld_buf_phys = ld_buf_phys;
dma_private->dma_buf_phys = substream->dma_buffer.addr; dma_private->dma_buf_phys = substream->dma_buffer.addr;
ret = request_irq(dma_private->irq, fsl_dma_isr, 0, "DMA", dma_private); ret = request_irq(dma_private->irq, fsl_dma_isr, 0, "fsldma-audio",
dma_private);
if (ret) { if (ret) {
dev_err(dev, "can't register ISR for IRQ %u (ret=%i)\n", dev_err(dev, "can't register ISR for IRQ %u (ret=%i)\n",
dma_private->irq, ret); dma_private->irq, ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment