aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2014-08-18 14:33:38 +0100
committerCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2014-08-18 14:33:38 +0100
commitd6f0dfc6caa1c719c8d805e04e33b8e785c23a40 (patch)
treec68c160626400dfe4026b7b022d173ebdd582cb1
parentad80762a3b75e39bb26faf091b203c1d7c49fc05 (diff)
Revert "mixer: Control input value in mixer_ctl_set_value"
This reverts commit 0e07647e4b9c52bb5f3766f9564ed38b6030e556. This commit disables reporting of an error when somebody requests an out of range value from a control which seems like a bad goal to start with, if something invalid is requested we should return an error not set things to the nearest valid state. Secondly since mixer_ctl_get_range_max returns an error for all control types except TYPE_INTEGER, all controls that are not integers will be set to -EINVAL with this patch included. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
-rw-r--r--mixer.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/mixer.c b/mixer.c
index b6c854f..6f19cff 100644
--- a/mixer.c
+++ b/mixer.c
@@ -383,9 +383,6 @@ 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;