|
From: 손창범 <ckd...@gm...> - 2019-05-07 02:44:37
|
Hello libusb team! I'm dealing with usb headset(audio device). last time I've asked question about control_transfer(copy protection) and I 've done with that issue. But other issue comes up now. My device supports PCM data format (sampling rate 48k). So I've loaded suitable wav data and send it to device by ISOCHRONOUS transfer(descriptor says that Audio-streaming data EP address 0x01) And I've checked that proper sound comes out for a little time only. problem is this. When I send 1920(bytes) * 254 times, device reports LIBUSB_ERROR_NO_MEM. I've changed it to 2000(bytes) * several times and Memory error appears at similar memory amount. I'm curious that is it just only my device doesn't support enough memory or am I wrong with handle it. because I tracked packets by protocol analyzer and found that well-operating drivers also send ISO transfers like me(just load the pcm data and send it by ISO transfer). thank you for your support! 2019년 4월 27일 (토) 오전 1:51, 손창범 <ckd...@gm...>님이 작성: > Hello libusb team! > > I'm dealing with usb headset(audio device). > > I want to send libusb_control_transfer and failed with error code -9(error > pipe : people say usually it means stall(invalid parameter)) > below is the contents > > bmRequest Type > > bRequest > > wValue > > wIndex > > wLength > > Data > > 10100001b > > GET_CUR > > GET_MIN > > GET_MAX > > GET_RES > > Control Selector > > (CS) > > Terminal ID > > and > > Interface > > Length of > > Parameter > > block > > Parameter > > block > bmRequest Type : 10100001= 0xA1 > bRequest : 0x81 GET_CUR > wValue : COPY_PROTECT_CONTROL 0x0100 > wIndex : 0x0100(0x01 :terminal ID 0x00 : Interface 0(alternate 0) ) > wLength : 0x0001(1byte) > Data : I declared it like uint8_t data; > And my code here > r1 = libusb_control_transfer(dev_handle, 0xA1, 0x81, 0x0100, 0x0100, > &data, 0x0001, 1); > > can it be the Issues like byte_ordering(my VS is little_endian order) > > Can you guys help me with correct this error? > |