Skip to content

Commit

Permalink
ASoC: wm9712: Use SOC_SINGLE_EXT() 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-7-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 9bb7d74 commit bf19467
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions sound/soc/codecs/wm9712.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,9 @@ static int wm9712_hp_mixer_get(struct snd_kcontrol *kcontrol,
return 0;
}

#define WM9712_HP_MIXER_CTRL(xname, xmixer, xshift) { \
.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.info = snd_soc_info_volsw, \
.get = wm9712_hp_mixer_get, .put = wm9712_hp_mixer_put, \
.private_value = SOC_SINGLE_VALUE(SND_SOC_NOPM, \
(xmixer << 8) | xshift, 1, 0, 0) \
}
#define WM9712_HP_MIXER_CTRL(xname, xmixer, xshift) \
SOC_SINGLE_EXT(xname, SND_SOC_NOPM, ((xmixer) << 8) | (xshift), \
1, 0, wm9712_hp_mixer_get, wm9712_hp_mixer_put)

/* Left Headphone Mixers */
static const struct snd_kcontrol_new wm9712_hpl_mixer_controls[] = {
Expand Down

0 comments on commit bf19467

Please sign in to comment.