liu liming(deleted)
|
Composite USB Device Driver: Can't Select Audio Interface And Auido I/O Error
|
liu liming(deleted)
06/22/2009 8:27 AM
post32197
|
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
|
|
|