diff options
Diffstat (limited to 'sound/soc/omap/omap-mcbsp.c')
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 27144a67e5ec..1046083e90a0 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -138,13 +138,15 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream, | |||
138 | if (mcbsp->pdata->buffer_size) { | 138 | if (mcbsp->pdata->buffer_size) { |
139 | /* | 139 | /* |
140 | * Rule for the buffer size. We should not allow | 140 | * Rule for the buffer size. We should not allow |
141 | * smaller buffer than the FIFO size to avoid underruns | 141 | * smaller buffer than the FIFO size to avoid underruns. |
142 | * This applies only for the playback stream. | ||
142 | */ | 143 | */ |
143 | snd_pcm_hw_rule_add(substream->runtime, 0, | 144 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
144 | SNDRV_PCM_HW_PARAM_BUFFER_SIZE, | 145 | snd_pcm_hw_rule_add(substream->runtime, 0, |
145 | omap_mcbsp_hwrule_min_buffersize, | 146 | SNDRV_PCM_HW_PARAM_BUFFER_SIZE, |
146 | mcbsp, | 147 | omap_mcbsp_hwrule_min_buffersize, |
147 | SNDRV_PCM_HW_PARAM_CHANNELS, -1); | 148 | mcbsp, |
149 | SNDRV_PCM_HW_PARAM_CHANNELS, -1); | ||
148 | 150 | ||
149 | /* Make sure, that the period size is always even */ | 151 | /* Make sure, that the period size is always even */ |
150 | snd_pcm_hw_constraint_step(substream->runtime, 0, | 152 | snd_pcm_hw_constraint_step(substream->runtime, 0, |