From 94c4d5801719d6f6bdfb72334af1bff740299918 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Mon, 14 Feb 2011 07:12:08 -0600 Subject: [PATCH 22/60] ASoC: OMAP4: Disable constraints temporarily commit 71bec70a1152751c159a77062fc4e674f5715cff upstream Disable constraints in OMAP4 audio drivers temporarily. It's required for now as backends need to define their own constraints. Change-Id: I943589c1417ebd7690d08dbda1edf17bb2609f3b Signed-off-by: Liam Girdwood Signed-off-by: Margarita Olaya Cabrera Signed-off-by: Misael Lopez Cruz Integrated-by: Jingdong Lu --- sound/soc/codecs/twl6040.c | 4 ++++ sound/soc/omap/omap-mcbsp.c | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index dedf4db..d8caf06 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -1282,13 +1282,17 @@ static struct snd_pcm_hw_constraint_list hp_constraints = { static int twl6040_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { + /* TODO: Add constraint for backends */ +#if 0 struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_codec *codec = rtd->codec; + struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); snd_pcm_hw_constraint_list(substream->runtime, 0, SNDRV_PCM_HW_PARAM_RATE, priv->sysclk_constraints); +#endif return 0; } diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 4b82290..b044777 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -102,6 +102,7 @@ static void omap_mcbsp_set_threshold(struct snd_pcm_substream *substream) omap_mcbsp_set_rx_threshold(mcbsp_data->bus_id, words); } +#if 0 static int omap_mcbsp_hwrule_min_buffersize(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule) { @@ -120,6 +121,7 @@ static int omap_mcbsp_hwrule_min_buffersize(struct snd_pcm_hw_params *params, frames.integer = 1; return snd_interval_refine(buffer_size, &frames); } +#endif static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) @@ -151,6 +153,7 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream, * Rule for the buffer size. We should not allow * smaller buffer than the FIFO size to avoid underruns */ +#if 0 // FIXME: All BE must support hw_rules and constraints */ snd_pcm_hw_rule_add(substream->runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, omap_mcbsp_hwrule_min_buffersize, @@ -160,6 +163,7 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream, /* Make sure, that the period size is always even */ snd_pcm_hw_constraint_step(substream->runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 2); +#endif } return err; -- 1.7.4.1