From: Takashi Iwai <tiwai@suse.de>
To: Colin Guthrie <gmane@colin.guthr.ie>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
Clemens Ladisch <clemens@ladisch.de>,
David Henningsson <david.henningsson@canonical.com>
Subject: Re: Lost dB volumes on USB headset between 2.6.38 and 3.0
Date: Tue, 09 Aug 2011 14:40:46 +0200 [thread overview]
Message-ID: <s5hwremdagh.wl%tiwai@suse.de> (raw)
In-Reply-To: <4E4117C9.2090100@colin.guthr.ie>
At Tue, 09 Aug 2011 13:19:37 +0200,
Colin Guthrie wrote:
>
> 'Twas brillig, and Clemens Ladisch at 09/08/11 12:39 did gyre and gimble:
> > David Henningsson wrote:
> >> Hmm, I and Colin Guthrie have found a regression between kernels 2.6.38
> >> and 3.0.
> >>
> >> When running "amixer -D hw:handset" for this device under 2.6.38, the
> >> attached file is returned. Under 3.0, the dB information is missing.
> >> This can't be intentional, can it?
> >
> > There are patches that might have introduced bugs, but these two patches
> > do remove dB information intentionally:
> >
> > ALSA: usb-audio - Don't expose broken dB ranges:
> > http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff;h=59bb7f0eebe6
> > ALSA: usb-audio - Add volume range check and warn if it too big:
> > http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff;h=80acefff3bc7
> >
> > Are there any messages in the system log when loading the driver?
> > What are the controls' dB ranges (see "amixer contents")?
>
> Interesting thanks fpr the hints.
>
> I get this when plugging in the device David mentioned previously.
>
>
> usb 3-1: USB disconnect, device number 2
> usbcore: deregistering interface driver snd-usb-audio
> usb 2-1: new full speed USB device number 7 using uhci_hcd
> usb 2-1: New USB device found, idVendor=1885, idProduct=0501
> usb 2-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
> usb 2-1: Product: BT Agile handset
> usb 2-1: Manufacturer: Ascalade
> input: Ascalade BT Agile handset as
> /devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1:1.3/input/input14
> generic-usb 0003:1885:0501.0006: input,hidraw0: USB HID v1.00 Device
> [Ascalade BT Agile handset] on usb-0000:00:1d.1-1/input3
> 13:0: cannot get min/max values for control 2 (id 13)
> 14:0: cannot get min/max values for control 2 (id 14)
> 9:0: cannot get min/max values for control 2 (id 9)
> 10:0: cannot get min/max values for control 2 (id 10)
> 11:0: cannot get min/max values for control 2 (id 11)
> 9:0: cannot get min/max values for control 2 (id 9)
> 14:0: cannot get min/max values for control 2 (id 14)
> 11:0: cannot get min/max values for control 2 (id 11)
> 13:0: cannot get min/max values for control 2 (id 13)
> 10:0: cannot get min/max values for control 2 (id 10)
> 9:0: cannot get min/max values for control 2 (id 9)
So the problem is that the driver can't extract the dB values.
If the problem is seen only at the beginning of driver initialization,
the patch below may work.
Also, could you give "lsusb -v" output, too?
Takashi
---
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 |
next prev parent reply other threads:[~2011-08-09 12:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
[not found] <mailman.806.1313679978.2087.alsa-devel@alsa-project.org>
2011-08-19 2:19 ` Alex Wolfson
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=s5hwremdagh.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=david.henningsson@canonical.com \
--cc=gmane@colin.guthr.ie \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.