Skip to content

Commit 89339d8

Browse files
committed
Merge tag 'asoc-fix-v7.0-rockchip-i2s-tdm' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Additional Rockchip fix for v7.0 One more ASoC fix, for a regression with the Rockchip I2S TDM support on a number of platforms.
2 parents d08008f + 0783052 commit 89339d8

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

sound/soc/rockchip/rockchip_i2s_tdm.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#define DRV_NAME "rockchip-i2s-tdm"
2424

25+
#define DEFAULT_MCLK_FS 256
2526
#define CH_GRP_MAX 4 /* The max channel 8 / 2 */
2627
#define MULTIPLEX_CH_MAX 10
2728

@@ -665,6 +666,15 @@ static int rockchip_i2s_tdm_hw_params(struct snd_pcm_substream *substream,
665666
mclk_rate = i2s_tdm->mclk_rx_freq;
666667
}
667668

669+
/*
670+
* When the dai/component driver doesn't need to set mclk-fs for a specific
671+
* clock, it can skip the call to set_sysclk() for that clock.
672+
* In that case, simply use the clock rate from the params and multiply it by
673+
* the default mclk-fs value.
674+
*/
675+
if (!mclk_rate)
676+
mclk_rate = DEFAULT_MCLK_FS * params_rate(params);
677+
668678
err = clk_set_rate(mclk, mclk_rate);
669679
if (err)
670680
return err;

0 commit comments

Comments
 (0)