Quantcast

libusbK: Isochronous OUT

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

libusbK: Isochronous OUT

nikkov
Hello all!

I working with usb audio device based on PCM2902 by TI. My target is play/record audio from my app through usblibk on windows.
I used code from xfer-iso-read.c example and read code working successfully but write code not work. All write transfers is ok, but all ISO packets lengths = 0.
Code fragment:

#define EP_TRANSFER 0x02
#define ISO_PACKETS_PER_XFER 20
#define MAX_OUTSTANDING_TRANSFERS 16
#define MAX_TRANSFERS_TOTAL 8

// Select interface by pipe id and get descriptors.
memset(&gPipeInfo, 0, sizeof(gPipeInfo));
UCHAR interfaceIndex = (UCHAR) - 1;
while(gPipeInfo.PipeId == 0 && Usb.SelectInterface(handle, ++interfaceIndex, TRUE))
{
memset(&interfaceDescriptor, 0, sizeof(interfaceDescriptor));
UCHAR gAltsettingNumber = (UCHAR) - 1;
while(Usb.QueryInterfaceSettings(handle, ++gAltsettingNumber, &interfaceDescriptor))
{
UCHAR pipeIndex = (UCHAR) - 1;
while(Usb.QueryPipe(handle, gAltsettingNumber, ++pipeIndex, &gPipeInfo))
{
if (gPipeInfo.PipeId == EP_TRANSFER &&
gPipeInfo.PipeType == UsbdPipeTypeIsochronous &&
gPipeInfo.MaximumPacketSize)
break;
memset(&gPipeInfo, 0, sizeof(gPipeInfo));
}
if (gPipeInfo.PipeId) break;
memset(&interfaceDescriptor, 0, sizeof(interfaceDescriptor));
}
}

if (!gPipeInfo.PipeId){
printf("Pipe not found.\n");
goto Done1;
}

r = Usb.SetAltInterface(handle, interfaceDescriptor.bInterfaceNumber, FALSE, interfaceDescriptor.bAlternateSetting);

int pos;
MY_ISO_XFERS gXfers;
memset(&gXfers, 0, sizeof(gXfers));
//buffer size
int packetSize = 176;//gPipeInfo.MaximumPacketSize;
gXfers.DataBufferSize = ISO_PACKETS_PER_XFER * packetSize;

r = OvlK_Init(&gXfers.OvlPool, handle, MAX_OUTSTANDING_TRANSFERS, KOVL_POOL_FLAG_NONE);

for (pos = 0; pos < MAX_OUTSTANDING_TRANSFERS; pos++)
{
PMY_ISO_BUFFER_EL bufferEL = (PMY_ISO_BUFFER_EL)malloc(sizeof(MY_ISO_BUFFER_EL));
memset(bufferEL, 0xac, sizeof(*bufferEL));

bufferEL->DataBuffer = (PUCHAR)malloc(gXfers.DataBufferSize);

IsoK_Init(&bufferEL->IsoContext, ISO_PACKETS_PER_XFER, 0);
IsoK_SetPackets(bufferEL->IsoContext, packetSize);

//bufferEL->IsoContext->Flags = KISO_FLAG_SET_START_FRAME;

bufferEL->IsoPackets = bufferEL->IsoContext->IsoPackets;
OvlK_Acquire(&bufferEL->OvlHandle, gXfers.OvlPool);

DL_APPEND(gXfers.BufferList, bufferEL);
DL_APPEND(gXfers.Completed, bufferEL);
}

// Reset the pipe.
Usb.ResetPipe(handle, (UCHAR)gPipeInfo.PipeId);

// Set a start frame (not used) see KISO_FLAG_SET_START_FRAME.
Usb.GetCurrentFrameNumber(handle, &gXfers.FrameNumber);
gXfers.FrameNumber += ISO_PACKETS_PER_XFER * 2;
gXfers.FrameNumber -= gXfers.FrameNumber % ISO_PACKETS_PER_XFER;

