diff options
author | Tzung-Bi Shih <tzungbi@google.com> | 2019-11-20 14:08:43 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-11-20 17:07:45 +0000 |
commit | fb5126778333d289b2623a7e6260beeb1ac1b819 (patch) | |
tree | ba0bc791ddfc1ad071ae63ef2baa05063259752a /include | |
parent | dc73d73aa7145f55412611f3eead1e85ae026785 (diff) | |
download | linux-stable-fb5126778333d289b2623a7e6260beeb1ac1b819.tar.gz linux-stable-fb5126778333d289b2623a7e6260beeb1ac1b819.tar.bz2 linux-stable-fb5126778333d289b2623a7e6260beeb1ac1b819.zip |
ASoC: core: add SND_SOC_BYTES_E
Add SND_SOC_BYTES_E to accept getter and putter.
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20191120060844.224607-2-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/soc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index bd943b5d7d45..c28a1ed5e8df 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -299,6 +299,12 @@ .put = snd_soc_bytes_put, .private_value = \ ((unsigned long)&(struct soc_bytes) \ {.base = xbase, .num_regs = xregs }) } +#define SND_SOC_BYTES_E(xname, xbase, xregs, xhandler_get, xhandler_put) \ +{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ + .info = snd_soc_bytes_info, .get = xhandler_get, \ + .put = xhandler_put, .private_value = \ + ((unsigned long)&(struct soc_bytes) \ + {.base = xbase, .num_regs = xregs }) } #define SND_SOC_BYTES_MASK(xname, xbase, xregs, xmask) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |