Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270412
b: refs/heads/master
c: 9fcd0ab
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Aug 19, 2011
1 parent b8991bf commit 429c346
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b55ac2a116e2b0bb2293873c290751cc17099022
refs/heads/master: 9fcd0ab130579d9742538340edda3225f2b49a3e
13 changes: 11 additions & 2 deletions trunk/sound/usb/mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 429c346

Please sign in to comment.