errorCode = ERROR_SUCCESS;
// Start reading until an error occurs or MAX_TRANSFERS_TOTAL is reached.
do
{
PMY_ISO_BUFFER_EL nextXfer;
ULONG transferred;

while(errorCode == ERROR_SUCCESS && //without error
gXfers.Completed && //exists complete transfers
gXfers.SubmittedCount < MAX_TRANSFERS_TOTAL) //MAX_TRANSFERS_TOTAL isn't reached
{
nextXfer = gXfers.Completed;
DL_DELETE(gXfers.Completed, nextXfer);
DL_APPEND(gXfers.Outstanding, nextXfer);
OvlK_ReUse(nextXfer->OvlHandle);

SetNextFrameNumber(&gXfers, nextXfer);

//r = Usb.IsoReadPipe(
r = Usb.IsoWritePipe(
handle,
gPipeInfo.PipeId,
nextXfer->DataBuffer,
gXfers.DataBufferSize,
(LPOVERLAPPED)nextXfer->OvlHandle,
nextXfer->IsoContext);

errorCode = GetLastError();
if (errorCode != ERROR_IO_PENDING) {
printf("IsoReadPipe/IsoWritePipe failed. ErrorCode: %08Xh\n", errorCode);
goto Done2;
}
gXfers.SubmittedCount++;
errorCode = ERROR_SUCCESS;
}

nextXfer = gXfers.Outstanding;
if (!nextXfer) {
printf("Done!\n");
goto Done2;
}

r = OvlK_Wait(nextXfer->OvlHandle, 8000, KOVL_WAIT_FLAG_NONE, &transferred);
if (!r) {
errorCode = GetLastError();
printf("OvlK_Wait failed. ErrorCode: %08Xh\n", errorCode);
goto Done2;
}
DL_DELETE(gXfers.Outstanding, nextXfer);
DL_APPEND(gXfers.Completed, nextXfer);

IsoXferComplete(&gXfers, nextXfer, transferred);
}
while(errorCode == ERROR_SUCCESS);

Done2:
Usb.AbortPipe(handle, gPipeInfo.PipeId);


I looked USB packet by sniffer and compare packet my app with usblibk and audio player with windows usb audio driver.

packet by audio app with usb audio driver :
 Length 0x150 
 USBD Status USBD_STATUS_SUCCESS (0x0) 
 EndpointAddress 0x2 
 TransferFlags 0x4 ( USBD_TRANSFER_DIRECTION_OUT USBD_START_ISO_TRANSFER_ASAP ) 
 TransferBufferLength 0xDC8 
 TransferBuffer 0x85E7C038 
 TransferBufferMDL 0x0 
 StartFrame 0x0 
 NumberOfPackets 0x14 
 ErrorCount 0x0 

packet by my app with libusbk: 
 Length 0x150 
 USBD Status USBD_STATUS_SUCCESS (0x0) 
 EndpointAddress 0x2 
 TransferFlags 0x0 ( USBD_TRANSFER_DIRECTION_OUT ) 
 TransferBufferLength 0xDC0 
 TransferBuffer 0x0 
 TransferBufferMDL 0x861639E8 
 StartFrame 0x1E62A2 
 NumberOfPackets 0x14 
 ErrorCount 0x0 
 

Why StartFrame and  TransferFlags  in packets is different? How can I do to StartFrame=0 and TransferFlags set USBD_START_ISO_TRANSFER_ASAP?

Bets regards, Nikolay

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Libusb-win32-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: libusbK: Isochronous OUT

Travis
On 1/26/2012 9:26 PM, Nik Kov wrote:
> Hello all!
>
> I working with usb audio device based on PCM2902 by TI. My target is
> play/record audio from my app through usblibk on windows.
> I used code from xfer-iso-read.c example and read code working
> successfully but write code not work. All write transfers is ok, but
> all ISO packets lengths = 0.

http://libusb-win32.sourceforge.net/libusbKv3/struct_k_i_s_o___p_a_c_k_e_t.html
Length
  Set by the host controller to indicate the actual number of bytes
  received by the device for isochronous IN transfers. Length not used for
  isochronous OUT transfers.

;)



