diff options
author | Ricardo Neri <ricardo.neri@ti.com> | 2011-04-07 08:44:23 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-04-07 08:44:23 +0100 |
commit | 8877bb03422d6e764a3ea12d9fbc2d4f4806bf01 (patch) | |
tree | d820a9b9f1387a0f679627058ddd457b8f804ee1 | |
parent | 9858d8c3faa34a8d8ca482bc12d0a9d933fa6be9 (diff) |
ASoC: OMAP: Relocate BUFFER_BYTES constraint to ABE
The constraint in BUFFER_BYTES in omap-pcm is moved to omap-abe.
This constraint was put in omap-pcm to cater the DMA boundaries of
omap-hdmi and omap-abe DAIs. Now, each DAI handles their own
constraints separately.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
-rw-r--r-- | sound/soc/omap/omap-abe.c | 6 | ||||
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 10 |
2 files changed, 6 insertions, 10 deletions
diff --git a/sound/soc/omap/omap-abe.c b/sound/soc/omap/omap-abe.c index 79dd724ccb5..ded9194efd8 100644 --- a/sound/soc/omap/omap-abe.c +++ b/sound/soc/omap/omap-abe.c @@ -549,6 +549,12 @@ static int omap_abe_dai_startup(struct snd_pcm_substream *substream, dev_dbg(dai->dev, "%s: frontend %s %d\n", __func__, rtd->dai_link->name, dai->id); + /* ABE needs a step of 24 * 4 data bytes */ + ret = snd_pcm_hw_constraint_step(substream->runtime, 0, + SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 96); + if (ret < 0) + return ret; + mutex_lock(&fe_mutex); /* only startup BE DAIs that are either sinks or sources to this FE DAI */ diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 6ca5d611224..b27d68009f6 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -280,16 +280,6 @@ 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; |