build/patch/kernel/archive/sunxi-5.15/patches.megous/sound-soc-ac100-Make-sure-we-shutdown-the-audio-outputs-on-rebo.patch

46 lines
1.5 KiB
Diff

From f3a5ae9128a29ba55fdcb158c15b2fa76d67e4bd Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Tue, 11 Feb 2020 14:34:13 +0100
Subject: [PATCH 405/478] sound: soc: ac100: Make sure we shutdown the audio
outputs on reboot
There will also be a need to disable ADC clock to avoid ldoin leakage current.
Signed-off-by: Ondrej Jirman <megous@megous.com>
---
sound/soc/sunxi/ac100-codec.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sound/soc/sunxi/ac100-codec.c b/sound/soc/sunxi/ac100-codec.c
index f4d7fcc8ce7e..df18b0afcc62 100644
--- a/sound/soc/sunxi/ac100-codec.c
+++ b/sound/soc/sunxi/ac100-codec.c
@@ -918,6 +918,16 @@ static const struct snd_soc_dapm_route ac100_codec_routes[] = {
{ "LINEOUT", NULL, "Line Out" },
};
+static int ac100_codec_set_bias_level(struct snd_soc_component *component,
+ enum snd_soc_bias_level level)
+{
+ if (level == SND_SOC_BIAS_OFF) {
+ pr_err("XX: idle bias off\n");
+ }
+
+ return 0;
+}
+
static const struct snd_soc_component_driver ac100_codec_analog_cmpnt_drv = {
.controls = ac100_codec_controls,
.num_controls = ARRAY_SIZE(ac100_codec_controls),
@@ -925,6 +935,7 @@ static const struct snd_soc_component_driver ac100_codec_analog_cmpnt_drv = {
.num_dapm_widgets = ARRAY_SIZE(ac100_codec_widgets),
.dapm_routes = ac100_codec_routes,
.num_dapm_routes = ARRAY_SIZE(ac100_codec_routes),
+ .set_bias_level = ac100_codec_set_bias_level,
};
static int ac100_codec_probe(struct platform_device *pdev)
--
2.35.3