[LAU] [LAD] How to change the USB bus sample rate ?

Adrien DANIEL adrien.daniel at gmail.com
Tue Aug 12 04:03:48 EDT 2008


On Tue, Aug 12, 2008 at 9:16 AM, Clemens Ladisch <cladisch at fastmail.net> wrote:

> "universal serial bus bus"?  ;-)

Yes, in France, it is usual to say "bus USB", because in many minds
(mine only ?) USB do not relate to a bus, but to a technology (which
is wrong, of course), sorry for the mistake ! :)

>> sample rate.
>
> USB doesn't have a built-in sample rate; audio samples are transported
> in packets.

Yes. I am interested by the frequency at which these packets are send.

> USB does have a bit rate and a frame rate, but neither of these can be
> changed.

I think that I was talking about the frame rate, sorry ! In fact I
read a post on another list that I could report here :
--
First of all - USB based sound cards are notoriously terrible for temporal
accuracy. Your best bet really is to get an PCMCIA-based card.
The reason is, the data bus of the USB is not all that fast - it's high
bandwidth, but has a slow sample rate - default is only 125 Hz.
This means you can only "deliver" a sound to begin roughly every 7.5 ms...
So if the sound delivery from the hsystem does not line up appropriately,
you will have a gap while it "waits" to sync w/ the USB data bus.

Now there is hope!
In Windows, you CAN change the USB sample rate, using an applet.
This one here will do it:
http://www.softpedia.com/get/Tweak/System-Tweak/USB-Mouserate-switcher.shtml

It allows changing the data rate up to 1000 Hz (1 ms resolution).

Note - this changes the access rate for ALL USB devices; mice, remote
drives, access keys, etc. It may also decrease the time you get out of the
battery, due to larger power consumption.
--

> The only exception is the frame rate on UHCI controllers; to
> change the frame length, change the initialization of the USBSOF
> register in the configure_hc() function in uhci-hcd.c.
>
>
> Why would you want to do this?

I did not try this applet, since I do not use Windows, but I was
wondering if it was possible in Linux. However, I don't think that
altering the kernel code is a good idea (for me) ! :D

Regards,
Adrien



More information about the Linux-audio-user mailing list