> Code fragment:
>
> #define EP_TRANSFER 0x02
> #define ISO_PACKETS_PER_XFER 20
> #define MAX_OUTSTANDING_TRANSFERS 16
> #define MAX_TRANSFERS_TOTAL 8
>
> // Select interface by pipe id and get descriptors.
> memset(&gPipeInfo, 0, sizeof(gPipeInfo));
> UCHAR interfaceIndex = (UCHAR) - 1;
> while(gPipeInfo.PipeId == 0 && Usb.SelectInterface(handle,
> ++interfaceIndex, TRUE))
> {
> memset(&interfaceDescriptor, 0, sizeof(interfaceDescriptor));
> UCHAR gAltsettingNumber = (UCHAR) - 1;
> while(Usb.QueryInterfaceSettings(handle, ++gAltsettingNumber,
> &interfaceDescriptor))
> {
> UCHAR pipeIndex = (UCHAR) - 1;
> while(Usb.QueryPipe(handle, gAltsettingNumber, ++pipeIndex, &gPipeInfo))
> {
> if (gPipeInfo.PipeId == EP_TRANSFER &&
> gPipeInfo.PipeType == UsbdPipeTypeIsochronous &&
> gPipeInfo.MaximumPacketSize)
> break;
> memset(&gPipeInfo, 0, sizeof(gPipeInfo));
> }
> if (gPipeInfo.PipeId) break;
> memset(&interfaceDescriptor, 0, sizeof(interfaceDescriptor));
> }
> }
>
> if (!gPipeInfo.PipeId){
> printf("Pipe not found.\n");
> goto Done1;
> }
>
> r = Usb.SetAltInterface(handle, interfaceDescriptor.bInterfaceNumber,
> FALSE, interfaceDescriptor.bAlternateSetting);
>
> int pos;
> MY_ISO_XFERS gXfers;
> memset(&gXfers, 0, sizeof(gXfers));
> //buffer size
> int packetSize = 176;//gPipeInfo.MaximumPacketSize;
> gXfers.DataBufferSize = ISO_PACKETS_PER_XFER * packetSize;
>
> r = OvlK_Init(&gXfers.OvlPool, handle, MAX_OUTSTANDING_TRANSFERS,
> KOVL_POOL_FLAG_NONE);
>
> for (pos = 0; pos < MAX_OUTSTANDING_TRANSFERS; pos++)
> {
> PMY_ISO_BUFFER_EL bufferEL =
> (PMY_ISO_BUFFER_EL)malloc(sizeof(MY_ISO_BUFFER_EL));
> memset(bufferEL, 0xac, sizeof(*bufferEL));
>
> bufferEL->DataBuffer = (PUCHAR)malloc(gXfers.DataBufferSize);
>
> IsoK_Init(&bufferEL->IsoContext, ISO_PACKETS_PER_XFER, 0);
> IsoK_SetPackets(bufferEL->IsoContext, packetSize);
>
> //bufferEL->IsoContext->Flags = KISO_FLAG_SET_START_FRAME;
>
> bufferEL->IsoPackets = bufferEL->IsoContext->IsoPackets;
> OvlK_Acquire(&bufferEL->OvlHandle, gXfers.OvlPool);
>
> DL_APPEND(gXfers.BufferList, bufferEL);
> DL_APPEND(gXfers.Completed, bufferEL);
> }
>
> // Reset the pipe.
> Usb.ResetPipe(handle, (UCHAR)gPipeInfo.PipeId);
>
> // Set a start frame (not used) see KISO_FLAG_SET_START_FRAME.
> Usb.GetCurrentFrameNumber(handle, &gXfers.FrameNumber);
> gXfers.FrameNumber += ISO_PACKETS_PER_XFER * 2;
> gXfers.FrameNumber -= gXfers.FrameNumber % ISO_PACKETS_PER_XFER;
>
> errorCode = ERROR_SUCCESS;
> // Start reading until an error occurs or MAX_TRANSFERS_TOTAL is reached.
> do
> {
> PMY_ISO_BUFFER_EL nextXfer;
> ULONG transferred;
>
> while(errorCode == ERROR_SUCCESS && //without error
> gXfers.Completed && //exists complete transfers
> gXfers.SubmittedCount < MAX_TRANSFERS_TOTAL) //MAX_TRANSFERS_TOTAL
> isn't reached
> {
> nextXfer = gXfers.Completed;
> DL_DELETE(gXfers.Completed, nextXfer);
> DL_APPEND(gXfers.Outstanding, nextXfer);
> OvlK_ReUse(nextXfer->OvlHandle);
>
> SetNextFrameNumber(&gXfers, nextXfer);
>
> //r = Usb.IsoReadPipe(
> r = Usb.IsoWritePipe(
> handle,
> gPipeInfo.PipeId,
> nextXfer->DataBuffer,
> gXfers.DataBufferSize,
> (LPOVERLAPPED)nextXfer->OvlHandle,
> nextXfer->IsoContext);
>
> errorCode = GetLastError();
> if (errorCode != ERROR_IO_PENDING) {
> printf("IsoReadPipe/IsoWritePipe failed. ErrorCode: %08Xh\n", errorCode);
> goto Done2;
> }
> gXfers.SubmittedCount++;
> errorCode = ERROR_SUCCESS;
> }
>
> nextXfer = gXfers.Outstanding;
> if (!nextXfer) {
> printf("Done!\n");
> goto Done2;
> }
>
> r = OvlK_Wait(nextXfer->OvlHandle, 8000, KOVL_WAIT_FLAG_NONE,
> &transferred);
> if (!r) {
> errorCode = GetLastError();
> printf("OvlK_Wait failed. ErrorCode: %08Xh\n", errorCode);
> goto Done2;
> }
> DL_DELETE(gXfers.Outstanding, nextXfer);
> DL_APPEND(gXfers.Completed, nextXfer);
>
> IsoXferComplete(&gXfers, nextXfer, transferred);
> }
> while(errorCode == ERROR_SUCCESS);
>
> Done2:
> Usb.AbortPipe(handle, gPipeInfo.PipeId);
>
>
> I looked USB packet by sniffer and compare packet my app with usblibk
> and audio player with windows usb audio driver.
>
> packet by audio app with usb audio driver :
>  Length 0x150
>  USBD Status USBD_STATUS_SUCCESS (0x0)
>  EndpointAddress 0x2
>  TransferFlags 0x4 ( USBD_TRANSFER_DIRECTION_OUT
> USBD_START_ISO_TRANSFER_ASAP )
>  TransferBufferLength 0xDC8
>  TransferBuffer 0x85E7C038
>  TransferBufferMDL 0x0
>  StartFrame 0x0
>  NumberOfPackets 0x14
>  ErrorCount 0x0
>
> packet by my app with libusbk:
>  Length 0x150
>  USBD Status USBD_STATUS_SUCCESS (0x0)
>  EndpointAddress 0x2
>  TransferFlags 0x0 ( USBD_TRANSFER_DIRECTION_OUT )
>  TransferBufferLength 0xDC0
>  TransferBuffer 0x0
>  TransferBufferMDL 0x861639E8
>  StartFrame 0x1E62A2
>  NumberOfPackets 0x14
>  ErrorCount 0x0
>
> Why StartFrame and  TransferFlags  in packets is different? How can I
> do to StartFrame=0 and TransferFlags set USBD_START_ISO_TRANSFER_ASAP?
>

