build/patch/kernel/archive/sunxi-6.4/patches.megous/ASoC-codecs-rt5640-Allow-to-control-single-ended-differential-m.patch

33 lines
1.2 KiB
Diff
Raw Permalink Normal View History

From ba81d39220a3cbe52f91ff7cf4dcea3a9d2c7f2a Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 14 Apr 2023 22:37:02 +0200
Subject: [PATCH 385/469] ASoC: codecs: rt5640: Allow to control
single-ended/differential mode
Not for upstream. This is useful for debugging, trying things without
having to modify DT.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
sound/soc/codecs/rt5640.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 03d010792e9c..a6defcba87ec 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -429,6 +429,10 @@ static const struct snd_kcontrol_new rt5640_snd_controls[] = {
SOC_SINGLE_TLV("RECMIXR BST1 Gain", RT5640_REC_R2_MIXER, 13, 6, 1, rec_gain_tlv),
SOC_SINGLE_TLV("RECMIXR OUTMIXR Gain", RT5640_REC_R2_MIXER, 10, 6, 1, rec_gain_tlv),
+ SOC_SINGLE("IN3 Differential Mode", RT5640_IN1_IN2, 6, 1, 0),
+ SOC_SINGLE("IN2 Differential Mode", RT5640_IN3_IN4, 6, 1, 0),
+ SOC_SINGLE("LOUT Differential Mode", 0xfa, 14, 1, 0),
+
/* INL/INR Volume Control */
SOC_DOUBLE_TLV("IN Capture Volume", RT5640_INL_INR_VOL,
RT5640_INL_VOL_SFT, RT5640_INR_VOL_SFT,
--
2.34.1