[alsa-devel] [PATCH 1/5] ALSA: snd-usb: implement new endpoint streaming model

Clemens Ladisch clemens at ladisch.de
Wed Nov 2 16:49:50 CET 2011

Daniel Mack wrote:
> On 11/02/2011 11:26 AM, Clemens Ladisch wrote:
>> Daniel Mack wrote:
>>> +void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
>>>  		...
>>> +		snd_printk(KERN_ERR "Unable to find an urb for playback (nurbs %d)\n",
>>> +			   ep->nurbs);
>> AFAICS the driver tries for all URBS to be queued at all times.
> Hmm, no, not for the "implicit feedback" case. In this mode, we don't
> queue any output urbs on startup but wait for the capture urbs to arrive
> and then queue from there. So this should be ok, right?

Example with queue length = 2:

1) startup:
   driver queues both capture URBs
2) 1st capture URB completes:
   driver queues 1st playback URB and requeues 1st capture URB
3) 2nd capture URB completes:
   driver queues 2nd playback URB and requeues 2nd capture URB
   (all URBs are now queued)
4) 1st capture URB completes:
   1st playback URB is still busy
   (The playback URB might have been scheduled for a later frame, and
   even for the same frame, there is no guarantee that the completions
   for different endpoints happen in the same order as the queueing.)


More information about the Alsa-devel mailing list