From ae5e3e5b964af4591fb13a1503335605220be8b4 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 14 Apr 2023 22:37:02 +0200
Subject: [PATCH 357/480] 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 bc1b59994deb..0bbf1b270939 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -427,6 +427,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.49.0

