Thanks very much for the long and detailed instructions. Thanks to it, I successfully rebuilt the kernel 2.6.11. And the debug code you put into devio.c is working.
With the new built kernel, the problem with get ISO data from a microphone that connected to iMic USB is gone, so it seemed that the kernel 2.6.5 caused this problem. I can retrieve data from the microphone, but there is still other things do not work right. The sampling frequency is not correct. The following info of iMic shows that the endpoint I am accessing has a sample freq range from 6400 to 48000, and I just got the lowest sample freq.
Now I try to set the sample frequency to 44100, the CD standard. I read the spec about audio class usb, and realize that I need to send an audio class request. I created a usbControlIrp, as
usbControlIrp = pipe.createUsbControlIrp(bmRequestType=00100010B, bRequest=SET_CUR=ox01, wValue=ENDPOINT_SAMPLING_FREQ_CONTROL=0x0100, wIndex=epAddress=0x84)
byte[] data = new byte[3] and set value to 44100
usbControlIrp.setData(data);
usbControlIrp.setAcceptShortPacket(false);
usbPipe.syncSubmit(usbControlIrp);
It failed, and the log info in messages are:
May 12 21:30:13 localhost kernel: JAVAX.USB DEBUG: starting type switch uurb.type 0x0
My 12 21:30:13 localhost kernel: JAVAX.USB DEBUG: Enter USBDEVFS_URB_TYPE_ISO
May 12 21:30:13 localhost kernel: JAVAX.USB DEBUG: Leave USBDEVFS_URB_TYPE_ISO totlen 3
May 12 21:30:13 localhost kernel: drivers/usb/core/urb.c: BOGUS urb flags, 3 --> 2
M 12 21:30:13 localhost kernel: JAVAX.USB DEBUG: error in usb_submit_urb err -22
I cannot figure out what that means, but I am sure I don't know how to send a audio class request. Please help.
Charles
Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 2 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioControl Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 13 bDelay 0 frames wFormatTag 1 PCM AudioControl Interface Descriptor: bLength 14 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 1 bSubframeSize 2 bBitResolution 16 bSamFreqType 0 Continuous tLowerSamFreq 6400 tUpperSamFreq 48000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 9 Transfer Type Isochronous Synch Type Adaptive Usage Type Data wMaxPacketSize 0x0064 bytes 100 once bInterval 1 bRefresh 0 bSynchAddress 0 AudioControl Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x01 Sampling Frequency bLockDelayUnits 2 Decoded PCM samples wLockDelay 1 Decoded PCM samples
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click _______________________________________________ javax-usb-devel mailing list javax-usb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/javax-usb-devel