ASoC: OMAP4 - set constraints for buffer size (fixme)

To be moved to DAI drivers.

Signed-off-by: Liam Girdwood <lrg@ti.com>
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index b2f5751..4e6fef2 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -280,6 +280,15 @@
 					    SNDRV_PCM_HW_PARAM_PERIODS);
 	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) {