summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeven Lee <wtli@nuvoton.com>2023-09-13 14:40:03 +0800
committerMark Brown <broonie@kernel.org>2023-09-13 18:53:00 +0100
commit8885ab34201c5c34a82539ba2753e8e743b38f38 (patch)
treea2f2c6a4ef168d1dec2aec162a7ada2edce2501f
parent67a810b6f37a7805474add2d003034a288b94fa4 (diff)
ASoC: nau8821: Revise MICBIAS control for power saving.
The patch helps save power by control MICBIAS. The headset's MICBIAS should be disabled without button requirement. Signed-off-by: Seven Lee <wtli@nuvoton.com> Link: https://lore.kernel.org/r/20230913064003.2925997-1-wtli@nuvoton.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/nau8821.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c
index f307374834b55..6e1b6b26298ae 100644
--- a/sound/soc/codecs/nau8821.c
+++ b/sound/soc/codecs/nau8821.c
@@ -1136,6 +1136,9 @@ static void nau8821_jdet_work(struct work_struct *work)
NAU8821_R12_INTERRUPT_DIS_CTRL,
NAU8821_IRQ_KEY_RELEASE_DIS |
NAU8821_IRQ_KEY_PRESS_DIS, 0);
+ } else {
+ snd_soc_component_disable_pin(component, "MICBIAS");
+ snd_soc_dapm_sync(nau8821->dapm);
}
} else {
dev_dbg(nau8821->dev, "Headphone connected\n");