From 66b1acd00b403e9b45150076ed934e714bb73910 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 14 Apr 2023 22:37:02 +0200
Subject: [PATCH 336/463] 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 f66abf91aef6f..0b1308ee8b6e1 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.46.0

