diff options
author | Liam Girdwood <lrg@ti.com> | 2011-02-03 18:15:17 +0000 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-06-14 10:06:58 -0700 |
commit | 7be655b8a6b6274bfe115b38840d7eba07888429 (patch) | |
tree | 9d19a5e421afcf0f5776dcad40d3d60c7514e988 /sound/soc/omap/omap-pcm.c | |
parent | f9a7d6859cb9680106a429a75aaf2c4b0116fca8 (diff) | |
download | kernel_samsung_espresso10-7be655b8a6b6274bfe115b38840d7eba07888429.zip kernel_samsung_espresso10-7be655b8a6b6274bfe115b38840d7eba07888429.tar.gz kernel_samsung_espresso10-7be655b8a6b6274bfe115b38840d7eba07888429.tar.bz2 |
ASoC: OMAP4 - set constraints for buffer size
ABE needs a buffer size in steps of 24 * 4 data bits. HDMI requires
steps of 32 * 4. Ensure buffer size satisfies both constraints.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/omap/omap-pcm.c')
-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 b2f5751..4e6fef2 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) { |