Lines Matching refs:data
32 u8 intfnum, u8 cs, void *data, u16 size,
43 unit << 8 | intfnum, data, size, timeout);
71 u8 intfnum, u8 cs, void *data, u16 size)
77 ret = __uvc_query_ctrl(dev, query, unit, intfnum, cs, data, size,
89 /* Reuse data[0] to request the error code. */
90 tmp = *(u8 *)data;
93 UVC_VC_REQUEST_ERROR_CODE_CONTROL, data, 1,
96 error = *(u8 *)data;
97 *(u8 *)data = tmp;
259 u8 *data;
266 data = kmalloc(size, GFP_KERNEL);
267 if (data == NULL)
271 probe ? UVC_VS_PROBE_CONTROL : UVC_VS_COMMIT_CONTROL, data,
284 ctrl->wCompQuality = le16_to_cpup((__le16 *)data);
306 ctrl->bmHint = le16_to_cpup((__le16 *)&data[0]);
307 ctrl->bFormatIndex = data[2];
308 ctrl->bFrameIndex = data[3];
309 ctrl->dwFrameInterval = le32_to_cpup((__le32 *)&data[4]);
310 ctrl->wKeyFrameRate = le16_to_cpup((__le16 *)&data[8]);
311 ctrl->wPFrameRate = le16_to_cpup((__le16 *)&data[10]);
312 ctrl->wCompQuality = le16_to_cpup((__le16 *)&data[12]);
313 ctrl->wCompWindowSize = le16_to_cpup((__le16 *)&data[14]);
314 ctrl->wDelay = le16_to_cpup((__le16 *)&data[16]);
315 ctrl->dwMaxVideoFrameSize = get_unaligned_le32(&data[18]);
316 ctrl->dwMaxPayloadTransferSize = get_unaligned_le32(&data[22]);
319 ctrl->dwClockFrequency = get_unaligned_le32(&data[26]);
320 ctrl->bmFramingInfo = data[30];
321 ctrl->bPreferedVersion = data[31];
322 ctrl->bMinVersion = data[32];
323 ctrl->bMaxVersion = data[33];
341 kfree(data);
349 u8 *data;
352 data = kzalloc(size, GFP_KERNEL);
353 if (data == NULL)
356 *(__le16 *)&data[0] = cpu_to_le16(ctrl->bmHint);
357 data[2] = ctrl->bFormatIndex;
358 data[3] = ctrl->bFrameIndex;
359 *(__le32 *)&data[4] = cpu_to_le32(ctrl->dwFrameInterval);
360 *(__le16 *)&data[8] = cpu_to_le16(ctrl->wKeyFrameRate);
361 *(__le16 *)&data[10] = cpu_to_le16(ctrl->wPFrameRate);
362 *(__le16 *)&data[12] = cpu_to_le16(ctrl->wCompQuality);
363 *(__le16 *)&data[14] = cpu_to_le16(ctrl->wCompWindowSize);
364 *(__le16 *)&data[16] = cpu_to_le16(ctrl->wDelay);
365 put_unaligned_le32(ctrl->dwMaxVideoFrameSize, &data[18]);
366 put_unaligned_le32(ctrl->dwMaxPayloadTransferSize, &data[22]);
369 put_unaligned_le32(ctrl->dwClockFrequency, &data[26]);
370 data[30] = ctrl->bmFramingInfo;
371 data[31] = ctrl->bPreferedVersion;
372 data[32] = ctrl->bMinVersion;
373 data[33] = ctrl->bMaxVersion;
377 probe ? UVC_VS_PROBE_CONTROL : UVC_VS_COMMIT_CONTROL, data,
386 kfree(data);
471 const u8 *data, int len)
482 switch (data[1] & (UVC_STREAM_PTS | UVC_STREAM_SCR)) {
514 buf->pts = get_unaligned_le32(&data[2]);
520 * To limit the amount of data, drop SCRs with an SOF identical to the
522 * all the data packets of the same frame contains the same SOF. In that
525 dev_sof = get_unaligned_le16(&data[header_size - 2]);
567 sample->dev_stc = get_unaligned_le32(&data[header_size - 6]);
811 const u8 *data, int len)
824 switch (data[1] & (UVC_STREAM_PTS | UVC_STREAM_SCR)) {
844 if (len < header_size || data[0] < header_size) {
851 pts = get_unaligned_le32(&data[2]);
854 scr_stc = get_unaligned_le32(&data[header_size - 6]);
855 scr_sof = get_unaligned_le16(&data[header_size - 2]);
919 if (data[1] & UVC_STREAM_ERR)
1021 * uvc_video_decode_start is called with URB data at the start of a bulk or
1022 * isochronous payload. It processes header data and returns the header size
1027 * as done, and that the function should be called again with the same data
1036 * uvc_video_decode_data is called for every URB with URB data. It copies the
1037 * data to the video buffer.
1039 * uvc_video_decode_end is called with header data at the end of a bulk or
1040 * isochronous payload. It performs any additional header data processing and
1041 * returns 0 or a negative error code if an error occurred. As header data have
1048 * To let the decoder process header data and update its internal state even
1054 struct uvc_buffer *buf, const u8 *data, int len)
1064 if (len < 2 || data[0] < 2 || data[0] > len) {
1069 fid = data[1] & UVC_STREAM_FID;
1081 uvc_video_clock_decode(stream, buf, data, len);
1082 uvc_video_stats_decode(stream, data, len);
1094 if (data[1] & UVC_STREAM_ERR) {
1114 (data[1] & UVC_STREAM_EOF))
1152 return data[0];
1181 * Copy URB data to video buffers in process context, releasing buffer
1206 struct uvc_buffer *buf, const u8 *data, int len)
1221 op->src = data;
1239 struct uvc_buffer *buf, const u8 *data, int len)
1242 if (data[1] & UVC_STREAM_EOF && buf->bytesused != 0) {
1244 if (data[0] == len)
1257 * data to the transfer buffer and returns the header size. As the only known
1261 * uvc_video_encode_data is called for every URB and copies the data from the
1265 struct uvc_buffer *buf, u8 *data, int len)
1267 data[0] = 2; /* Header length */
1268 data[1] = UVC_STREAM_EOH | UVC_STREAM_EOF
1274 struct uvc_buffer *buf, u8 *data, int len)
1280 /* Copy video data to the URB buffer. */
1285 memcpy(data, mem, nbytes);
1304 * data and that either contain no SCR value or an SCR value identical to the
1447 /* Decode the payload data. */
1510 /* Prepare video data for processing. */
1556 /* Process video data. */