[alsa-devel] USB asynchronous mode feedback format
Julian Scheel
julian at jusst.de
Sat Oct 16 20:52:02 CEST 2010
Am Samstag, 16. Oktober 2010, 18:30:31 schrieb Julian Scheel:
> Hi Alex,
>
> Am Samstag, 16. Oktober 2010, 15:58:40 schrieb Alex Lee:
> > On Sat, 2010-10-16 at 12:25 +0200, Julian Scheel wrote:
> > > Thanks, I implemented them the way same you did. So for get_min/max/cur
> > > I always return 48kHz and set_cur simply does nothing.
> > > Now playback in general works again. But still the rate feedback seems
> > > to have no impact on the data-rate. Also the frequency value shown in
> > > proc-interface is unchanged. When rate feedback works, it would
> > > probably be slightly different than 48.000kHz?!
> >
> > OK, you are getting close :-)
>
> I hope so (c:
> > One debug technique we have been using is to do a USB wire dump, using
> > something like wireshark. This way you can see exactly what goes on
> > between the PC host and the device.
>
> Yes, using wireshark is a good idea indeed. And it immediately turns out
> what the problem is.
> The device sends ISOCHRONOUS out packets on the feedback endpoint (5,
> respectively 0x85) - but when I try to send 4 byte, the URB length is
> always 0. If I only send 3 or less bytes the packets look fine.
> I thought it might be a bug regarding max packet size in the at91lib and
> raised it to 5, but still only 3 bytes can be send. Any clues what might
> cause such an error?
I digged deeper into this. Actually all 4 bytes get written to the UDP_FDR
register for endpoint 5 properly. Also the TXPKTRDY flag is cleared and set as
it should be. So at the sending part in the firmware everything looks fine.
Now the question is, why do the package have a length of 0 then?
I attached two wireshark dumps (filtered on endpoint 0x85). One when sending 3
bytes on the feedback pipe (set max packet size to 3 as well). Another one
when sending 4 byte (max packet size set to 4).
I also tried sending 4 bytes, when max packet size is 3 - as expected it get's
properly split up into 2 packets. First has 3 bytes, second 1 byte. Really
odd.
Maybe you have an idea when looking at the dumps?
Anyway, as 3 byte feedback sending works, it might be worth to test the 10.14
patch by Clemens to see if the feedback loop itself is working properly then.
Can you point me to that patch? Is it already commited to current head?
Regards,
Julian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3byte_feedback.bz2
Type: application/x-bzip
Size: 2086 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20101016/a88d6413/attachment-0002.bz2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4byte_feedback.bz2
Type: application/x-bzip
Size: 1483 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20101016/a88d6413/attachment-0003.bz2
More information about the Alsa-devel
mailing list