Lines Matching refs:data
29 u8 intfnum, u8 cs, void *data, u16 size,
40 unit << 8 | intfnum, data, size, timeout);
68 u8 intfnum, u8 cs, void *data, u16 size)
74 ret = __uvc_query_ctrl(dev, query, unit, intfnum, cs, data, size,
86 tmp = *(u8 *)data;
89 UVC_VC_REQUEST_ERROR_CODE_CONTROL, data, 1,
92 error = *(u8 *)data;
93 *(u8 *)data = tmp;
251 u8 *data;
258 data = kmalloc(size, GFP_KERNEL);
259 if (data == NULL)
263 probe ? UVC_VS_PROBE_CONTROL : UVC_VS_COMMIT_CONTROL, data,
275 ctrl->wCompQuality = le16_to_cpup((__le16 *)data);
296 ctrl->bmHint = le16_to_cpup((__le16 *)&data[0]);
297 ctrl->bFormatIndex = data[2];
298 ctrl->bFrameIndex = data[3];
299 ctrl->dwFrameInterval = le32_to_cpup((__le32 *)&data[4]);
300 ctrl->wKeyFrameRate = le16_to_cpup((__le16 *)&data[8]);
301 ctrl->wPFrameRate = le16_to_cpup((__le16 *)&data[10]);
302 ctrl->wCompQuality = le16_to_cpup((__le16 *)&data[12]);
303 ctrl->wCompWindowSize = le16_to_cpup((__le16 *)&data[14]);
304 ctrl->wDelay = le16_to_cpup((__le16 *)&data[16]);
305 ctrl->dwMaxVideoFrameSize = get_unaligned_le32(&data[18]);
306 ctrl->dwMaxPayloadTransferSize = get_unaligned_le32(&data[22]);
309 ctrl->dwClockFrequency = get_unaligned_le32(&data[26]);
310 ctrl->bmFramingInfo = data[30];
311 ctrl->bPreferedVersion = data[31];
312 ctrl->bMinVersion = data[32];
313 ctrl->bMaxVersion = data[33];
330 kfree(data);
338 u8 *data;
341 data = kzalloc(size, GFP_KERNEL);
342 if (data == NULL)
345 *(__le16 *)&data[0] = cpu_to_le16(ctrl->bmHint);
346 data[2] = ctrl->bFormatIndex;
347 data[3] = ctrl->bFrameIndex;
348 *(__le32 *)&data[4] = cpu_to_le32(ctrl->dwFrameInterval);
349 *(__le16 *)&data[8] = cpu_to_le16(ctrl->wKeyFrameRate);
350 *(__le16 *)&data[10] = cpu_to_le16(ctrl->wPFrameRate);
351 *(__le16 *)&data[12] = cpu_to_le16(ctrl->wCompQuality);
352 *(__le16 *)&data[14] = cpu_to_le16(ctrl->wCompWindowSize);
353 *(__le16 *)&data[16] = cpu_to_le16(ctrl->wDelay);
354 put_unaligned_le32(ctrl->dwMaxVideoFrameSize, &data[18]);
355 put_unaligned_le32(ctrl->dwMaxPayloadTransferSize, &data[22]);
358 put_unaligned_le32(ctrl->dwClockFrequency, &data[26]);
359 data[30] = ctrl->bmFramingInfo;
360 data[31] = ctrl->bPreferedVersion;
361 data[32] = ctrl->bMinVersion;
362 data[33] = ctrl->bMaxVersion;
366 probe ? UVC_VS_PROBE_CONTROL : UVC_VS_COMMIT_CONTROL, data,
375 kfree(data);
461 const u8 *data, int len)
472 switch (data[1] & (UVC_STREAM_PTS | UVC_STREAM_SCR)) {
503 buf->pts = get_unaligned_le32(&data[2]);
508 /* To limit the amount of data, drop SCRs with an SOF identical to the
511 dev_sof = get_unaligned_le16(&data[header_size - 2]);
552 sample->dev_stc = get_unaligned_le32(&data[header_size - 6]);
795 const u8 *data, int len)
808 switch (data[1] & (UVC_STREAM_PTS | UVC_STREAM_SCR)) {
828 if (len < header_size || data[0] < header_size) {
835 pts = get_unaligned_le32(&data[2]);
838 scr_stc = get_unaligned_le32(&data[header_size - 6]);
839 scr_sof = get_unaligned_le16(&data[header_size - 2]);
902 if (data[1] & UVC_STREAM_ERR)
1003 * uvc_video_decode_start is called with URB data at the start of a bulk or
1004 * isochronous payload. It processes header data and returns the header size
1009 * as done, and that the function should be called again with the same data
1018 * uvc_video_decode_data is called for every URB with URB data. It copies the
1019 * data to the video buffer.
1021 * uvc_video_decode_end is called with header data at the end of a bulk or
1022 * isochronous payload. It performs any additional header data processing and
1023 * returns 0 or a negative error code if an error occurred. As header data have
1030 * To let the decoder process header data and update its internal state even
1036 struct uvc_buffer *buf, const u8 *data, int len)
1045 if (len < 2 || data[0] < 2 || data[0] > len) {
1050 fid = data[1] & UVC_STREAM_FID;
1061 uvc_video_clock_decode(stream, buf, data, len);
1062 uvc_video_stats_decode(stream, data, len);
1073 if (data[1] & UVC_STREAM_ERR) {
1092 (data[1] & UVC_STREAM_EOF))
1129 return data[0];
1135 * Copy URB data to video buffers in process context, releasing buffer
1160 struct uvc_buffer *buf, const u8 *data, int len)
1175 op->src = data;
1192 struct uvc_buffer *buf, const u8 *data, int len)
1195 if (data[1] & UVC_STREAM_EOF && buf->bytesused != 0) {
1197 if (data[0] == len)
1209 * data to the transfer buffer and returns the header size. As the only known
1213 * uvc_video_encode_data is called for every URB and copies the data from the
1217 struct uvc_buffer *buf, u8 *data, int len)
1219 data[0] = 2; /* Header length */
1220 data[1] = UVC_STREAM_EOH | UVC_STREAM_EOF
1226 struct uvc_buffer *buf, u8 *data, int len)
1232 /* Copy video data to the URB buffer. */
1237 memcpy(data, mem, nbytes);
1256 * data and that either contain no SCR value or an SCR value identical to the
1398 /* Decode the payload data. */
1459 /* Prepare video data for processing. */
1504 /* Process video data. */