// SPDX-License-Identifier: GPL-2.0-or-later /* * uvc_isight.c -- USB Video Class driver - iSight support * * Copyright (C) 2006-2007 * Ivan N. Zlatev <[email protected]> * Copyright (C) 2008-2009 * Laurent Pinchart <[email protected]> */ #include <linux/usb.h> #include <linux/kernel.h> #include <linux/mm.h> #include "uvcvideo.h" /* * Built-in iSight webcams implements most of UVC 1.0 except a * different packet format. Instead of sending a header at the * beginning of each isochronous transfer payload, the webcam sends a * single header per image (on its own in a packet), followed by * packets containing data only. * * Offset Size (bytes) Description * ------------------------------------------------------------------ * 0x00 1 Header length * 0x01 1 Flags (UVC-compliant) * 0x02 4 Always equal to '11223344' * 0x06 8 Always equal to 'deadbeefdeadface' * 0x0e 16 Unknown * * The header can be prefixed by an optional, unknown-purpose byte. */ static int isight_decode(struct uvc_video_queue *queue, struct uvc_buffer *buf, const u8 *data, unsigned int len) { … } void uvc_video_decode_isight(struct uvc_urb *uvc_urb, struct uvc_buffer *buf, struct uvc_buffer *meta_buf) { … }