libusbK.sys will manage the start frame by default,  but there is a pipe
policy to force the ASAP flag.
http://libusb-win32.sourceforge.net/libusbKv3/usbk_pipe_management.html
I need to update my docs but they only thing they do say is it should
default to use ASAP for OUT (by default) and the start frame for (IN).

Set the ISO_ALWAYS_START_ASAP pipe policy and see if that helps. ..or
maybe clear it.. ;)

Regards,
Travis


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Libusb-win32-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: libusbK: Isochronous OUT

Xiaofan Chen
In reply to this post by nikkov
On Fri, Jan 27, 2012 at 1:26 PM, Nik Kov <[hidden email]> wrote:
> I working with usb audio device based on PCM2902 by TI. My target is
> play/record audio from my app through libusbk on windows.

Just curious, why not use the Windows audio related API? What
do you gain by using libusbK?

--
Xiaofan

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Libusb-win32-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: libusbK: Isochronous OUT

nikkov
In reply to this post by nikkov
>From: Travis
>http://libusb-win32.sourceforge.net/libusbKv3/struct_k_i_s_o___p_a_c_k_e_t.html
>Length
>  Set by the host controller to indicate the actual number of bytes
>  received by the device for isochronous IN transfers. Length not used for
>  isochronous OUT transfers.
>
>;)
 Yes it is :-) . But I checked also transfer by sniffer and all the same data length=0

>libusbK.sys will manage the start frame by default,  but there is a pipe
>policy to force the ASAP flag.
>http://libusb-win32.sourceforge.net/libusbKv3/usbk_pipe_management.html
>I need to update my docs but they only thing they do say is it should
>default to use ASAP for OUT (by default) and the start frame for (IN).
>
>Set the ISO_ALWAYS_START_ASAP pipe policy and see if that helps. ..or
>maybe clear it.. ;)
>
>Regards,
>Travis

