LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   host opens usb audio endpoint w/o explicitly setting sampling rate (https://www.linuxquestions.org/questions/linux-general-1/host-opens-usb-audio-endpoint-w-o-explicitly-setting-sampling-rate-4175457969/)

rebar 04-12-2013 07:10 PM

host opens usb audio endpoint w/o explicitly setting sampling rate
 
hi - I'm testing various usb headsets. I'm finding that some versions of linux are not setting the sample rate when opening up the usb audio endpoint. I've taken traces and I see this is the case. If the HS accidentally has a "default" sample rate that matches the system, it will work. If not, there sill just be clicks and pops, what I would expect.

The HS supports several sample rates so it needs to know which to use. Do you know about any discussions regarding this issue? I've searched around quite a bit but have not found anyone diving into this question.

On windows, the host opens usb audio endpoint and explicitly sets the sampling rate of the audio endpoint. That's what the HS is "expecting".

Thanks for any help that you can offer!

rob

unSpawn 04-30-2013 11:48 AM

I kind of wonder what exactly should be setting the sample rate? If you run 'modinfo' on the related USB modules, does one of them offer setting sample rate as an argument? If so you could add an appropriate /etc/modprobe.d/ entry. If it's not a property of a module then you may be looking at an Udev (or whatever used these days) rule? Or else a filter in whatever audio subsystem is used? (No idea about the latter BTW.)

rebar 04-30-2013 12:13 PM

problem resolved
 
thx for the reply unSpawn!

We seemed to have verified the suspected problem, which turns out to be that we are are not fully compliant with the usb 2.0 spec when we respond to the getCongurationDescriptor. more specifically,
(Section 9.5) states that:
1. If the class or vendor specific descriptors use the same format as standard descriptors (e.g., start with a
length byte and followed by a type byte), they must be returned interleaved with standard descriptors in
the configuration information returned by a GetDescriptor(Configuration) request. In this case, the
class or vendor-specific descriptors must follow a related standard descriptor they modify or extend.

We weren't doing that correctly and because of that, linux was not able to see the supported sample rates. (This didn't bother windows.)

unSpawn 04-30-2013 12:17 PM

Quote:

Originally Posted by rebar (Post 4942026)
We weren't doing that correctly and because of that, linux was not able to see the supported sample rates. (This didn't bother windows.)

First of all that'll teach you not to compare mcrsoft with Linux and two I'm just wondering who this "we" is... If it's the royal we then OK, sure, if it's we as in "we forgot to spec this right before ordering a 50K shipment of phones from the factory" then I guess you're royally scr*wed ;-p


All times are GMT -5. The time now is 01:16 AM.