Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Composite USB Device Driver: Can't Select Audio Interface And Auido I/O Error: (2 Items)
   
Composite USB Device Driver: Can't Select Audio Interface And Auido I/O Error  
Hi,everybody

   I have a composite usb device:
   1)A hid out to usb device, a video in to host with bulk transport mode , and an audio device in to host.
   2)There is only a configure for this Miscellaneous Device Class
   3)For the audio device's auido stream interface descriptor, there are two alternate setting . No. 0 with not endpoint
 ,and No.1 with an ISOCHRONOUS endpoint.

   I wrote insertion function to all the three device, but there is some question.
   1)In auido device insertion fucntion, if I run  the function of usbd_select_configure , then the function of 
usbd_select_interface will be ok; 
    But , if I not run the usbd_select_configure, the the function of usbd_select_interface will failed and the return 
code will be EBUSY(16).It means that the audio device is in busy.
   For there is only one configure for devices and I think usbd_select_configure is not necessary.But why I should run 
this funciton.

  2)If I run the usbd_select_configure and usbd_select_interface ,so insertion process will be OK.Then when I open the 
auido device and receive data from, I can't get normal data : the status of URB is USBD_STATUS_CMP_ERR;the return value 
of  usbd_urb_status() is EIO(5).
   In my hand , I have an logitech web camera.The usb descriptor of logitech's audio in device is almost same as my 
audio in device.The only different thing the max packet size.I used my program to recevie audio data from logitech web 
camera , it looks ok.

  3)Audio device can't work with video and hid device.If I remove the auido device insertion function , the video and 
hid device will works ok;If I don't remove the audio device insertion function ,the receive function of video device and
 the send function of hid device will be locked.

   I followed the qnx refrence about usb ddk , I check my source code 
 and not sure how to fix those question. 

   What can I do to find the reason and fix it.Thanks every much.

Best Regard
Liu Liming
Re: Composite USB Device Driver: Can't Select Audio Interface And Auido I/O Error  
Hi Liu

I'm trying to understand how to write a class driver for and AudioStreming interface... I see that you managed some good
 data from the logitech USB camera. Can I ask you some sample code for setting up the USB audio class under QNX?

thanks in advance!
Davide