diff options
author | Liam Girdwood <lrg@ti.com> | 2011-07-24 20:59:47 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-08-25 07:38:07 +0100 |
commit | 56bcc8d079d6057d2db86a99ca2b46afc0db3de9 (patch) | |
tree | cd8b5e69d93be4de786d07ebf8b64681b1f103e6 /sound | |
parent | f433ee87139564f5c9695347eb02d18bfb45482b (diff) |
Subject: [PATCH 084/104] ASoC: OMAP4 - set constraints for buffer size (fixme)
To be moved to DAI drivers.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index b2f5751edae..4e6fef29b51 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -280,6 +280,15 @@ static int omap_pcm_open(struct snd_pcm_substream *substream) 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) { |