1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c
index 7b5e8a60bbe2..a97cd3ba1e7f 100644
--- a/sound/soc/codecs/tas2783-sdw.c
+++ b/sound/soc/codecs/tas2783-sdw.c
@@ -522,11 +522,31 @@ static const struct regmap_sdw_mbq_cfg tas2783_mbq_cfg = {
.mbq_size = tas2783_sdca_mbq_size,
};
+static const unsigned int tas2783_ch_values[] = {
+ 0, /* Off */
+ 1, /* Left */
+ 4, /* Right */
+};
+
+static const char * const tas2783_ch_select[] = {
+ "Off", "Left", "Right",
+};
+
+static SOC_VALUE_ENUM_SINGLE_DECL(tas2783_ch_enum,
+ SDW_SDCA_CTL(SDCA_FUNCTION_TYPE_SMART_AMP,
+ TAS2783_SDCA_ENT_PPU21,
+ SDCA_CTL_UDMPU_CLUSTERINDEX, 0),
+ 0,
+ 0x7,
+ tas2783_ch_select,
+ tas2783_ch_values);
+
static const struct snd_kcontrol_new tas2783_snd_controls[] = {
SOC_SINGLE_RANGE_TLV("Amp Playback Volume", TAS2783_AMP_LEVEL,
1, 0, 20, 0, tas2781_amp_tlv),
SOC_SINGLE_RANGE_TLV("Speaker Playback Volume", TAS2783_DVC_LVL,
0, 0, 200, 1, tas2781_dvc_tlv),
+ SOC_ENUM("Channel Playback", tas2783_ch_enum),
};
static s32 tas2783_validate_calibdata(struct tas2783_prv *tas_dev,
--
2.54.0
|