From 429c346b8191c76cae451f1a5c590cffc2125ef2 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 19 Aug 2011 08:30:53 +0200 Subject: [PATCH] --- yaml --- r: 270412 b: refs/heads/master c: 9fcd0ab130579d9742538340edda3225f2b49a3e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/usb/mixer.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 79b98da6b212..72ad83e00284 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b55ac2a116e2b0bb2293873c290751cc17099022 +refs/heads/master: 9fcd0ab130579d9742538340edda3225f2b49a3e diff --git a/trunk/sound/usb/mixer.c b/trunk/sound/usb/mixer.c index cdd19d7fe500..78a5abda6793 100644 --- a/trunk/sound/usb/mixer.c +++ b/trunk/sound/usb/mixer.c @@ -881,8 +881,17 @@ static int mixer_ctl_feature_info(struct snd_kcontrol *kcontrol, struct snd_ctl_ uinfo->value.integer.min = 0; uinfo->value.integer.max = 1; } else { - if (! cval->initialized) - get_min_max(cval, 0); + if (!cval->initialized) { + get_min_max(cval, 0); + if (cval->initialized && cval->dBmin >= cval->dBmax) { + kcontrol->vd[0].access &= + ~(SNDRV_CTL_ELEM_ACCESS_TLV_READ | + SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK); + snd_ctl_notify(cval->mixer->chip->card, + SNDRV_CTL_EVENT_MASK_INFO, + &kcontrol->id); + } + } uinfo->value.integer.min = 0; uinfo->value.integer.max = (cval->max - cval->min + cval->res - 1) / cval->res;