diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2015-06-08 15:19:49 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-06-08 18:53:18 +0100 |
commit | 2962cb5217f2d8defb984f17ac59f576124d8521 (patch) | |
tree | d93d4dcc4f12073a63e78541a4fb1cbb5f775099 /sound | |
parent | 1014f7eff9a1d4f3f796c83e933adf2462c79005 (diff) | |
download | linux-2962cb5217f2d8defb984f17ac59f576124d8521.tar.gz linux-2962cb5217f2d8defb984f17ac59f576124d8521.tar.bz2 linux-2962cb5217f2d8defb984f17ac59f576124d8521.zip |
ASoC: tas2552: Add control for selecting DIN source
'DIN source' enum can be used to select the DIN Source (muted, left, right
or average of left and right channels).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/tas2552.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index 0ca55aaeaaf2..067ea6e5e521 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -553,9 +553,20 @@ static struct snd_soc_dai_driver tas2552_dai[] = { */ static DECLARE_TLV_DB_SCALE(dac_tlv, -7, 100, 0); +static const char * const tas2552_din_source_select[] = { + "Muted", + "Left", + "Right", + "Left + Right average", +}; +static SOC_ENUM_SINGLE_DECL(tas2552_din_source_enum, + TAS2552_CFG_3, 3, + tas2552_din_source_select); + static const struct snd_kcontrol_new tas2552_snd_controls[] = { SOC_SINGLE_TLV("Speaker Driver Playback Volume", TAS2552_PGA_GAIN, 0, 0x1f, 0, dac_tlv), + SOC_ENUM("DIN source", tas2552_din_source_enum), }; static int tas2552_codec_probe(struct snd_soc_codec *codec) |