From: Axel Lin Date: Tue, 29 Nov 2011 11:47:38 +0000 (+0800) Subject: ASoC: cs42l73: Fix clear wrong bits in cs42l73_set_dai_fmt X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7b282cbbf3c7bbad20505761a9eadd6d9a7280c7;p=linux-beck.git ASoC: cs42l73: Fix clear wrong bits in cs42l73_set_dai_fmt What we want is to clear BIT[5:4](PCM_MODE_MASK) and BIT[3](PCM_BIT_ORDER) bits, but current code clears BIT[2:0]. Signed-off-by: Axel Lin Acked-by: Brian Austin Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index 9fd5de77cafb..da3125aa55f9 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c @@ -1024,7 +1024,8 @@ static int cs42l73_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) } if (spc & SPDIF_PCM) { - spc &= (31 << 3); /* Clear PCM mode, set MSB->LSB */ + /* Clear PCM mode, clear PCM_BIT_ORDER bit for MSB->LSB */ + spc &= ~(PCM_MODE_MASK | PCM_BIT_ORDER); switch (format) { case SND_SOC_DAIFMT_DSP_B: if (inv == SND_SOC_DAIFMT_IB_IF)