]> Git Repo - J-linux.git/commitdiff
ASoC: fsl_esai: fix register setting issue in RIGHT_J mode
authorS.j. Wang <[email protected]>
Mon, 18 Feb 2019 08:29:11 +0000 (08:29 +0000)
committerMark Brown <[email protected]>
Tue, 19 Feb 2019 11:40:36 +0000 (11:40 +0000)
The ESAI_xCR_xWA is xCR's bit, not the xCCR's bit, driver set it to
wrong register, correct it.

Fixes 43d24e76b698 ("ASoC: fsl_esai: Add ESAI CPU DAI driver")
Cc: <[email protected]>
Signed-off-by: Shengjiu Wang <[email protected]>
Reviewed-by: Fabio Estevam <[email protected]>
Ackedy-by: Nicolin Chen <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
sound/soc/fsl/fsl_esai.c

index 57b484768a58f0e3d97a521c32d3215dd3ed5d41..afe67c865330e39c7b3d1b30bd6127dd764f42aa 100644 (file)
@@ -398,7 +398,8 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
                break;
        case SND_SOC_DAIFMT_RIGHT_J:
                /* Data on rising edge of bclk, frame high, right aligned */
-               xccr |= ESAI_xCCR_xCKP | ESAI_xCCR_xHCKP | ESAI_xCR_xWA;
+               xccr |= ESAI_xCCR_xCKP | ESAI_xCCR_xHCKP;
+               xcr  |= ESAI_xCR_xWA;
                break;
        case SND_SOC_DAIFMT_DSP_A:
                /* Data on rising edge of bclk, frame high, 1clk before data */
@@ -455,12 +456,12 @@ static int fsl_esai_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
                return -EINVAL;
        }
 
-       mask = ESAI_xCR_xFSL | ESAI_xCR_xFSR;
+       mask = ESAI_xCR_xFSL | ESAI_xCR_xFSR | ESAI_xCR_xWA;
        regmap_update_bits(esai_priv->regmap, REG_ESAI_TCR, mask, xcr);
        regmap_update_bits(esai_priv->regmap, REG_ESAI_RCR, mask, xcr);
 
        mask = ESAI_xCCR_xCKP | ESAI_xCCR_xHCKP | ESAI_xCCR_xFSP |
-               ESAI_xCCR_xFSD | ESAI_xCCR_xCKD | ESAI_xCR_xWA;
+               ESAI_xCCR_xFSD | ESAI_xCCR_xCKD;
        regmap_update_bits(esai_priv->regmap, REG_ESAI_TCCR, mask, xccr);
        regmap_update_bits(esai_priv->regmap, REG_ESAI_RCCR, mask, xccr);
 
This page took 0.059847 seconds and 4 git commands to generate.