summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@slimlogic.co.uk>2011-05-31 09:22:58 +0100
committerAndy Green <andy.green@linaro.org>2011-05-31 11:04:30 +0100
commitaca514c08a9b83a0519569e9416cb1d473d77a1c (patch)
tree12ae0ce77bf2779aa059c80b80dae62eaece6e4a /sound
parent6f12d1a9fc157dd659b1ecf9715662ad94d91404 (diff)
ASoC: OMAP4: Disable constraints temporarily
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 <lrg@slimlogic.co.uk> 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/codecs/twl6040.c4
-rw-r--r--sound/soc/omap/omap-mcbsp.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index f4496866313..f7795846237 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 a88a0bf9a3e..ac89aec9f0e 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;