Skip to content

Commit

Permalink
ASoC: omap-mcbsp: fix snd_pcm_hw_rule_add arguments
Browse files Browse the repository at this point in the history
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: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
  • Loading branch information
Grazvydas Ignotas authored and Liam Girdwood committed Mar 12, 2012
1 parent 5788c62 commit 94a504c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/omap/omap-mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream,
* smaller buffer than the FIFO size to avoid underruns
*/
snd_pcm_hw_rule_add(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_CHANNELS,
SNDRV_PCM_HW_PARAM_BUFFER_SIZE,
omap_mcbsp_hwrule_min_buffersize,
mcbsp,
SNDRV_PCM_HW_PARAM_BUFFER_SIZE, -1);
SNDRV_PCM_HW_PARAM_CHANNELS, -1);

/* Make sure, that the period size is always even */
snd_pcm_hw_constraint_step(substream->runtime, 0,
Expand Down

0 comments on commit 94a504c

Please sign in to comment.