diff mbox series

[3/3] ASoC: cs4265: Add a SPDIF enable actl

Message ID 20180826225511.13619-3-flatmax@flatmax.com (mailing list archive)
State New, archived
Headers show
Series [1/3] ASoC: cs4265: SOC_SINGLE register value error fix | expand

Commit Message

Matt Flax Aug. 26, 2018, 10:55 p.m. UTC
From: Matt Flax <flatmax@flatmax.org>

This patch adds a SPDIF enable/disable toggle switch to the
sound controls.

Signed-off-by: Matt Flax <flatmax@flatmax.org>
---
 sound/soc/codecs/cs4265.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c
index 17d7e6f0..cdfcca9c 100644
--- a/sound/soc/codecs/cs4265.c
+++ b/sound/soc/codecs/cs4265.c
@@ -112,6 +112,13 @@  static const char * const cam_mono_stereo_text[] = {
 static SOC_ENUM_SINGLE_DECL(spdif_mono_stereo_enum, CS4265_SPDIF_CTL2, 2,
 		cam_mono_stereo_text);
 
+static const char * const spdif_enable_text[] = {
+	"Enabled", "Disabled"
+};
+
+static SOC_ENUM_SINGLE_DECL(spdif_enable_enum, CS4265_SPDIF_CTL2, 5,
+		spdif_enable_text);
+
 static const char * const mono_select_text[] = {
 	"Channel A", "Channel B"
 };
@@ -151,6 +158,7 @@  static const struct snd_kcontrol_new cs4265_snd_controls[] = {
 				1, 1),
 	SOC_SINGLE("ADC Soft Ramp Switch", CS4265_ADC_CTL2, 7,
 				1, 0),
+	SOC_ENUM("SPDIF Enable", spdif_enable_enum),
 	SOC_SINGLE("E to F Buffer Disable Switch", CS4265_SPDIF_CTL1,
 				6, 1, 0),
 	SOC_ENUM("C Data Access", cam_mode_enum),