Note that there are some explanatory texts on larger screens.

plurals
  1. POUser mode USB isochronous transfer from device-to-host
    primarykey
    data
    text
    <p>I am currently trying to interface with a USB audio device from user land. I currently have the device fully enumerated and I've set the interface and set the alternative interface to the interface non-zero-bandwidth alternative interface.</p> <p>Firstly I have to say I can't use anything like libusb. I ned to do this via Linux's USB device file system.</p> <p>So as far as I can tell I'm ready to begin receiving isochronous data. However I can find very little information on how to do an isochronous transfer.</p> <p>From what I can tell I need to populate a usbdevfs_urb structure but I'm completely unsure of how exactly to fill this structure.</p> <p>Also, once I have filled this structure am I right in thinking I need to call the following:</p> <pre><code>int retSubmit = ioctl( fd, USBDEVFS_SUBMITURB, &amp;usbRequest ); </code></pre> <p>and then once submitted I can wait for the request to complete using</p> <pre><code>USBDEVFS_REAPURBNDELAY </code></pre> <p>In the case of REAPURBNDELAY what exactly is the parameter I need to pass?</p> <p>Am I even barking up the right tree? </p> <p>Any information would be massively appreciated.</p> <p>Thanks in advance!</p> <p>Edit:</p> <p>I attempt to do the isochronous transfer as follows:</p> <pre><code>usbdevfs_urb&amp; urbRequest = *(usbdevfs_urb*)malloc( 384 ); urbRequest.type = USBDEVFS_URB_TYPE_ISO; urbRequest.endpoint = mpEndpoint-&gt;GetEndpointAddress();//mpEndpoint-&gt;GetEndpointIndex(); urbRequest.status = 0; urbRequest.flags = USBDEVFS_URB_ISO_ASAP; urbRequest.buffer = pData; urbRequest.buffer_length = 0; urbRequest.actual_length = 0; urbRequest.start_frame = 0; urbRequest.number_of_packets = 1; urbRequest.error_count = 0; urbRequest.signr = 0; urbRequest.usercontext = pData; usbdevfs_iso_packet_desc* pIsoPacketDesc = &amp;urbRequest.iso_frame_desc[0]; pIsoPacketDesc-&gt;length = 384; pIsoPacketDesc-&gt;actual_length = 0; pIsoPacketDesc-&gt;status = 0; </code></pre> <p>Unfgortunately this gives me an error of -28 (ENOSPC).</p> <pre><code>&lt;7&gt;[ 3184.243163] usb 1-1: usbfs: usb_submit_urb returned -28 </code></pre> <p>I can't understand why there wouldn't be enough usb bus bandwidth. There is only 1 usb port and my device is the only device plugged into it. </p> <p>Any thoughts?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload