From: Peter Ujfalusi Date: Wed, 18 Jan 2012 11:18:23 +0000 (+0100) Subject: ASoC: omap-dmic: Use core to set the msbits constraint X-Git-Tag: v3.4-rc1~88^2^2~64 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7df6f2551f2255f55adab7338a3a1e6594a12f63;p=karo-tx-linux.git ASoC: omap-dmic: Use core to set the msbits constraint Core can set the msbits constraint in behalf of the dai. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown --- diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c index 0855c1cfa7fd..4dcb5a7e40e8 100644 --- a/sound/soc/omap/omap-dmic.c +++ b/sound/soc/omap/omap-dmic.c @@ -113,12 +113,10 @@ static int omap_dmic_dai_startup(struct snd_pcm_substream *substream, mutex_lock(&dmic->mutex); - if (!dai->active) { - snd_pcm_hw_constraint_msbits(substream->runtime, 0, 32, 24); + if (!dai->active) dmic->active = 1; - } else { + else ret = -EBUSY; - } mutex_unlock(&dmic->mutex); @@ -445,6 +443,7 @@ static struct snd_soc_dai_driver omap_dmic_dai = { .channels_max = 6, .rates = SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_192000, .formats = SNDRV_PCM_FMTBIT_S32_LE, + .sig_bits = 24, }, .ops = &omap_dmic_dai_ops, };