diff options
author | Damien.Horsley <Damien.Horsley@imgtec.com> | 2015-12-08 18:58:58 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-12-13 01:38:20 +0300 |
commit | d13871b3531b05fdf5b8ca92c98779e574fe06f1 (patch) | |
tree | a23c5fd37414e760d7a5e31740a8e1ed9f124dbe /include/sound/soc.h | |
parent | 8005c49d9aea74d382f474ce11afbbc7d7130bec (diff) | |
download | linux-d13871b3531b05fdf5b8ca92c98779e574fe06f1.tar.xz |
ASoC: Add SOC_DOUBLE_STS macro
Add SOC_DOUBLE_STS macro for read-only volatile status controls
Signed-off-by: Damien.Horsley <Damien.Horsley@imgtec.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r-- | include/sound/soc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h index a8b4b9c8b1d2..2b399b0d7f8a 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -110,6 +110,14 @@ .put = snd_soc_put_volsw, \ .private_value = SOC_DOUBLE_VALUE(reg, shift_left, shift_right, \ max, invert, 0) } +#define SOC_DOUBLE_STS(xname, reg, shift_left, shift_right, max, invert) \ +{ \ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ + .info = snd_soc_info_volsw, .get = snd_soc_get_volsw, \ + .access = SNDRV_CTL_ELEM_ACCESS_READ | \ + SNDRV_CTL_ELEM_ACCESS_VOLATILE, \ + .private_value = SOC_DOUBLE_VALUE(reg, shift_left, shift_right, \ + max, invert, 0) } #define SOC_DOUBLE_R(xname, reg_left, reg_right, xshift, xmax, xinvert) \ { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \ .info = snd_soc_info_volsw, \ |