Re: [PATCH 1/5] ASoC: dwc: Fix bit clock rate in TDM mode
From: Maxim Kochetkov
Date: Mon Nov 09 2026 - 02:16:26 EST
06.11.2026 14:29, phucduc.bui@xxxxxxxxx wrote:
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
The bit clock is computed as rate * data_width * 2, which only fits
a two-slot I2S frame. Use rate * data_width * tdm_slots in TDM mode.
Fixes: 221acc16aee1 ("ASoC: dwc: Add TDM mode support")
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/dwc/dwc-i2s.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c
index dbda943cfaf3..9007ba1157ac 100644
--- a/sound/soc/dwc/dwc-i2s.c
+++ b/sound/soc/dwc/dwc-i2s.c
@@ -331,7 +331,10 @@ static int dw_i2s_hw_params(struct snd_pcm_substream *substream,
}
} else {
u32 bitclk = config->sample_rate *
- config->data_width * 2;
+ config->data_width * 2;
Should the identation be fixed in a separate commit? It is not related to TDM clock rate.
+ if (dev->tdm_slots)
+ bitclk = config->sample_rate *
+ config->data_width * dev->tdm_slots;
Reviewed-by: Maxim Kochetkov <fido_max@xxxxxxxx>