>Hi Laurent,
> During enumeration the device is sending the proper
>dwMaxpayloadTransferSize to the host.
>In the host side also, it is refelecting. But when we start streaming, the
>host application is doing
>SET_CUR call of PROBE which is sending "0" to the device and device is
>sending back the same
>value to host. In case of ISOC also this value is being reset to "0" where
>as ISOC consider dwMaxFrameSize
>which it got from the host application and sending the same to the device.
>Due to this, ISOC doesn't fail.

Laurent replied:

> The dwMaxPayloadTransferSize field should be filled by the device when
> queried
> for the current video streaming probe or commit parameters. If the device
> returns 0, that's a device bug. In that case you should fix the device to
> return the correct value.
>
> --
> Regards,
>
> Laurent Pinchart


Laurent is correct.

In revision 1.1 of the UVC specification (page 109) you can read that the 
dwMaxPayloadTransferSize is set by the DEVICE, and read-only by the HOST. When 
the device returns the data (in response to a GET_CUR, for example), it will 
need to include the proper value for the control requested (probe or commit). 
The host can inspect this, and make changes to some values which are not read 
only. It can send the data back (with a SET_CUR). Typically it needs to do this 
on the probe control until it has reached some acceptable values. Then it can 
commit those values by doing a SET_CUR on the commit control.

On page 112 of the same specification, you may find a justification for the 
host setting the dwMaxPayloadTransferSize to 0. It clearly states that the host 
is expected to set only certain values, and have "all the remaining fields set 
to zero".

I believe in your case, the device is accepting the payload size value that has 
been reset by the host to 0. This it should not do. You probably will find that 
on a SET_CUR, the device simply accepts the value as send by the host and uses 
it in further probe/commit requests as the 'actual' value. 

You can fix this by only selectively copy fields from the data provided by the 
host on a SET_CUR request. Have your device accept only those values  that the 
host is allowed to change (read the specification) and reflect the consequences 
of these in the other fields (those that are read-only by the host).

Regards,

Robert Lukassen 
_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to