diff options
author | John Grossman <johngro@google.com> | 2011-07-27 10:32:04 -0700 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-12-05 10:43:51 -0800 |
commit | eee45e50f65cfdaa1978a85c3daf2306f4562db8 (patch) | |
tree | 6f48b0a91d954ac40801f14e2a842ba7ae6e39c3 /sound/soc/omap/omap-pcm.c | |
parent | 7d7f546fade2ccaa07b110d4086f085ede0c7798 (diff) | |
download | kernel_samsung_espresso10-eee45e50f65cfdaa1978a85c3daf2306f4562db8.zip kernel_samsung_espresso10-eee45e50f65cfdaa1978a85c3daf2306f4562db8.tar.gz kernel_samsung_espresso10-eee45e50f65cfdaa1978a85c3daf2306f4562db8.tar.bz2 |
ASoC: omap-pcm: change decision to preallocate DMA buffers
This fixes a previous bad merge in which this change was lost.
Change-Id: Ie5884edb202e3dd4a1caaf45c19b39b4d693ae5f
Signed-off-by: Simon Wilson <simonwilson@google.com>
Diffstat (limited to 'sound/soc/omap/omap-pcm.c')
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 6a36196..a2a464f 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -391,7 +391,6 @@ static void omap_pcm_free_dma_buffers(struct snd_pcm *pcm) static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd) { struct snd_card *card = rtd->card->snd_card; - struct snd_soc_dai *dai = rtd->cpu_dai; struct snd_pcm *pcm = rtd->pcm; int ret = 0; @@ -400,14 +399,14 @@ static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd) if (!card->dev->coherent_dma_mask) card->dev->coherent_dma_mask = DMA_BIT_MASK(64); - if (dai->driver->playback.channels_min) { + if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) { ret = omap_pcm_preallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_PLAYBACK); if (ret) goto out; } - if (dai->driver->capture.channels_min) { + if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) { ret = omap_pcm_preallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_CAPTURE); if (ret) |