sunder kandasamy
2018-11-26 06:19:08 UTC
I am attempting to Submit ISOCHRONOUS URB in Android NDK in C.
usbdevfs_urb& urbRequest = *(usbdevfs_urb*)malloc( 384 );
urbRequest.type = USBDEVFS_URB_TYPE_ISO;
urbRequest.endpoint = mpEndpoint->GetEndpointAddress();//mpEndpoint->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 = SIGRTMIN;
urbRequest.usercontext = pData;
usbdevfs_iso_packet_desc* pIsoPacketDesc = &urbRequest.iso_frame_desc[0];
pIsoPacketDesc->length = 384;
pIsoPacketDesc->actual_length = 0;
pIsoPacketDesc->status = 0;
ioctl( fd, USBDEVFS_SUBMITURB, &usbRequest);
In the above code, I want to set SIGRTMIN signal for urbRequest.signr. So
that i can get the SIGRTMIN signal on URB completion and i can call REAP
URB after
But in Android i am not getting the SIGRTMIN signal at all. Instead my app
gets killed without any exception
is there any way i can use SIGRTMIN signal for submitting URB in Android?
Note: I tried using SIGUSR1 and SIGUSR2 signals but ART is catching those
signals
is there anyway to do isochronous, interrupt, bulk transfer (using non
blocking asynchronous IO) in Android?
usbdevfs_urb& urbRequest = *(usbdevfs_urb*)malloc( 384 );
urbRequest.type = USBDEVFS_URB_TYPE_ISO;
urbRequest.endpoint = mpEndpoint->GetEndpointAddress();//mpEndpoint->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 = SIGRTMIN;
urbRequest.usercontext = pData;
usbdevfs_iso_packet_desc* pIsoPacketDesc = &urbRequest.iso_frame_desc[0];
pIsoPacketDesc->length = 384;
pIsoPacketDesc->actual_length = 0;
pIsoPacketDesc->status = 0;
ioctl( fd, USBDEVFS_SUBMITURB, &usbRequest);
In the above code, I want to set SIGRTMIN signal for urbRequest.signr. So
that i can get the SIGRTMIN signal on URB completion and i can call REAP
URB after
But in Android i am not getting the SIGRTMIN signal at all. Instead my app
gets killed without any exception
is there any way i can use SIGRTMIN signal for submitting URB in Android?
Note: I tried using SIGUSR1 and SIGUSR2 signals but ART is catching those
signals
is there anyway to do isochronous, interrupt, bulk transfer (using non
blocking asynchronous IO) in Android?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/5bf68cbd-d0c0-4697-92b2-7253773b85b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/5bf68cbd-d0c0-4697-92b2-7253773b85b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.