diff options
-rw-r--r-- | mixer.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -392,6 +392,11 @@ int mixer_ctl_set_value(struct mixer_ctl *ctl, unsigned int id, int value) break; case SNDRV_CTL_ELEM_TYPE_INTEGER: + if ((value < mixer_ctl_get_range_min(ctl)) || + (value > mixer_ctl_get_range_max(ctl))) { + return -EINVAL; + } + ev.value.integer.value[id] = value; break; |