LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-12-2013, 07:10 PM   #1
rebar
LQ Newbie
 
Registered: Apr 2013
Posts: 2

Rep: Reputation: Disabled
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
 
Old 04-30-2013, 11:48 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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.)
 
Old 04-30-2013, 12:13 PM   #3
rebar
LQ Newbie
 
Registered: Apr 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
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.)
 
Old 04-30-2013, 12:17 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by rebar View Post
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
set feature halt endpoint fails always USB linux driver usb gadget serial dot c sarmads1 Linux - Kernel 0 08-14-2012 10:06 PM
What is the reasonable sampling rate for the wireless signal level? christyyim Linux - Wireless Networking 5 12-25-2008 02:10 AM
ALSA or OSS sampling rate change hisnumber666 Linux - Hardware 6 04-28-2006 02:11 AM
audio sampling Skews! microtim Programming 2 06-23-2003 06:45 PM
setting gprof sampling time? togunter Programming 0 04-26-2002 03:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration