diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2025-03-03 17:14:15 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-03-03 18:14:48 +0000 |
commit | aecdaa84adafb086b5b2939898d781bd63d6fe2e (patch) | |
tree | 7eb28e74754710b126a3e2f346800e9a472de393 | |
parent | 17ec58ac3c08c5c43bbdf5b08020fa4188a3009a (diff) |
ASoC: tas2562: Use SOC_SINGLE_EXT_TLV() helper macro
Rather than open coding use the helper macro provided by the ASoC core.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250303171424.444556-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/tas2562.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sound/soc/codecs/tas2562.c b/sound/soc/codecs/tas2562.c index fef7ce39f664..8e00dcc09d0c 100644 --- a/sound/soc/codecs/tas2562.c +++ b/sound/soc/codecs/tas2562.c @@ -513,17 +513,9 @@ static const struct snd_kcontrol_new vsense_switch = static const struct snd_kcontrol_new tas2562_snd_controls[] = { SOC_SINGLE_TLV("Amp Gain Volume", TAS2562_PB_CFG1, 1, 0x1c, 0, tas2562_dac_tlv), - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Digital Volume Control", - .index = 0, - .tlv.p = dvc_tlv, - .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_READWRITE, - .info = snd_soc_info_volsw, - .get = tas2562_volume_control_get, - .put = tas2562_volume_control_put, - .private_value = SOC_SINGLE_VALUE(TAS2562_DVC_CFG1, 0, 110, 0, 0), - }, + SOC_SINGLE_EXT_TLV("Digital Volume Control", TAS2562_DVC_CFG1, 0, 110, 0, + tas2562_volume_control_get, tas2562_volume_control_put, + dvc_tlv), }; static const struct snd_soc_dapm_widget tas2110_dapm_widgets[] = { |