ASoC: omap-mcbsp: fix start_threshold hack
authorGrazvydas Ignotas <notasas@gmail.com>
Thu, 10 May 2012 23:16:09 +0000 (02:16 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 13 May 2012 14:38:11 +0000 (17:38 +0300)
should only apply to playback streams..

sound/soc/omap/omap-mcbsp.c

index 569b258..f7ee0e8 100644 (file)
@@ -614,6 +614,9 @@ static int omap_mcbsp_dai_prepare(struct snd_pcm_substream *substream,
        struct snd_pcm_runtime *runtime = substream->runtime;
        int size;
 
+       if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK)
+               return 0;
+
        size = omap_mcbsp_get_fifo_size(mcbsp_data->bus_id);
        size /= substream->runtime->channels;