Skip to content

Commit ad68c05

Browse files
committed
ASoC: fsl: correct the bit order issue for DSD
Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>: The DSD little endian format requires the msb first, the previous understanding is not correct. The issue is found by testing with pipewire.
2 parents a35551a + ba3a5e1 commit ad68c05

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

sound/soc/fsl/fsl_micfil.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static struct fsl_micfil_soc_data fsl_micfil_imx943 = {
131131
.fifos = 8,
132132
.fifo_depth = 32,
133133
.dataline = 0xf,
134-
.formats = SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_DSD_U32_BE,
134+
.formats = SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_DSD_U32_LE,
135135
.use_edma = true,
136136
.use_verid = true,
137137
.volume_sx = false,
@@ -823,7 +823,7 @@ static int fsl_micfil_hw_params(struct snd_pcm_substream *substream,
823823
break;
824824
}
825825

826-
if (format == SNDRV_PCM_FORMAT_DSD_U32_BE) {
826+
if (format == SNDRV_PCM_FORMAT_DSD_U32_LE) {
827827
micfil->dec_bypass = true;
828828
/*
829829
* According to equation 29 in RM:

sound/soc/fsl/fsl_sai.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ static int fsl_sai_set_dai_fmt_tr(struct snd_soc_dai *cpu_dai,
353353
break;
354354
case SND_SOC_DAIFMT_PDM:
355355
val_cr2 |= FSL_SAI_CR2_BCP;
356-
val_cr4 &= ~FSL_SAI_CR4_MF;
357356
sai->is_pdm_mode = true;
358357
break;
359358
case SND_SOC_DAIFMT_RIGHT_J:
@@ -638,7 +637,7 @@ static int fsl_sai_hw_params(struct snd_pcm_substream *substream,
638637
val_cr5 |= FSL_SAI_CR5_WNW(slot_width);
639638
val_cr5 |= FSL_SAI_CR5_W0W(slot_width);
640639

641-
if (sai->is_lsb_first || sai->is_pdm_mode)
640+
if (sai->is_lsb_first)
642641
val_cr5 |= FSL_SAI_CR5_FBT(0);
643642
else
644643
val_cr5 |= FSL_SAI_CR5_FBT(word_width - 1);

0 commit comments

Comments
 (0)