At 12:48 PM +0100 11/27/12, Daniel Mack wrote:
As Clemens said, check the error fields in the isochronous frames when the urb is given back to the driver. For isochronous data, there's nothing the driver can do about failed transmissions, hence there's no code to handle such conditions. But it might help understand what's going on.
Well, I inserted code into retire_playback_urb() as Clemens suggested a few days ago:
int est_delay, i;
/* Check status of submitted urbs */ for (i = 0; i < urb->number_of_packets; i++) { if (urb->iso_frame_desc[i].status) { snd_printk(KERN_ERR "packet %d failed: %d\n", i, urb->iso_frame_desc[i].status); } }
/* ignore the delay accounting when procssed=0 is given, i.e.
And, hit gold (lead?):
[ 432.591698] ALSA sound/usb/pcm.c:1163 packet 0 failed: -18 [ 432.591702] ALSA sound/usb/pcm.c:1163 packet 1 failed: -18 [ 432.592684] ALSA sound/usb/pcm.c:1163 packet 0 failed: -18 [ 432.592702] ALSA sound/usb/pcm.c:1163 packet 0 failed: -18 [ 432.592706] ALSA sound/usb/pcm.c:1163 packet 1 failed: -18 [ 432.593684] ALSA sound/usb/pcm.c:1163 packet 0 failed: -18 [ 432.593701] ALSA sound/usb/pcm.c:1163 packet 0 failed: -18 [ 432.593705] ALSA sound/usb/pcm.c:1163 packet 1 failed: -18 [ 432.594680] ALSA sound/usb/pcm.c:1163 packet 0 failed: -18
Error 18 is EXDEV: "Cross-device link". From an alsa-user post by Clemens a couple of years ago:
This error code is documented in Documentation/usb/error-codes.txt: | -EXDEV ISO transfer only partially completed | look at individual frame status for details
Well, this _is_ the individual frame status.
Anyway, a look at the source code shows that several HCDs use this code for frames that were not handled by the controller, probably because they were submitted too late.
Which controller are you using?
Is there anything that could cause the controller to skip frames, such as high traffic on the (PCI) bus?
The answer to that final question: I don't know, but I've been concerned about PCI traffic for a while, and I don't know how I'll address it.
So, is it clear that this is a USB (software or hardware) problem? Should I move this discussion to the linux-usb list?
Thanks for all the help, Dan