ASoC: wsa881x: Use SOC_SINGLE_EXT_TLV() helper macro
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 3 Mar 2025 17:14:19 +0000 (17:14 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 3 Mar 2025 18:14:52 +0000 (18:14 +0000)
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-9-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wsa881x.c

index dd2d6661adc717f5515f2aaf03e0e8eacd176c82..a3999bb6d5e22e7db4e2abc37c91fc6b062f0273 100644 (file)
 #define WSA881X_PROBE_TIMEOUT 1000
 
 #define WSA881X_PA_GAIN_TLV(xname, reg, shift, max, invert, tlv_array) \
-{      .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
-       .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |\
-                SNDRV_CTL_ELEM_ACCESS_READWRITE,\
-       .tlv.p = (tlv_array), \
-       .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\
-       .put = wsa881x_put_pa_gain, \
-       .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 0) }
+       SOC_SINGLE_EXT_TLV(xname, reg, shift, max, invert, \
+                          snd_soc_get_volsw, wsa881x_put_pa_gain, tlv_array)
 
 static struct reg_default wsa881x_defaults[] = {
        { WSA881X_CHIP_ID0, 0x00 },