From 4ff8d8daaa4f4b450e4dd7b08d9f07c922e76750 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Tue, 20 Mar 2012 11:47:36 +0200 Subject: [PATCH] --- yaml --- r: 307996 b: refs/heads/master c: ce37f5ea4b77171952aacd829e8f346b78191a7b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/omap/omap-mcbsp.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index f722d205e790..af781491e8ec 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 35d210faa17e46897771fcf0d78df7f952b0f9b0 +refs/heads/master: ce37f5ea4b77171952aacd829e8f346b78191a7b diff --git a/trunk/sound/soc/omap/omap-mcbsp.c b/trunk/sound/soc/omap/omap-mcbsp.c index 27144a67e5ec..1046083e90a0 100644 --- a/trunk/sound/soc/omap/omap-mcbsp.c +++ b/trunk/sound/soc/omap/omap-mcbsp.c @@ -138,13 +138,15 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream, if (mcbsp->pdata->buffer_size) { /* * Rule for the buffer size. We should not allow - * smaller buffer than the FIFO size to avoid underruns + * smaller buffer than the FIFO size to avoid underruns. + * This applies only for the playback stream. */ - snd_pcm_hw_rule_add(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_BUFFER_SIZE, - omap_mcbsp_hwrule_min_buffersize, - mcbsp, - SNDRV_PCM_HW_PARAM_CHANNELS, -1); + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + snd_pcm_hw_rule_add(substream->runtime, 0, + SNDRV_PCM_HW_PARAM_BUFFER_SIZE, + omap_mcbsp_hwrule_min_buffersize, + mcbsp, + SNDRV_PCM_HW_PARAM_CHANNELS, -1); /* Make sure, that the period size is always even */ snd_pcm_hw_constraint_step(substream->runtime, 0,