From ba129dcdbd8f2812e9592a77e37a39bfcf610d4e Mon Sep 17 00:00:00 2001 From: Xing Zheng Date: Fri, 7 Aug 2020 10:11:56 +0800 Subject: [PATCH] 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 Change-Id: I4f5b9229c599344477990ab80bce7edfc6d25b45 --- sound/soc/generic/simple-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 64bf3560c1d1..3da9cd6b5db8 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -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;