From bd7cc07158f051084ae99c93b34b22b445a06d5a Mon Sep 17 00:00:00 2001 From: Xing Zheng Date: Sat, 8 Oct 2022 22:10:07 +0800 Subject: [PATCH] ASoC: rockchip: rk817-codec: do power down list without playback and capture Change-Id: Iba2b6ccd6ca5d27f855c10e30a077cb657bf0bc8 Signed-off-by: Xing Zheng --- sound/soc/codecs/rk817_codec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/rk817_codec.c b/sound/soc/codecs/rk817_codec.c index b630895701f0..da9d4fdc7b0b 100644 --- a/sound/soc/codecs/rk817_codec.c +++ b/sound/soc/codecs/rk817_codec.c @@ -699,8 +699,11 @@ static int rk817_capture_path_config(struct snd_soc_component *component, switch (rk817->capture_path) { case MIC_OFF: - if (pre_path != MIC_OFF) + if (pre_path != MIC_OFF) { rk817_codec_power_down(component, RK817_CODEC_CAPTURE); + if (rk817->playback_path == OFF) + rk817_codec_power_down(component, RK817_CODEC_ALL); + } break; case MAIN_MIC: if (pre_path == MIC_OFF)