Skip to content

Commit 72aa62b

Browse files
Xiubo Libroonie
authored andcommitted
ASoC: fsl_sai: fix the endianess for SAI fifo data.
Revert the SAI's endianess for fifo data to/from DMA engine. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
1 parent 496a39d commit 72aa62b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎sound/soc/fsl/fsl_sai.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
138138
val_cr4 = sai_readl(sai, sai->base + reg_cr4);
139139

140140
if (sai->big_endian_data)
141-
val_cr4 |= FSL_SAI_CR4_MF;
142-
else
143141
val_cr4 &= ~FSL_SAI_CR4_MF;
142+
else
143+
val_cr4 |= FSL_SAI_CR4_MF;
144144

145145
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
146146
case SND_SOC_DAIFMT_I2S:
@@ -251,9 +251,9 @@ static int fsl_sai_hw_params(struct snd_pcm_substream *substream,
251251

252252
val_cr5 &= ~FSL_SAI_CR5_FBT_MASK;
253253
if (sai->big_endian_data)
254-
val_cr5 |= FSL_SAI_CR5_FBT(word_width - 1);
255-
else
256254
val_cr5 |= FSL_SAI_CR5_FBT(0);
255+
else
256+
val_cr5 |= FSL_SAI_CR5_FBT(word_width - 1);
257257

258258
val_cr4 |= FSL_SAI_CR4_FRSZ(channels);
259259
val_mr = ~0UL - ((1 << channels) - 1);

0 commit comments

Comments
 (0)