Skip to content

Commit d9fbe5b

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: fsl_sai: fix bit order for DSD format
The DSD little endian format requires the msb first, because oldest bit is in msb. found this issue by testing with pipewire. Fixes: c111c2d ("ASoC: fsl_sai: Add PDM daifmt support") Signed-off-by: Shengjiu Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 211ddde commit d9fbe5b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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)