Skip to content

Commit 5aef1ff

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: fsl_sai: Fix value of FSL_SAI_CR1_RFW_MASK
The fifo_depth is 64 on i.MX8QM/i.MX8QXP, 128 on i.MX8MQ, 16 on i.MX7ULP. Original FSL_SAI_CR1_RFW_MASK value 0x1F is not suitable for these platform, the FIFO watermark mask should be updated according to the fifo_depth. Fixes: a860fac ("ASoC: fsl_sai: Add support for imx7ulp/imx8mq") Signed-off-by: Shengjiu Wang <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent da3f23f commit 5aef1ff

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

sound/soc/fsl/fsl_sai.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,10 +680,11 @@ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai)
680680
regmap_write(sai->regmap, FSL_SAI_RCSR(ofs), 0);
681681

682682
regmap_update_bits(sai->regmap, FSL_SAI_TCR1(ofs),
683-
FSL_SAI_CR1_RFW_MASK,
683+
FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth),
684684
sai->soc_data->fifo_depth - FSL_SAI_MAXBURST_TX);
685685
regmap_update_bits(sai->regmap, FSL_SAI_RCR1(ofs),
686-
FSL_SAI_CR1_RFW_MASK, FSL_SAI_MAXBURST_RX - 1);
686+
FSL_SAI_CR1_RFW_MASK(sai->soc_data->fifo_depth),
687+
FSL_SAI_MAXBURST_RX - 1);
687688

688689
snd_soc_dai_init_dma_data(cpu_dai, &sai->dma_params_tx,
689690
&sai->dma_params_rx);

sound/soc/fsl/fsl_sai.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
#define FSL_SAI_CSR_FRDE BIT(0)
9595

9696
/* SAI Transmit and Receive Configuration 1 Register */
97-
#define FSL_SAI_CR1_RFW_MASK 0x1f
97+
#define FSL_SAI_CR1_RFW_MASK(x) ((x) - 1)
9898

9999
/* SAI Transmit and Receive Configuration 2 Register */
100100
#define FSL_SAI_CR2_SYNC BIT(30)

0 commit comments

Comments
 (0)