[alsa-devel] Lost dB volumes on USB headset between 2.6.38 and 3.0

Alex Wolfson alex.wolfson at canonical.com
Fri Aug 19 04:19:43 CEST 2011


> 2011/8/18 Takashi Iwai<tiwai at suse.de  <http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>>:
> >/  At Tue, 16 Aug 2011 13:31:52 +0100,
> />/  Colin Guthrie wrote:
> />>/
> />>/  >  diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
> />>/  >  index c04d7c7..cdd19d7 100644
> />>/  >  --- a/sound/usb/mixer.c
> />>/  >  +++ b/sound/usb/mixer.c
> />>/  >  @@ -152,6 +152,7 @@ static inline void check_mapped_dB(const struct usbmix_name_map *p,
> />>/  >       if (p&&  p->dB) {
> />>/  >               cval->dBmin = p->dB->min;
> />>/  >               cval->dBmax = p->dB->max;
> />>/  >  +           cval->initialized = 1;
> />>/  >       }
> />>/  >    }
> />>/  >
> />>/  >  @@ -1092,7 +1093,7 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
> />>/  >                               " Switch" : " Volume");
> />>/  >               if (control == UAC_FU_VOLUME) {
> />>/  >                       check_mapped_dB(map, cval);
> />>/  >  -                   if (cval->dBmin<  cval->dBmax) {
> />>/  >  +                   if (cval->dBmin<  cval->dBmax || !cval->initialized) {
> />>/  >                               kctl->tlv.c = mixer_vol_tlv;
> />>/  >                               kctl->vd[0].access |=
> />>/  >                                       SNDRV_CTL_ELEM_ACCESS_TLV_READ |
> />>/
> />>/
> />>/
> />>/  Not had a chance to test this yet but I will when I get a moment.
> />/
> />/  Any chance to test the patch?
> />/
> /
> The patch seem fix the no dB scale problem , however the broken dB
> test which you added seem redundant as cval->dBmin and cval->dBmax are
> still zero because error in get_min_max() at build_feature_ctl() and
> it seem that the valid dBmin and dBMax are calculated by get_min_max()
> at mixer_ctl_feature_info() on my usb logitech web cam
>
>
> LSA endpoint.c:450: 2:3:1: add audio endpoint 0x86
> ALSA mixer.c:1182: [5] FU [Mic Capture Switch] ch = 1, val = 0/1/1
> ALSA mixer.c:804: 5:2: cannot get min/max values for control 2 (id 5)
> ALSA mixer.c:1182: [5] FU [Mic Capture Volume] ch = 1, val = 0/1/1
> ALSA mixer.c:804: 5:2: cannot get min/max values for control 2 (id 5)
> usbcore: registered new interface driver snd-usb-audio
Fixed dB scale problem for my USB Logitech headset as well (046d:0a0b)



More information about the Alsa-devel mailing list