HACK-TO-REVERT: ASoC: simple-card: using clk_id to judge stream

The clk_id is not used on rockchip platform, and there are
mclk_tx and mclk_rx on rockchip i2s driver, so we need to
use clk_id to stream to judge whether is playback or capture
now.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I4f5b9229c599344477990ab80bce7edfc6d25b45
This commit is contained in:
Xing Zheng
2020-08-07 10:11:56 +08:00
committed by Tao Huang
parent f8373b4e3e
commit ba129dcdbd

View File

@@ -108,12 +108,12 @@ static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
if (ret < 0)
return ret;
ret = snd_soc_dai_set_sysclk(codec_dai, 0, mclk,
ret = snd_soc_dai_set_sysclk(codec_dai, substream->stream, mclk,
SND_SOC_CLOCK_IN);
if (ret && ret != -ENOTSUPP)
goto err;
ret = snd_soc_dai_set_sysclk(cpu_dai, 0, mclk,
ret = snd_soc_dai_set_sysclk(cpu_dai, substream->stream, mclk,
SND_SOC_CLOCK_OUT);
if (ret && ret != -ENOTSUPP)
goto err;