summaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/omap-mcbsp.c
diff options
context:
space:
mode:
authorGrazvydas Ignotas <notasas@gmail.com>2012-03-09 01:19:15 +0200
committerLiam Girdwood <lrg@ti.com>2012-03-12 13:34:24 +0000
commit94a504c2e059fb88f05ede6d614504779275b099 (patch)
treed371d36dc2ddf259e18f7f768708dc5c0b5245c3 /sound/soc/omap/omap-mcbsp.c
parent5788c62e72b8484836ae6587c7fb65757a777a3a (diff)
downloadlinux-94a504c2e059fb88f05ede6d614504779275b099.tar.bz2
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: 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>
Diffstat (limited to 'sound/soc/omap/omap-mcbsp.c')
-rw-r--r--sound/soc/omap/omap-mcbsp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 626e2d6db20e..6912ac7cb625 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -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,