From: Alex Wolfson <alex.wolfson@canonical.com>
To: alsa-devel@alsa-project.org
Subject: Re: Lost dB volumes on USB headset between 2.6.38 and 3.0
Date: Thu, 18 Aug 2011 22:19:43 -0400 [thread overview]
Message-ID: <4E4DC83F.4080704@canonical.com> (raw)
In-Reply-To: <mailman.806.1313679978.2087.alsa-devel@alsa-project.org>
> 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)
next parent reply other threads:[~2011-08-19 2:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.806.1313679978.2087.alsa-devel@alsa-project.org>
2011-08-19 2:19 ` Alex Wolfson [this message]
2011-08-09 9:52 Lost dB volumes on USB headset between 2.6.38 and 3.0 David Henningsson
2011-08-09 10:39 ` Clemens Ladisch
2011-08-09 11:19 ` David Henningsson
2011-08-09 11:19 ` Colin Guthrie
2011-08-09 12:40 ` Takashi Iwai
2011-08-16 12:31 ` Colin Guthrie
2011-08-16 13:41 ` David Henningsson
2011-08-16 14:00 ` Raymond Yau
2011-08-18 15:18 ` Takashi Iwai
2011-08-18 22:55 ` Raymond Yau
2011-08-19 5:53 ` Takashi Iwai
2011-08-19 6:15 ` Takashi Iwai
2011-08-23 3:02 ` Raymond Yau
2011-09-03 11:11 ` Colin Guthrie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E4DC83F.4080704@canonical.com \
--to=alex.wolfson@canonical.com \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox