Skip to content

Commit

Permalink
ASoC: wcd938x: Use SOC_SINGLE_EXT_TLV() helper macro
Browse files Browse the repository at this point in the history
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-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Charles Keepax authored and Mark Brown committed Mar 3, 2025
1 parent aecdaa8 commit 9bb7d74
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions sound/soc/codecs/wcd938x.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,8 @@
#define WCD_MBHC_HS_V_MAX 1600

#define WCD938X_EAR_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 = wcd938x_ear_pa_put_gain, \
.private_value = SOC_SINGLE_VALUE(reg, shift, max, invert, 0) }
SOC_SINGLE_EXT_TLV(xname, reg, shift, max, invert, snd_soc_get_volsw, \
wcd938x_ear_pa_put_gain, tlv_array)

enum {
WCD9380 = 0,
Expand Down

0 comments on commit 9bb7d74

Please sign in to comment.