aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordvdli <dvdli@google.com>2021-05-19 19:25:08 +0800
committerdvdli <dvdli@google.com>2021-05-19 19:25:08 +0800
commit08ec631e68327cb5195a10f3b8ba32a2cc22ff5e (patch)
tree20bc341530645b33a4be04b9605dcabc585d19de
parent75f4a6068c6bc47970b0df13ce2a2bfd5fba1189 (diff)
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.
-rw-r--r--src/mixer.c5
1 files changed, 0 insertions, 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;