Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305803
b: refs/heads/master
c: e182534
h: refs/heads/master
i:
  305801: 9e942ad
  305799: 6a04f98
v: v3
  • Loading branch information
Takashi Iwai committed May 15, 2012
1 parent 6691ddd commit ded9cbb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 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: f3af90517d87bf8f4b21c2e68c8a15d9b7fd516e
refs/heads/master: e182534d4bd3a779941f2868f35e1f66a8d36cea
26 changes: 13 additions & 13 deletions trunk/sound/usb/mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1141,9 +1141,6 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
len = snd_usb_copy_string_desc(state, nameid,
kctl->id.name, sizeof(kctl->id.name));

/* get min/max values */
get_min_max_with_quirks(cval, 0, kctl);

switch (control) {
case UAC_FU_MUTE:
case UAC_FU_VOLUME:
Expand Down Expand Up @@ -1175,24 +1172,27 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
}
append_ctl_name(kctl, control == UAC_FU_MUTE ?
" Switch" : " Volume");
if (control == UAC_FU_VOLUME) {
check_mapped_dB(map, cval);
if (cval->dBmin < cval->dBmax || !cval->initialized) {
kctl->tlv.c = snd_usb_mixer_vol_tlv;
kctl->vd[0].access |=
SNDRV_CTL_ELEM_ACCESS_TLV_READ |
SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK;
}
}
break;

default:
if (! len)
strlcpy(kctl->id.name, audio_feature_info[control-1].name,
sizeof(kctl->id.name));
break;
}

/* get min/max values */
get_min_max_with_quirks(cval, 0, kctl);

if (control == UAC_FU_VOLUME) {
check_mapped_dB(map, cval);
if (cval->dBmin < cval->dBmax || !cval->initialized) {
kctl->tlv.c = snd_usb_mixer_vol_tlv;
kctl->vd[0].access |=
SNDRV_CTL_ELEM_ACCESS_TLV_READ |
SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK;
}
}

range = (cval->max - cval->min) / cval->res;
/* Are there devices with volume range more than 255? I use a bit more
* to be sure. 384 is a resolution magic number found on Logitech
Expand Down

0 comments on commit ded9cbb

Please sign in to comment.