Hello -
I work with a partner who is a USB headset manufacturer.
Recently, they made a change to the firmware of one of their USB
headsets and now the default playing sampling rate is 16kHz instead of
48kHz. This device supports only 16kHz and 48kHz for output sample rates.
Now, when using alsa, we can't play anything on this device but 16kHz
samples.
Previously, when the device's default output sample frequency was 48kHz,
everything seemed OK (though I must admit that I did not try to play
16kHz samples then. And I can't downgrade the firmware so I can't do the
test)
We recorded USB packets and we compared Linux and Windows traces.
When under Windows, we can see that a USB packet to set the device
sampling rate is sent (even if the default sampling rate freq is already
48kHz. The USB packet is "Set Cur", "Endpoint=3-OUT
CS=SAMPLING_FREQ_CONTROL").
When under Linux using Alsa, the message is never sent.
I nailed the problem down to alsa driver since it can be reproduced by
using aplay and specifying directly the hardware device (-D hw:2,0 for
instance) bypassing all the other components.
I tested with Ubuntu 10.04 LTS and 12.04 with the same results.
I found a workaround which is to set the software mixer (PulseAudio in
our cases) to use 16kHz as its default sample rate, but this is not
acceptable since everything would then be down-sampled to 16kHz.
Is there something we can do?
Maybe some parameter configuration or rule that would force the system
to send the USB message to set the device output sample rate freq?
I tried to take a look at the usb-audio driver sources but I lack
expertise in that domain. I wanted, in particular, to check under what
conditions the message to set the device output sample rate frequency is
sent.
I have access to the firmware engineer at the partner's, so if there is
something to correct or implement in the firmware, this may be doable.
Thanks in advance.. (if this message would have been better posted in
asla-devel, please let me know)
Thanks in advance
- Yves
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user