Commit 94a504c2 authored by Grazvydas Ignotas's avatar Grazvydas Ignotas Committed by Liam Girdwood

ASoC: omap-mcbsp: fix snd_pcm_hw_rule_add arguments

We are setting SNDRV_PCM_HW_PARAM_BUFFER_SIZE based on
SNDRV_PCM_HW_PARAM_CHANNELS, not vice versa. This bug didn't
have much impact because the rules are evaluated multiple times
by the core, and intended value got set eventually.
Signed-off-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@ti.com>
parent 5788c62e
...@@ -142,10 +142,10 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream, ...@@ -142,10 +142,10 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream,
* smaller buffer than the FIFO size to avoid underruns * smaller buffer than the FIFO size to avoid underruns
*/ */
snd_pcm_hw_rule_add(substream->runtime, 0, snd_pcm_hw_rule_add(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_CHANNELS, SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
omap_mcbsp_hwrule_min_buffersize, omap_mcbsp_hwrule_min_buffersize,
mcbsp, mcbsp,
SNDRV_PCM_HW_PARAM_BUFFER_SIZE, -1); SNDRV_PCM_HW_PARAM_CHANNELS, -1);
/* Make sure, that the period size is always even */ /* Make sure, that the period size is always even */
snd_pcm_hw_constraint_step(substream->runtime, 0, snd_pcm_hw_constraint_step(substream->runtime, 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment