From 08ec631e68327cb5195a10f3b8ba32a2cc22ff5e Mon Sep 17 00:00:00 2001 From: dvdli Date: Wed, 19 May 2021 19:25:08 +0800 Subject: remove range checking in mixer_ctl_set_value There are some drivers assigning wrong ranges of mixer control's values. Let ALSA drivers to check whether values are in ranges. --- src/mixer.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/mixer.c b/src/mixer.c index 363c590..5581e5d 100644 --- a/src/mixer.c +++ b/src/mixer.c @@ -1085,11 +1085,6 @@ 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; -- cgit v1.2.3