Commit 82adfe34 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

Merge tag 'media-uvc-next-20230115' of...

Merge tag 'media-uvc-next-20230115' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux into media_stage

uvcvideo fixes and improvements

* tag 'media-uvc-next-20230115' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux: (27 commits)
  media: uvcvideo: Silence memcpy() run-time false positive warnings
  media: uvcvideo: Quirk for autosuspend in Logitech B910 and C910
  media: uvcvideo: Fix race condition with usb_kill_urb
  media: uvcvideo: Use standard names for menus
  media: uvcvideo: Fix power line control for Lenovo Integrated Camera
  media: uvcvideo: Refactor power_line_frequency_controls_limited
  media: uvcvideo: Refactor uvc_ctrl_mappings_uvcXX
  media: uvcvideo: Implement mask for V4L2_CTRL_TYPE_MENU
  media: uvcvideo: Extend documentation of uvc_video_clock_decode()
  media: uvcvideo: Limit power line control for Acer EasyCamera
  media: uvcvideo: Refactor __uvc_ctrl_add_mapping
  media: uvcvideo: Fix handling on Bitmask controls
  media: uvcvideo: Do not return positive errors in uvc_query_ctrl()
  media: uvcvideo: Return -EACCES for Wrong state error
  media: uvcvideo: Improve error logging in uvc_query_ctrl()
  media: uvcvideo: Check for INACTIVE in uvc_ctrl_is_accessible()
  media: uvcvideo: Factor out usb_string() calls
  media: uvcvideo: Limit power line control for Acer EasyCamera
  media: uvcvideo: Recover stalled ElGato devices
  media: uvcvideo: Remove void casting for the status endpoint
  ...
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parents 0444ef66 b8392129
This diff is collapsed.
This diff is collapsed.
......@@ -37,7 +37,7 @@ static int uvc_mc_create_links(struct uvc_video_chain *chain,
continue;
remote = uvc_entity_by_id(chain->dev, entity->baSourceID[i]);
if (remote == NULL)
if (remote == NULL || remote->num_pads == 0)
return -EINVAL;
source = (UVC_ENTITY_TYPE(remote) == UVC_TT_STREAMING)
......
......@@ -6,6 +6,7 @@
* Laurent Pinchart (laurent.pinchart@ideasonboard.com)
*/
#include <asm/barrier.h>
#include <linux/kernel.h>
#include <linux/input.h>
#include <linux/slab.h>
......@@ -18,11 +19,34 @@
* Input device
*/
#ifdef CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV
static bool uvc_input_has_button(struct uvc_device *dev)
{
struct uvc_streaming *stream;
/*
* The device has button events if both bTriggerSupport and
* bTriggerUsage are one. Otherwise the camera button does not
* exist or is handled automatically by the camera without host
* driver or client application intervention.
*/
list_for_each_entry(stream, &dev->streams, list) {
if (stream->header.bTriggerSupport == 1 &&
stream->header.bTriggerUsage == 1)
return true;
}
return false;
}
static int uvc_input_init(struct uvc_device *dev)
{
struct input_dev *input;
int ret;
if (!uvc_input_has_button(dev))
return 0;
input = input_allocate_device();
if (input == NULL)
return -ENOMEM;
......@@ -73,38 +97,23 @@ static void uvc_input_report_key(struct uvc_device *dev, unsigned int code,
/* --------------------------------------------------------------------------
* Status interrupt endpoint
*/
struct uvc_streaming_status {
u8 bStatusType;
u8 bOriginator;
u8 bEvent;
u8 bValue[];
} __packed;
struct uvc_control_status {
u8 bStatusType;
u8 bOriginator;
u8 bEvent;
u8 bSelector;
u8 bAttribute;
u8 bValue[];
} __packed;
static void uvc_event_streaming(struct uvc_device *dev,
struct uvc_streaming_status *status, int len)
struct uvc_status *status, int len)
{
if (len < 3) {
if (len <= offsetof(struct uvc_status, bEvent)) {
uvc_dbg(dev, STATUS,
"Invalid streaming status event received\n");
return;
}
if (status->bEvent == 0) {
if (len < 4)
if (len <= offsetof(struct uvc_status, streaming))
return;
uvc_dbg(dev, STATUS, "Button (intf %u) %s len %d\n",
status->bOriginator,
status->bValue[0] ? "pressed" : "released", len);
uvc_input_report_key(dev, KEY_CAMERA, status->bValue[0]);
status->streaming.button ? "pressed" : "released", len);
uvc_input_report_key(dev, KEY_CAMERA, status->streaming.button);
} else {
uvc_dbg(dev, STATUS, "Stream %u error event %02x len %d\n",
status->bOriginator, status->bEvent, len);
......@@ -131,7 +140,7 @@ static struct uvc_control *uvc_event_entity_find_ctrl(struct uvc_entity *entity,
}
static struct uvc_control *uvc_event_find_ctrl(struct uvc_device *dev,
const struct uvc_control_status *status,
const struct uvc_status *status,
struct uvc_video_chain **chain)
{
list_for_each_entry((*chain), &dev->chains, list) {
......@@ -143,7 +152,7 @@ static struct uvc_control *uvc_event_find_ctrl(struct uvc_device *dev,
continue;
ctrl = uvc_event_entity_find_ctrl(entity,
status->bSelector);
status->control.bSelector);
if (ctrl)
return ctrl;
}
......@@ -153,7 +162,7 @@ static struct uvc_control *uvc_event_find_ctrl(struct uvc_device *dev,
}
static bool uvc_event_control(struct urb *urb,
const struct uvc_control_status *status, int len)
const struct uvc_status *status, int len)
{
static const char *attrs[] = { "value", "info", "failure", "min", "max" };
struct uvc_device *dev = urb->context;
......@@ -161,24 +170,24 @@ static bool uvc_event_control(struct urb *urb,
struct uvc_control *ctrl;
if (len < 6 || status->bEvent != 0 ||
status->bAttribute >= ARRAY_SIZE(attrs)) {
status->control.bAttribute >= ARRAY_SIZE(attrs)) {
uvc_dbg(dev, STATUS, "Invalid control status event received\n");
return false;
}
uvc_dbg(dev, STATUS, "Control %u/%u %s change len %d\n",
status->bOriginator, status->bSelector,
attrs[status->bAttribute], len);
status->bOriginator, status->control.bSelector,
attrs[status->control.bAttribute], len);
/* Find the control. */
ctrl = uvc_event_find_ctrl(dev, status, &chain);
if (!ctrl)
return false;
switch (status->bAttribute) {
switch (status->control.bAttribute) {
case UVC_CTRL_VALUE_CHANGE:
return uvc_ctrl_status_event_async(urb, chain, ctrl,
status->bValue);
status->control.bValue);
case UVC_CTRL_INFO_CHANGE:
case UVC_CTRL_FAILURE_CHANGE:
......@@ -214,28 +223,22 @@ static void uvc_status_complete(struct urb *urb)
len = urb->actual_length;
if (len > 0) {
switch (dev->status[0] & 0x0f) {
switch (dev->status->bStatusType & 0x0f) {
case UVC_STATUS_TYPE_CONTROL: {
struct uvc_control_status *status =
(struct uvc_control_status *)dev->status;
if (uvc_event_control(urb, status, len))
if (uvc_event_control(urb, dev->status, len))
/* The URB will be resubmitted in work context. */
return;
break;
}
case UVC_STATUS_TYPE_STREAMING: {
struct uvc_streaming_status *status =
(struct uvc_streaming_status *)dev->status;
uvc_event_streaming(dev, status, len);
uvc_event_streaming(dev, dev->status, len);
break;
}
default:
uvc_dbg(dev, STATUS, "Unknown status event type %u\n",
dev->status[0]);
dev->status->bStatusType);
break;
}
}
......@@ -259,12 +262,12 @@ int uvc_status_init(struct uvc_device *dev)
uvc_input_init(dev);
dev->status = kzalloc(UVC_MAX_STATUS_SIZE, GFP_KERNEL);
if (dev->status == NULL)
dev->status = kzalloc(sizeof(*dev->status), GFP_KERNEL);
if (!dev->status)
return -ENOMEM;
dev->int_urb = usb_alloc_urb(0, GFP_KERNEL);
if (dev->int_urb == NULL) {
if (!dev->int_urb) {
kfree(dev->status);
return -ENOMEM;
}
......@@ -281,7 +284,7 @@ int uvc_status_init(struct uvc_device *dev)
interval = fls(interval) - 1;
usb_fill_int_urb(dev->int_urb, dev->udev, pipe,
dev->status, UVC_MAX_STATUS_SIZE, uvc_status_complete,
dev->status, sizeof(*dev->status), uvc_status_complete,
dev, interval);
return 0;
......@@ -309,5 +312,41 @@ int uvc_status_start(struct uvc_device *dev, gfp_t flags)
void uvc_status_stop(struct uvc_device *dev)
{
struct uvc_ctrl_work *w = &dev->async_ctrl;
/*
* Prevent the asynchronous control handler from requeing the URB. The
* barrier is needed so the flush_status change is visible to other
* CPUs running the asynchronous handler before usb_kill_urb() is
* called below.
*/
smp_store_release(&dev->flush_status, true);
/*
* Cancel any pending asynchronous work. If any status event was queued,
* process it synchronously.
*/
if (cancel_work_sync(&w->work))
uvc_ctrl_status_event(w->chain, w->ctrl, w->data);
/* Kill the urb. */
usb_kill_urb(dev->int_urb);
/*
* The URB completion handler may have queued asynchronous work. This
* won't resubmit the URB as flush_status is set, but it needs to be
* cancelled before returning or it could then race with a future
* uvc_status_start() call.
*/
if (cancel_work_sync(&w->work))
uvc_ctrl_status_event(w->chain, w->ctrl, w->data);
/*
* From this point, there are no events on the queue and the status URB
* is dead. No events will be queued until uvc_status_start() is called.
* The barrier is needed to make sure that flush_status is visible to
* uvc_ctrl_status_event_work() when uvc_status_start() will be called
* again.
*/
smp_store_release(&dev->flush_status, false);
}
......@@ -6,6 +6,7 @@
* Laurent Pinchart (laurent.pinchart@ideasonboard.com)
*/
#include <linux/bits.h>
#include <linux/compat.h>
#include <linux/kernel.h>
#include <linux/list.h>
......@@ -25,14 +26,84 @@
#include "uvcvideo.h"
static int uvc_control_add_xu_mapping(struct uvc_video_chain *chain,
struct uvc_control_mapping *map,
const struct uvc_xu_control_mapping *xmap)
{
unsigned int i;
size_t size;
int ret;
/*
* Prevent excessive memory consumption, as well as integer
* overflows.
*/
if (xmap->menu_count == 0 ||
xmap->menu_count > UVC_MAX_CONTROL_MENU_ENTRIES)
return -EINVAL;
map->menu_names = NULL;
map->menu_mapping = NULL;
map->menu_mask = BIT_MASK(xmap->menu_count);
size = xmap->menu_count * sizeof(*map->menu_mapping);
map->menu_mapping = kzalloc(size, GFP_KERNEL);
if (!map->menu_mapping) {
ret = -ENOMEM;
goto done;
}
for (i = 0; i < xmap->menu_count ; i++) {
if (copy_from_user((u32 *)&map->menu_mapping[i],
&xmap->menu_info[i].value,
sizeof(map->menu_mapping[i]))) {
ret = -EACCES;
goto done;
}
}
/*
* Always use the standard naming if available, otherwise copy the
* names supplied by userspace.
*/
if (!v4l2_ctrl_get_menu(map->id)) {
size = xmap->menu_count * sizeof(map->menu_names[0]);
map->menu_names = kzalloc(size, GFP_KERNEL);
if (!map->menu_names) {
ret = -ENOMEM;
goto done;
}
for (i = 0; i < xmap->menu_count ; i++) {
/* sizeof(names[i]) - 1: to take care of \0 */
if (copy_from_user((char *)map->menu_names[i],
xmap->menu_info[i].name,
sizeof(map->menu_names[i]) - 1)) {
ret = -EACCES;
goto done;
}
}
}
ret = uvc_ctrl_add_mapping(chain, map);
done:
kfree(map->menu_names);
map->menu_names = NULL;
kfree(map->menu_mapping);
map->menu_mapping = NULL;
return ret;
}
/* ------------------------------------------------------------------------
* UVC ioctls
*/
static int uvc_ioctl_ctrl_map(struct uvc_video_chain *chain,
struct uvc_xu_control_mapping *xmap)
static int uvc_ioctl_xu_ctrl_map(struct uvc_video_chain *chain,
struct uvc_xu_control_mapping *xmap)
{
struct uvc_control_mapping *map;
unsigned int size;
int ret;
map = kzalloc(sizeof(*map), GFP_KERNEL);
......@@ -60,39 +131,20 @@ static int uvc_ioctl_ctrl_map(struct uvc_video_chain *chain,
case V4L2_CTRL_TYPE_INTEGER:
case V4L2_CTRL_TYPE_BOOLEAN:
case V4L2_CTRL_TYPE_BUTTON:
ret = uvc_ctrl_add_mapping(chain, map);
break;
case V4L2_CTRL_TYPE_MENU:
/*
* Prevent excessive memory consumption, as well as integer
* overflows.
*/
if (xmap->menu_count == 0 ||
xmap->menu_count > UVC_MAX_CONTROL_MENU_ENTRIES) {
ret = -EINVAL;
goto free_map;
}
size = xmap->menu_count * sizeof(*map->menu_info);
map->menu_info = memdup_user(xmap->menu_info, size);
if (IS_ERR(map->menu_info)) {
ret = PTR_ERR(map->menu_info);
goto free_map;
}
map->menu_count = xmap->menu_count;
ret = uvc_control_add_xu_mapping(chain, map, xmap);
break;
default:
uvc_dbg(chain->dev, CONTROL,
"Unsupported V4L2 control type %u\n", xmap->v4l2_type);
ret = -ENOTTY;
goto free_map;
break;
}
ret = uvc_ctrl_add_mapping(chain, map);
kfree(map->menu_info);
free_map:
kfree(map);
......@@ -660,8 +712,6 @@ static int uvc_ioctl_enum_fmt(struct uvc_streaming *stream,
fmt->flags = 0;
if (format->flags & UVC_FMT_FLAG_COMPRESSED)
fmt->flags |= V4L2_FMT_FLAG_COMPRESSED;
strscpy(fmt->description, format->name, sizeof(fmt->description));
fmt->description[sizeof(fmt->description) - 1] = 0;
fmt->pixelformat = format->fcc;
return 0;
}
......@@ -1020,8 +1070,7 @@ static int uvc_ctrl_check_access(struct uvc_video_chain *chain,
int ret = 0;
for (i = 0; i < ctrls->count; ++ctrl, ++i) {
ret = uvc_ctrl_is_accessible(chain, ctrl->id,
ioctl == VIDIOC_G_EXT_CTRLS);
ret = uvc_ctrl_is_accessible(chain, ctrl->id, ctrls, ioctl);
if (ret)
break;
}
......@@ -1316,7 +1365,7 @@ static long uvc_ioctl_default(struct file *file, void *fh, bool valid_prio,
switch (cmd) {
/* Dynamic controls. */
case UVCIOC_CTRL_MAP:
return uvc_ioctl_ctrl_map(chain, arg);
return uvc_ioctl_xu_ctrl_map(chain, arg);
case UVCIOC_CTRL_QUERY:
return uvc_xu_ctrl_query(chain, arg);
......@@ -1429,7 +1478,7 @@ static long uvc_v4l2_compat_ioctl32(struct file *file,
ret = uvc_v4l2_get_xu_mapping(&karg.xmap, up);
if (ret)
return ret;
ret = uvc_ioctl_ctrl_map(handle->chain, &karg.xmap);
ret = uvc_ioctl_xu_ctrl_map(handle->chain, &karg.xmap);
if (ret)
return ret;
ret = uvc_v4l2_put_xu_mapping(&karg.xmap, up);
......
......@@ -79,13 +79,14 @@ int uvc_query_ctrl(struct uvc_device *dev, u8 query, u8 unit,
if (likely(ret == size))
return 0;
dev_err(&dev->udev->dev,
"Failed to query (%s) UVC control %u on unit %u: %d (exp. %u).\n",
uvc_query_name(query), cs, unit, ret, size);
if (ret != -EPIPE)
return ret;
if (ret != -EPIPE) {
dev_err(&dev->udev->dev,
"Failed to query (%s) UVC control %u on unit %u: %d (exp. %u).\n",
uvc_query_name(query), cs, unit, ret, size);
return ret < 0 ? ret : -EPIPE;
}
/* Reuse data[0] to request the error code. */
tmp = *(u8 *)data;
ret = __uvc_query_ctrl(dev, UVC_GET_CUR, 0, intfnum,
......@@ -107,7 +108,7 @@ int uvc_query_ctrl(struct uvc_device *dev, u8 query, u8 unit,
case 1: /* Not ready */
return -EBUSY;
case 2: /* Wrong state */
return -EILSEQ;
return -EACCES;
case 3: /* Power */
return -EREMOTE;
case 4: /* Out of range */
......@@ -129,12 +130,13 @@ int uvc_query_ctrl(struct uvc_device *dev, u8 query, u8 unit,
return -EPIPE;
}
static const struct usb_device_id elgato_cam_link_4k = {
USB_DEVICE(0x0fd9, 0x0066)
};
static void uvc_fixup_video_ctrl(struct uvc_streaming *stream,
struct uvc_streaming_control *ctrl)
{
static const struct usb_device_id elgato_cam_link_4k = {
USB_DEVICE(0x0fd9, 0x0066)
};
struct uvc_format *format = NULL;
struct uvc_frame *frame = NULL;
unsigned int i;
......@@ -297,7 +299,7 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
dev_err(&stream->intf->dev,
"Failed to query (%u) UVC %s control : %d (exp. %u).\n",
query, probe ? "probe" : "commit", ret, size);
ret = -EIO;
ret = (ret == -EPROTO) ? -EPROTO : -EIO;
goto out;
}
......@@ -516,7 +518,9 @@ uvc_video_clock_decode(struct uvc_streaming *stream, struct uvc_buffer *buf,
/*
* To limit the amount of data, drop SCRs with an SOF identical to the
* previous one.
* previous one. This filtering is also needed to support UVC 1.5, where
* all the data packets of the same frame contains the same SOF. In that
* case only the first one will match the host_sof.
*/
dev_sof = get_unaligned_le16(&data[header_size - 2]);
if (dev_sof == stream->clock.last_sof)
......@@ -1352,7 +1356,9 @@ static void uvc_video_decode_meta(struct uvc_streaming *stream,
if (has_scr)
memcpy(stream->clock.last_scr, scr, 6);
memcpy(&meta->length, mem, length);
meta->length = mem[0];
meta->flags = mem[1];
memcpy(meta->buf, &mem[2], length - 2);
meta_buf->bytesused += length + sizeof(meta->ns) + sizeof(meta->sof);
uvc_dbg(stream->dev, FRAME,
......@@ -1965,6 +1971,17 @@ static int uvc_video_start_transfer(struct uvc_streaming *stream,
"Selecting alternate setting %u (%u B/frame bandwidth)\n",
altsetting, best_psize);
/*
* Some devices, namely the Logitech C910 and B910, are unable
* to recover from a USB autosuspend, unless the alternate
* setting of the streaming interface is toggled.
*/
if (stream->dev->quirks & UVC_QUIRK_WAKE_AUTOSUSPEND) {
usb_set_interface(stream->dev->udev, intfnum,
altsetting);
usb_set_interface(stream->dev->udev, intfnum, 0);
}
ret = usb_set_interface(stream->dev->udev, intfnum, altsetting);
if (ret < 0)
return ret;
......@@ -2121,6 +2138,21 @@ int uvc_video_init(struct uvc_streaming *stream)
* request on the probe control, as required by the UVC specification.
*/
ret = uvc_get_video_ctrl(stream, probe, 1, UVC_GET_CUR);
/*
* Elgato Cam Link 4k can be in a stalled state if the resolution of
* the external source has changed while the firmware initializes.
* Once in this state, the device is useless until it receives a
* USB reset. It has even been observed that the stalled state will
* continue even after unplugging the device.
*/
if (ret == -EPROTO &&
usb_match_one_id(stream->dev->intf, &elgato_cam_link_4k)) {
dev_err(&stream->intf->dev, "Elgato Cam Link 4K firmware crash detected\n");
dev_err(&stream->intf->dev, "Resetting the device, unplug and replug to recover\n");
usb_reset_device(stream->dev->udev);
}
if (ret < 0)
return ret;
......
......@@ -51,8 +51,6 @@
#define UVC_URBS 5
/* Maximum number of packets per URB. */
#define UVC_MAX_PACKETS 32
/* Maximum status buffer size in bytes of interrupt URB. */
#define UVC_MAX_STATUS_SIZE 16
#define UVC_CTRL_CONTROL_TIMEOUT 5000
#define UVC_CTRL_STREAMING_TIMEOUT 5000
......@@ -74,6 +72,7 @@
#define UVC_QUIRK_RESTORE_CTRLS_ON_INIT 0x00000400
#define UVC_QUIRK_FORCE_Y8 0x00000800
#define UVC_QUIRK_FORCE_BPP 0x00001000
#define UVC_QUIRK_WAKE_AUTOSUSPEND 0x00002000
/* Format flags */
#define UVC_FMT_FLAG_COMPRESSED 0x00000001
......@@ -116,8 +115,9 @@ struct uvc_control_mapping {
enum v4l2_ctrl_type v4l2_type;
u32 data_type;
const struct uvc_menu_info *menu_info;
u32 menu_count;
const u32 *menu_mapping;
const char (*menu_names)[UVC_MENU_NAME_LEN];
unsigned long menu_mask;
u32 master_id;
s32 master_manual;
......@@ -264,8 +264,6 @@ struct uvc_format {
u32 fcc;
u32 flags;
char name[32];
unsigned int nframes;
struct uvc_frame *frame;
};
......@@ -527,6 +525,26 @@ struct uvc_device_info {
const struct uvc_control_mapping **mappings;
};
struct uvc_status_streaming {
u8 button;
} __packed;
struct uvc_status_control {
u8 bSelector;
u8 bAttribute;
u8 bValue[11];
} __packed;
struct uvc_status {
u8 bStatusType;
u8 bOriginator;
u8 bEvent;
union {
struct uvc_status_control control;
struct uvc_status_streaming streaming;
};
} __packed;
struct uvc_device {
struct usb_device *udev;
struct usb_interface *intf;
......@@ -559,7 +577,9 @@ struct uvc_device {
/* Status Interrupt Endpoint */
struct usb_host_endpoint *int_ep;
struct urb *int_urb;
u8 *status;
struct uvc_status *status;
bool flush_status;
struct input_dev *input;
char input_phys[64];
......@@ -728,6 +748,8 @@ int uvc_status_start(struct uvc_device *dev, gfp_t flags);
void uvc_status_stop(struct uvc_device *dev);
/* Controls */
extern const struct uvc_control_mapping uvc_ctrl_power_line_mapping_limited;
extern const struct uvc_control_mapping uvc_ctrl_power_line_mapping_uvc11;
extern const struct v4l2_subscribed_event_ops uvc_ctrl_sub_ev_ops;
int uvc_query_v4l2_ctrl(struct uvc_video_chain *chain,
......@@ -761,7 +783,8 @@ static inline int uvc_ctrl_rollback(struct uvc_fh *handle)
int uvc_ctrl_get(struct uvc_video_chain *chain, struct v4l2_ext_control *xctrl);
int uvc_ctrl_set(struct uvc_fh *handle, struct v4l2_ext_control *xctrl);
int uvc_ctrl_is_accessible(struct uvc_video_chain *chain, u32 v4l2_id,
bool read);
const struct v4l2_ext_controls *ctrls,
unsigned long ioctl);
int uvc_xu_ctrl_query(struct uvc_video_chain *chain,
struct uvc_xu_control_query *xqry);
......
......@@ -36,9 +36,11 @@
UVC_CTRL_FLAG_GET_MAX | UVC_CTRL_FLAG_GET_RES | \
UVC_CTRL_FLAG_GET_DEF)
#define UVC_MENU_NAME_LEN 32
struct uvc_menu_info {
__u32 value;
__u8 name[32];
__u8 name[UVC_MENU_NAME_LEN];
};
struct uvc_xu_control_mapping {
......@@ -86,7 +88,7 @@ struct uvc_xu_control_query {
* struct. The first two fields are added by the driver, they can be used for
* clock synchronisation. The rest is an exact copy of a UVC payload header.
* Only complete objects with complete buffers are included. Therefore it's
* always sizeof(meta->ts) + sizeof(meta->sof) + meta->length bytes large.
* always sizeof(meta->ns) + sizeof(meta->sof) + meta->length bytes large.
*/
struct uvc_meta_buf {
__u64 ns;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment