diff options
author | Gary S. Robertson <gary.robertson@linaro.org> | 2016-01-20 15:36:59 -0600 |
---|---|---|
committer | Gary S. Robertson <gary.robertson@linaro.org> | 2016-01-20 15:36:59 -0600 |
commit | 370e05d463d66eaada3b4bb9266f019563920eb0 (patch) | |
tree | 348834a36436338eea1e9f17f1823cae213f92fc /sound/soc/soc-ops.c | |
parent | f93328edc6d139b9b1b5ed6944f7b80b8699cdf7 (diff) | |
parent | 906d9eadd3b6698fa6ceb9bcdf41da6aa56d0a24 (diff) |
Merge tag 'lsk-v4.1-15.12-rt' of http://git.linaro.org/kernel/linux-linaro-stable into linux-linaro-lng-v4.1-rtlinux-lng-preempt-rt-4.1.14-2016.03linux-lng-preempt-rt-4.1.14-2016.02linux-lng-preempt-rt-4.1.14-2016.01linux-linaro-lng-v4.1-rt
LSK RT 15.12 v4.1
Conflicts:
linaro/configs/linaro-base.conf
linaro/configs/preempt-rt.conf
linaro/configs/vexpress64.conf
Diffstat (limited to 'sound/soc/soc-ops.c')
-rw-r--r-- | sound/soc/soc-ops.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index 100d92b5b77e..05977ae1ff2a 100644 --- a/sound/soc/soc-ops.c +++ b/sound/soc/soc-ops.c @@ -207,6 +207,34 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, EXPORT_SYMBOL_GPL(snd_soc_info_volsw); /** + * snd_soc_info_volsw_sx - Mixer info callback for SX TLV controls + * @kcontrol: mixer control + * @uinfo: control element information + * + * Callback to provide information about a single mixer control, or a double + * mixer control that spans 2 registers of the SX TLV type. SX TLV controls + * have a range that represents both positive and negative values either side + * of zero but without a sign bit. + * + * Returns 0 for success. + */ +int snd_soc_info_volsw_sx(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) +{ + struct soc_mixer_control *mc = + (struct soc_mixer_control *)kcontrol->private_value; + + snd_soc_info_volsw(kcontrol, uinfo); + /* Max represents the number of levels in an SX control not the + * maximum value, so add the minimum value back on + */ + uinfo->value.integer.max += mc->min; + + return 0; +} +EXPORT_SYMBOL_GPL(snd_soc_info_volsw_sx); + +/** * snd_soc_get_volsw - single mixer get callback * @kcontrol: mixer control * @ucontrol: control element information |