[alsa-devel] USB asynchronous mode feedback format

Julian Scheel julian at jusst.de
Fri Oct 15 16:24:46 CEST 2010


Am Freitag, 15. Oktober 2010, 15:31:50 schrieb Alex Lee:
> On Fri, 2010-10-15 at 15:04 +0200, Julian Scheel wrote:
> > Ah right, thanks.
> > Well now I swapped data[1] and data[2]. When monitoring the amount of
> > data I get per read, it is constant at 192bytes, which would be expected
> > for feedback ratio of 48, right? But if I have 0x06 to 0x07 for example
> > I do still get exactly 192bytes per read, shouldn't I get less data in
> > that case? (I always try to read up to MAXPACKETSIZE which is 512, btw)
> 
> Suggest:
> 
> (1) The feedback rate has to fall withing +/- 10% of the nominal rate.
> Otherwise it is ignored.

Ok. I tried it with 0x5e, which should be 47. Still same amount of data being 
fed in.

> (2) You need to find out exactly how many samples the host sends you.
> Look at my sdr-widget code, for example.  Then you read what the host
> sends you.

Actually I checked your code and it seems quite similiar to mine. I use the 
at91lib for USB stuff, so the capsulation is a bit different. I call a 
function USBD_Read, which does read up to the given amount of bytes (in my 
case max 512) or the receivement of a short packet.
Each packet I receive by reading with USBD_Read is exactly 192bytes long. As I 
won't be able to get more than 1 packet per USB frame, I should be receiving 
1000 * 192bytes per second. No matter what I write to the feedback pipe. which 
is kinda odd.

> (3) Do a > dmesg | tail
>     after unplugging and plugging your USB device in.  Then you can see
> whether there are any errors in your syncpipe

Don't see any syncpipe related errors. Only thing I see is:
usb 1-1.3: new full speed USB device using ehci_hcd and address 11
11:1:1: endpoint lacks sample rate attribute bit, cannot set.
11:1:1: endpoint lacks sample rate attribute bit, cannot set.

Does not seem to be feedback related... Although it would be nice to know, 
what's wrong there?

> btw, what is your Linux kernel version?

2.6.35.7-1 (archlinux, 32bit)

Is there any way to get some more verbosity out of alsa drivers? To check if 
it really receives the feedback information at all.

Regards,
Julian


More information about the Alsa-devel mailing list