summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy.green@linaro.org>2011-04-13 11:31:58 +0100
committerAndy Green <andy.green@linaro.org>2011-04-13 11:31:58 +0100
commita8fbc2b20dc0f8fa606983d74499028e8189e629 (patch)
tree570705448341bddf62e8509d4a0c4b78a1830471
parent8c314f19385e69dd9d43e6988b6a405fc4d5fd27 (diff)
alsa soc implement abe constraint test
Signed-off-by: Andy Green <andy.green@linaro.org>
-rw-r--r--sound/soc/omap/omap-pcm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index b27d68009f6..6ca5d611224 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -280,6 +280,16 @@ static int omap_pcm_open(struct snd_pcm_substream *substream)
if (ret < 0)
goto out;
+ if (cpu_is_omap44xx()) {
+ /* ABE needs a step of 24 * 4 data bits, and HDMI 32 * 4
+ * Ensure buffer size satisfies both constraints.
+ */
+ ret = snd_pcm_hw_constraint_step(runtime, 0,
+ SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 384);
+ if (ret < 0)
+ goto out;
+ }
+
prtd = kzalloc(sizeof(*prtd), GFP_KERNEL);
if (prtd == NULL) {
ret = -ENOMEM;