/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_USB_USBVC_H
#define _SYS_USB_USBVC_H
#ifdef __cplusplus
extern "C" {
#endif
/* Video interface class code */
/* Video interface subclass code */
/* Video class specific interface descriptor types */
/* Video class specific, video control interface descriptor subtypes */
/* Video class specific, video stream interface descriptor subtypes */
/* Endpoint type */
/* Request codes, bRequest */
/* Control types of Video Control interface */
/* Terminal controls */
/* Selector Unit controls */
/* Camera Terminal controls */
/* Processing Unit controls */
/* VideoStreaming interface controls, wValue */
/* bmRequestType */
/* Terminal types */
/* Input Terminal types */
/* Output Terminal types */
/* External terminal types */
/*
* usb video class descriptors
*/
/* usb video class, video control interface, header descriptor */
typedef struct usbvc_vc_header_descr {
/* Number of stream interfaces belong to this VC interface */
typedef struct usbvc_vc_header {
/* there might be multiple stream interface numbers */
/* unit descriptor for all the three kinds of units */
typedef struct usbvc_unit_descr {
union {
struct {
} processing;
struct {
} selector;
struct {
} extension;
} unit;
typedef struct usbvc_units {
/* Point to cvs_buf, for most elements of unit descriptor */
/* Terminal descriptor for all the three kinds of video terminals */
typedef struct usbvc_term_descr {
union {
struct {
} input;
struct {
} output;
struct {
} camera;
}term;
typedef struct usbvc_terms {
/* for input or output terminals, excluding camera terminals */
/*
* Stream interface descriptors
*/
/* input header descriptor */
typedef struct usbvc_input_header_descr {
/* UVC Spec: only one input header in one stream interface */
typedef struct usbvc_input_header {
/* Do not support output video device at present */
typedef struct usbvc_output_header_descr {
typedef struct usbvc_output_header {
/*
* Except bDescriptorSubType value, MJPEG and uncompressed frame descriptor are
* all the same. So share one structure.
*/
typedef struct usbvc_frame_descr {
/*
* There may be several frame descriptors immediately follow a format
* descriptor.
*/
typedef struct usbvc_frames {
/* The first several fixed length fields of still image frame descriptor */
typedef struct usbvc_still_image_frame_descr {
/*
* Width and Hight of the still image.
* There might be multiple such value pairs in one still image frame descr.
*/
typedef struct width_height {
/*
* The whole still image frame descriptor.
* UVC Spec: only one still image descriptor for each format group.
*/
typedef struct usbvc_still_image_frame {
/*
* All fields of this descr are fixed length.
* UVC Spec: only one color_matching_descr is allowed for a given format.
*/
typedef struct usbvc_color_matching_descr {
/* Mjpeg and uncompressed format descriptor */
typedef struct usbvc_format_descr {
union {
struct {
} mjpeg;
struct {
} uncompressed;
}fmt;
/*
* usb video class requests
*/
typedef struct usbvc_vs_probe_commit {
/* Table 2-1 of a sub video class spec: "uncompressed payload spec" */
0x00, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, \
0x9b, 0x71}
0x00, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, \
0x9b, 0x71}
/* Stream frame's flag bits */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_USB_USBVC_H */