]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - sound/soc/samsung/dma.c
Merge tag 'to-linus' of git://github.com/rustyrussell/linux
[karo-tx-linux.git] / sound / soc / samsung / dma.c
index 797c3d5e79e5a71d44fa07b246e0d851bc902d81..427ae0d9817bb95cb09fbab000d6a2d0a35d32c8 100644 (file)
@@ -403,7 +403,6 @@ static u64 dma_mask = DMA_BIT_MASK(32);
 static int dma_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;
 
@@ -414,14 +413,14 @@ static int dma_new(struct snd_soc_pcm_runtime *rtd)
        if (!card->dev->coherent_dma_mask)
                card->dev->coherent_dma_mask = 0xffffffff;
 
-       if (dai->driver->playback.channels_min) {
+       if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
                ret = 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 = preallocate_dma_buffer(pcm,
                        SNDRV_PCM_STREAM_CAPTURE);
                if (ret)