diff options
-rw-r--r-- | mixer.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -383,6 +383,9 @@ int mixer_ctl_set_value(struct mixer_ctl *ctl, unsigned int id, int value) if (ret < 0) return ret; + if (value > mixer_ctl_get_range_max(ctl)) + value = mixer_ctl_get_range_max(ctl); + switch (ctl->info->type) { case SNDRV_CTL_ELEM_TYPE_BOOLEAN: ev.value.integer.value[id] = !!value; |