I set pipe policy ISO_ALWAYS_START_ASAP and get ISO_ALWAYS_START_ASAP and StartFrame=0 in all packets.
Data to device is still not passed.

>From: Xiaofan Chen
>Just curious, why not use the Windows audio related API? What
>do you gain by using libusbK?
>
>--
>Xiaofan

It's only for learning. In future I plan to work with custom high speed USB audio device

Best regards.
Nikolay


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Libusb-win32-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: libusbK: Isochronous OUT

nikkov
In reply to this post by nikkov
Hello all!

Has someone really working code isochronous OUT for windows with libusbK?

Nikolay


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Libusb-win32-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: libusbK: Isochronous OUT

Travis
On 1/31/2012 11:38 PM, Nik Kov wrote:
> Hello all!
>
> Has someone really working code isochronous OUT for windows with libusbK?
>

I actually do not have any examples that use the UsbK_IsoWritePipe()
function; I will try and add one before the next release.

On the other hand, generally the regular UsbK_WritePipe() function is
sufficient for ISO OUT endpoints.

I use the MCP benchmark firmware to test most of the ISO codes.  Below
is the console output and the driver log for an HS, ISO, 1024 byte OUT ep.

Regards,
Travis


Z:>kbench write list altf=6 ep=0x6 notestselect buffersize=8192
device-count=1
1. CY-Stream (USB\VID_0404&PID_1003\10000000) [libusbK]
Select device (1-1) :1

opened CY-Stream (USB\VID_0404&PID_1003\10000000)..
Write Test Information
         Driver          : libusbK
         Vid / Pid       : 0404h / 1003h
         DevicePath      :
\\?\USB#VID_0404&PID_1003#10000000#{cdc626e8-e538-5ac6-23a8-2b5ad5c1963b}
         Device Speed    : High
         Interface #     : 00h
         Alt Interface # : 06h
         Num Endpoints   : 2
         Priority        : 0
         Read Size       : 8192
         Write Size      : 8192
         Buffer Count    : 2
         Display Refresh : 1000 (ms)
         Transfer Timeout: 5000 (ms)
         Retry Count     : 0
         Verify Data     : Off

Isochronous Write (Ep06h) max packet size: 1024

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 8200208.42 Transfers: 999 Bytes/s: 8200208.42
Avg. Bytes/s: 8196071.57 Transfers: 2013 Bytes/s: 8192000.00
Avg. Bytes/s: 8194707.20 Transfers: 3027 Bytes/s: 8192000.00
Avg. Bytes/s: 8194027.72 Transfers: 4041 Bytes/s: 8192000.00
Avg. Bytes/s: 8193620.89 Transfers: 5055 Bytes/s: 8192000.00
Avg. Bytes/s: 8193350.03 Transfers: 6069 Bytes/s: 8192000.00
Avg. Bytes/s: 8193156.74 Transfers: 7083 Bytes/s: 8192000.00
Avg. Bytes/s: 8193011.86 Transfers: 8097 Bytes/s: 8192000.00
waiting for Ep06h thread..
stopped Ep06h thread.   ExitCode=0
Write Test Information
         Driver          : libusbK
         Vid / Pid       : 0404h / 1003h
         DevicePath      :
\\?\USB#VID_0404&PID_1003#10000000#{cdc626e8-e538-5ac6-23a8-2b5ad5c1963b}
         Device Speed    : High
         Interface #     : 00h
         Alt Interface # : 06h
         Num Endpoints   : 2
         Priority        : 0
         Read Size       : 8192
         Write Size      : 8192
         Buffer Count    : 2
         Display Refresh : 1000 (ms)
         Transfer Timeout: 5000 (ms)
         Retry Count     : 0
         Verify Data     : Off

Isochronous Write (Ep06h) max packet size: 1024
         Total Bytes     : 66338816
         Total Transfers : 8098
         Avg. Bytes/sec  : 8177861.93
         Elapsed Time    : 8.11 seconds

Press any key to exit..

