diff options
author | Mark Brown <broonie@kernel.org> | 2024-06-21 13:17:21 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-06-21 13:17:21 +0100 |
commit | de7a09dec4b90a7f92b1ebcdfeed69400b5079f4 (patch) | |
tree | 733d2f51b62d8d8213739d54d87fb1b4f2415b94 /sound/soc/rockchip | |
parent | ae8fc2948b48f001514d4b73167fcef3b398a5fb (diff) | |
parent | 90f3feb24172185f1832636264943e8b5e289245 (diff) | |
download | linux-de7a09dec4b90a7f92b1ebcdfeed69400b5079f4.tar.gz linux-de7a09dec4b90a7f92b1ebcdfeed69400b5079f4.tar.bz2 linux-de7a09dec4b90a7f92b1ebcdfeed69400b5079f4.zip |
ASoC: Merge up fixes
We need some of the AMD fixes as a base for new work.
Diffstat (limited to 'sound/soc/rockchip')
-rw-r--r-- | sound/soc/rockchip/rockchip_i2s_tdm.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/soc/rockchip/rockchip_i2s_tdm.c b/sound/soc/rockchip/rockchip_i2s_tdm.c index 9fa020ef7eab..ee517d7b5b7b 100644 --- a/sound/soc/rockchip/rockchip_i2s_tdm.c +++ b/sound/soc/rockchip/rockchip_i2s_tdm.c @@ -655,8 +655,17 @@ static int rockchip_i2s_tdm_hw_params(struct snd_pcm_substream *substream, int err; if (i2s_tdm->is_master_mode) { - struct clk *mclk = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? - i2s_tdm->mclk_tx : i2s_tdm->mclk_rx; + struct clk *mclk; + + if (i2s_tdm->clk_trcm == TRCM_TX) { + mclk = i2s_tdm->mclk_tx; + } else if (i2s_tdm->clk_trcm == TRCM_RX) { + mclk = i2s_tdm->mclk_rx; + } else if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { + mclk = i2s_tdm->mclk_tx; + } else { + mclk = i2s_tdm->mclk_rx; + } err = clk_set_rate(mclk, DEFAULT_MCLK_FS * params_rate(params)); if (err) |