diff options
| author | Misael Lopez Cruz <misael.lopez@ti.com> | 2011-05-31 09:23:20 +0100 |
|---|---|---|
| committer | Andy Green <andy.green@linaro.org> | 2011-05-31 11:04:48 +0100 |
| commit | 89dd14d8cdba12648049096310d82bce387e2134 (patch) | |
| tree | 04623b46b1304ba4503dc6f062247d65c443b6e0 /sound | |
| parent | ff4025fce84ade2739eb49770d1d89cdf03bc6d5 (diff) | |
ASoC: OMAP4: Add buffer size contrainst for ABE and HDMI
ABE needs a step size of 24 * 4, whilst HDMI requires a step size
of 32 * 4 bits. These constraints are only applicable for OMAP4.
Change-Id: I338f207816ef6c165ffb06dc8c346b29969ef4ee
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/soc/omap/omap-pcm.c | 10 |
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; |