[DriverEntry](libusbK.sys) v3.0.5.2 built-on: Jan 28 2012 16:54:25
(libusbK.sys)[Registry_ReadAllDeviceKeys] Found 1 DeviceInterfaceGUIDs
strings.
(libusbK.sys)[Device_OnAdd] [dev-id=#1]
SymbolicLink=\DosDevices\libusb0-0255
(libusbK.sys)[Device_OnAdd] [dev-id=#1] assigned DeviceInterfaceGUID
{CDC626E8-E538-5AC6-23A8-2B5AD5C1963B}.
(libusbK.sys)[Device_Create] DeviceSpeed=High RemoteWakeCapable=True
SelfPowered=False
(libusbK.sys)[Device_Configure] Using single interface configuration..
(libusbK.sys)[Pipe_InitContext] pipeID=00h Creating pipe queue.
(libusbK.sys)[Pipe_InitContext] pipeID=00h queue starting..
(libusbK.sys)[Interface_InitContext] configured Read pipe: PipeID=82h
MaximumPacketSize=512 MaximumTransferSize=2097152 PipeType=Bulk
(libusbK.sys)[Pipe_InitContext] pipeID=82h Creating pipe queue.
(libusbK.sys)[Pipe_InitQueue] Configuring sequential queue..
(libusbK.sys)[Pipe_InitContext] pipeID=82h starting..
(libusbK.sys)[Pipe_InitContext] pipeID=82h queue starting..
(libusbK.sys)[Device_OnD0Entry] Entering D0. Leaving D4.
AllK required contiguous memory = 146784 (64bit)
   8 HotK Handles: HandleSize 2112 PoolSize 16904 (bytes)
   64 LstK Handles: HandleSize 64 PoolSize 4104 (bytes)
   128 LstInfoK Handles: HandleSize 56 PoolSize 7176 (bytes)
   64 UsbK Handles: HandleSize 96 PoolSize 6152 (bytes)
   32 DevK Handles: HandleSize 112 PoolSize 3592 (bytes)
   1024 OvlK Handles: HandleSize 96 PoolSize 98312 (bytes)
   64 OvlPoolK Handles: HandleSize 80 PoolSize 5128 (bytes)
   32 StmK Handles: HandleSize 168 PoolSize 5384 (bytes)
KLST_DEVINFO = 2332 bytes
(libusbK.sys)[Device_OnFileCreate] begins
(libusbK.sys)[Device_OnFileCreate] ends
(libusbK.lib)[k_Init_Version] libusbK.sys v3.0.5.2
(libusbK.sys)[XferCtrl] bmDir=DeviceToHost(1) bmType=Standard(0)
bmRecipient=Device(0) bmReserved=000 bRequest=6 wIndex=0 wValue=512
wLength=0
(libusbK.sys)[XferCtrl] bmDir=DeviceToHost(1) bmType=Standard(0)
bmRecipient=Device(0) bmReserved=000 bRequest=6 wIndex=0 wValue=512
wLength=0
(libusbK.sys)[XferCtrl] bmDir=DeviceToHost(1) bmType=Standard(0)
bmRecipient=Device(0) bmReserved=000 bRequest=6 wIndex=0 wValue=256
wLength=0
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 1
does not exists.
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 1
does not exists.
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 2
does not exists.
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 1
does not exists.
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 1
does not exists.
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 1
does not exists.
[ERR](libusbK.lib)[UsbStack_QueryPipe] ErrorCode=00000103h PipeIndex 2
does not exists.
(libusbK.sys)[Interface_SetAltSetting] selected alt setting index 6 on
interface number 0
(libusbK.sys)[Interface_DeletePipeQueues] pipeID=82h Destroying pipe queue.
(libusbK.sys)[Interface_InitContext] configured Read pipe: PipeID=82h
MaximumPacketSize=1024 MaximumTransferSize=1048576 PipeType=Isochronous
(libusbK.sys)[Interface_InitContext] configured Write pipe: PipeID=06h
MaximumPacketSize=1024 MaximumTransferSize=1048576 PipeType=Isochronous
(libusbK.sys)[Pipe_InitContext] pipeID=82h Creating pipe queue.
(libusbK.sys)[Pipe_InitQueue] Configuring parallel queue..
(libusbK.sys)[Pipe_InitContext] pipeID=82h starting..
(libusbK.sys)[Pipe_InitContext] pipeID=82h queue starting..
(libusbK.sys)[Pipe_InitContext] pipeID=06h Creating pipe queue.
(libusbK.sys)[Pipe_InitQueue] Configuring parallel queue..
(libusbK.sys)[Pipe_InitContext] pipeID=06h starting..
(libusbK.sys)[Pipe_InitContext] pipeID=06h queue starting..
(libusbK.sys)[DefaultQueue_OnIoControl] QueryDeviceInformation:
informationType=01h valueLength=4
(libusbK.sys)[Pipe_Reset] pipeID=06h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF817Dh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF817Eh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF817Fh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8180h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8181h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8182h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8183h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8184h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8185h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8186h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8187h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8188h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8189h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF818Ah
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF818Bh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF818Ch
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF818Dh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF818Eh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF818Fh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8190h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8191h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8192h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8193h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8194h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8195h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8196h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8197h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8198h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF8199h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF819Ah
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF819Bh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF819Ch
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF819Dh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF819Eh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF819Fh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A0h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A1h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A2h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A3h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A4h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A5h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF81A6h
Errors=0 Status=00000000h
..snip..
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94EEh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94EFh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F0h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F1h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F2h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F3h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F4h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F5h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F6h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F7h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F8h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94F9h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94FAh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94FBh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94FCh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94FDh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94FEh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF94FFh
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF9500h
Errors=0 Status=00000000h
(libusbK.sys)[XferIsoWrComplete] Transferred=8192 StartFrame=16FF9501h
Errors=0 Status=00000000h
(libusbK.sys)[Pipe_Abort] pipeID=06h
(libusbK.sys)[Pipe_Abort] pipeID=06h
[WRN](libusbK.sys)[XferIsoWrComplete] [Cancelled] PipeID=06h
Status=C0000120h
(libusbK.sys)[Interface_ReleaseAll] releasing all interfaces bound to
file object 0xb8c8850
(libusbK.sys)[Device_OnFileClose] OpenedFileHandleCount=0


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Libusb-win32-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: libusbK: Isochronous OUT

nikkov
Thank you Travis!

I found problem in USB sniffer. Now I use usblyzer and all OK!
I previously use USBTrace and USBTrace did not show the packet size if I run my program with libusbk but did show the packet size if used usb audio driver.

Nikolay
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: libusbK: Isochronous OUT

Travis
On 2/3/2012 9:11 PM, nikkov wrote:
> Thank you Travis!
>
> I found problem in USB sniffer. Now I use usblyzer and all OK!
> I previously use USBTrace and USBTrace did not show the packet size if I run
> my program with libusbk but did show the packet size if used usb audio
> driver.
>

Glad you are having some success.

If we are talking about the packet length field of the individual ISO
packets then libusbK will always set it to 0 before submitting.  This
field is not assigned by the user.  It is set by the host after
completing a transfer to an IN EP only.  It indicates the number of
bytes that were actually accepted by the device.
http://msdn.microsoft.com/en-us/library/windows/hardware/ff539084%28v=vs.85%29.aspx

Some drivers set this length field for IN and OUT transfers before
subitting.  I believe libusb-win32 does, and apparently so does the usb
audio driver. ;)  ..but it is not needed.

Regards,
Travis



------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Libusb-win32-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: libusbK: Isochronous OUT

nikkov
Hi Travis,

Thank you very match for your library libusbk!!!

I made ASIO driver for open source/open hardware device Audio-Widget/SDR-Widget.
As you may know windows don't have support USB Audio class 2 and we could not use this device on windows without commercial drivers. But through your work we can now do!

My code you can find on github https://github.com/nikkov/Win-Widget

Nikolay
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: libusbK: Isochronous OUT

Xiaofan Chen
On Wed, Feb 15, 2012 at 11:36 AM, nikkov <[hidden email]> wrote:

> Hi Travis,
>
> Thank you very match for your library libusbk!!!
>
> I made ASIO driver for open source/open hardware device
> http://code.google.com/p/sdr-widget/ Audio-Widget/SDR-Widget .
> As you may know windows don't have support USB Audio class 2 and we could
> not use this device on windows without commercial drivers. But through your
> work we can now do!
>
> My code you can find on github  https://github.com/nikkov/Win-Widget
> https://github.com/nikkov/Win-Widget
>

Wonderful! Thanks for the email.



--
Xiaofan

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Libusb-win32-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
Loading...