[alsa-devel] USB asynchronous mode feedback format
Hi,
I am currently working on an USB-Audio device based on a AT91SAM7 processor. Actually I am currently trying to get the asynchronous mode working, to be able to use the AT91SAM7 as I2S transmitter in slave mode, utilizing and external clock. So I added the endpoint descriptors for the Feedback pipe. I attached the lsusb output. Alsa detects the card properly and reports it to be async in the /proc/asound interface. Now for a first tested I am trying to report back a constant rate through the feedback pipe. The stream is 48kHz with 16Bit. Reading the USB Audio 1.0 spec I assume in theory for a 48kHz stream I would report a rate of 48 samples per frame to the host, compensated by the measured drift. As the data should be 10.14 encoded I currently send { 0x0c, 0x00, 0x00 } on the feedback pipe whenever it is queried, which happens whenever I try to play some stream on this device. But unfortunately the host won't send any data to the device. I am wondering what might be wrong and where to check that alsa received the feedback data properly?
I would be really thankful for any help!
Regards, Julian
Julian Scheel <julian <at> jusst.de> writes:
Hi Julian,
The current alsa rate feedback rate feedback format is 12.13 in 4 bytes. Clemens has a patch to make the rate feedback format automatic such that it will work with 10.14 16.16 or any other formats. We are still testing the patch put . Currently with 12.13 format rate feedback works well.
Mac OSX can work with 10.14 and 16.16.
However, I think your problem lies elsewhere .
For example, AT91SAM7 has a limitation of EP siE of 64 bytes for EP 3 used for ISO transfers. There may also be a limitation in that the Same EP number cannot be used for both IN and OUT.
7 Alex
Hi Alex,
"Alex" lee188@singnet.com.sg schrieb:
The current alsa rate feedback rate feedback format is 12.13 in 4 bytes. Clemens has a patch to make the rate feedback format automatic such that it will work with 10.14 16.16 or any other formats. We are still testing the patch put . Currently with 12.13 format rate feedback works well.
How does it come that alsa uses 12.13? I don't see that mentioned in the specs? Is it right or left aligned in the 4 bytes?
For example, AT91SAM7 has a limitation of EP siE of 64 bytes for EP 3 used for ISO transfers. There may also be a limitation in that the Same EP number cannot be used for both IN and OUT.
Hm, I'm not sure about this. You think I should move the feedback pipe into it's own EP? I will recheck the At91SAM7 specs later, to see if I can find a note on such a limitation.
Thanks, Julian
19.13 with the most sig 7 bits not used.
Alex
Sent from my iPhone
On Oct 14, 2010, at 1:57 PM, Julian Scheel julian@jusst.de wrote:
Hi Alex,
"Alex" lee188@singnet.com.sg schrieb:
The current alsa rate feedback rate feedback format is 12.13 in 4 bytes. Clemens has a patch to make the rate feedback format automatic such that it will work with 10.14 16.16 or any other formats. We are still testing the patch put . Currently with 12.13 format rate feedback works well.
How does it come that alsa uses 12.13? I don't see that mentioned in the specs? Is it right or left aligned in the 4 bytes?
For example, AT91SAM7 has a limitation of EP siE of 64 bytes for EP 3 used for ISO transfers. There may also be a limitation in that the Same EP number cannot be used for both IN and OUT.
Hm, I'm not sure about this. You think I should move the feedback pipe into it's own EP? I will recheck the At91SAM7 specs later, to see if I can find a note on such a limitation.
Thanks, Julian
--- Julian Scheel julian@jusst.de wrote: There may also be
a limitation in that the Same EP number cannot be used for both IN and OUT.
Hm, I'm not sure about this. You think I should move the feedback pipe into it's own EP? I will recheck the At91SAM7 specs later, to see if I can find a note on such a limitation.
Hi Julian,
You might like to refer to this thread:
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=88...
As I have found out, it is not necessary to have the same EP number for IN and OUT for rate feedback to work with a Linux or OSX host. This may be a requirement for Vista/Win7 hosts though. We are still doing testing.
Alex
participants (3)
-
Alex
-
Julian Scheel
-
lee188@singnet.com.sg