Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (655 commits) [media] revert patch: HDIC HD29L2 DMB-TH USB2.0 reference design driver mb86a20s: Add a few more register settings at the init seq mb86a20s: Group registers into the same line [media] [PATCH] don't reset the delivery system on DTV_CLEAR [media] [BUG] it913x-fe fix typo error making SNR levels unstable [media] cx23885: Query the CX25840 during enum_input for status [media] cx25840: Add support for g_input_status [media] rc-videomate-m1f.c Rename to match remote controler name [media] drivers: media: au0828: Fix dependency for VIDEO_AU0828 [media] convert drivers/media/* to use module_platform_driver() [media] drivers: video: cx231xx: Fix dependency for VIDEO_CX231XX_DVB [media] Exynos4 JPEG codec v4l2 driver [media] doc: v4l: selection: choose pixels as units for selection rectangles [media] v4l: s5p-tv: mixer: fix setup of VP scaling [media] v4l: s5p-tv: mixer: add support for selection API [media] v4l: emulate old crop API using extended crop/compose API [media] doc: v4l: add documentation for selection API [media] doc: v4l: add binary images for selection API [media] v4l: add support for selection api [media] hd29l2: fix review findings ...
This commit is contained in:
@@ -72,7 +72,7 @@ typedef enum fe_caps {
|
||||
|
||||
struct dvb_frontend_info {
|
||||
char name[128];
|
||||
fe_type_t type;
|
||||
fe_type_t type; /* DEPRECATED. Use DTV_ENUM_DELSYS instead */
|
||||
__u32 frequency_min;
|
||||
__u32 frequency_max;
|
||||
__u32 frequency_stepsize;
|
||||
@@ -181,6 +181,7 @@ typedef enum fe_transmit_mode {
|
||||
TRANSMISSION_MODE_32K,
|
||||
} fe_transmit_mode_t;
|
||||
|
||||
#if defined(__DVB_CORE__) || !defined (__KERNEL__)
|
||||
typedef enum fe_bandwidth {
|
||||
BANDWIDTH_8_MHZ,
|
||||
BANDWIDTH_7_MHZ,
|
||||
@@ -190,7 +191,7 @@ typedef enum fe_bandwidth {
|
||||
BANDWIDTH_10_MHZ,
|
||||
BANDWIDTH_1_712_MHZ,
|
||||
} fe_bandwidth_t;
|
||||
|
||||
#endif
|
||||
|
||||
typedef enum fe_guard_interval {
|
||||
GUARD_INTERVAL_1_32,
|
||||
@@ -213,6 +214,7 @@ typedef enum fe_hierarchy {
|
||||
} fe_hierarchy_t;
|
||||
|
||||
|
||||
#if defined(__DVB_CORE__) || !defined (__KERNEL__)
|
||||
struct dvb_qpsk_parameters {
|
||||
__u32 symbol_rate; /* symbol rate in Symbols per second */
|
||||
fe_code_rate_t fec_inner; /* forward error correction (see above) */
|
||||
@@ -251,11 +253,11 @@ struct dvb_frontend_parameters {
|
||||
} u;
|
||||
};
|
||||
|
||||
|
||||
struct dvb_frontend_event {
|
||||
fe_status_t status;
|
||||
struct dvb_frontend_parameters parameters;
|
||||
};
|
||||
#endif
|
||||
|
||||
/* S2API Commands */
|
||||
#define DTV_UNDEFINED 0
|
||||
@@ -316,7 +318,9 @@ struct dvb_frontend_event {
|
||||
|
||||
#define DTV_DVBT2_PLP_ID 43
|
||||
|
||||
#define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID
|
||||
#define DTV_ENUM_DELSYS 44
|
||||
|
||||
#define DTV_MAX_COMMAND DTV_ENUM_DELSYS
|
||||
|
||||
typedef enum fe_pilot {
|
||||
PILOT_ON,
|
||||
@@ -333,7 +337,7 @@ typedef enum fe_rolloff {
|
||||
|
||||
typedef enum fe_delivery_system {
|
||||
SYS_UNDEFINED,
|
||||
SYS_DVBC_ANNEX_AC,
|
||||
SYS_DVBC_ANNEX_A,
|
||||
SYS_DVBC_ANNEX_B,
|
||||
SYS_DVBT,
|
||||
SYS_DSS,
|
||||
@@ -350,8 +354,13 @@ typedef enum fe_delivery_system {
|
||||
SYS_DAB,
|
||||
SYS_DVBT2,
|
||||
SYS_TURBO,
|
||||
SYS_DVBC_ANNEX_C,
|
||||
} fe_delivery_system_t;
|
||||
|
||||
|
||||
#define SYS_DVBC_ANNEX_AC SYS_DVBC_ANNEX_A
|
||||
|
||||
|
||||
struct dtv_cmds_h {
|
||||
char *name; /* A display name for debugging purposes */
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
#define _DVBVERSION_H_
|
||||
|
||||
#define DVB_API_VERSION 5
|
||||
#define DVB_API_VERSION_MINOR 4
|
||||
#define DVB_API_VERSION_MINOR 5
|
||||
|
||||
#endif /*_DVBVERSION_H_*/
|
||||
|
||||
@@ -403,6 +403,7 @@ struct v4l2_pix_format {
|
||||
#define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */
|
||||
#define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */
|
||||
#define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */
|
||||
#define V4L2_PIX_FMT_JL2005BCD v4l2_fourcc('J', 'L', '2', '0') /* compressed RGGB bayer */
|
||||
#define V4L2_PIX_FMT_SN9C2028 v4l2_fourcc('S', 'O', 'N', 'X') /* compressed GBRG bayer */
|
||||
#define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */
|
||||
#define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */
|
||||
@@ -744,6 +745,48 @@ struct v4l2_crop {
|
||||
struct v4l2_rect c;
|
||||
};
|
||||
|
||||
/* Hints for adjustments of selection rectangle */
|
||||
#define V4L2_SEL_FLAG_GE 0x00000001
|
||||
#define V4L2_SEL_FLAG_LE 0x00000002
|
||||
|
||||
/* Selection targets */
|
||||
|
||||
/* current cropping area */
|
||||
#define V4L2_SEL_TGT_CROP_ACTIVE 0
|
||||
/* default cropping area */
|
||||
#define V4L2_SEL_TGT_CROP_DEFAULT 1
|
||||
/* cropping bounds */
|
||||
#define V4L2_SEL_TGT_CROP_BOUNDS 2
|
||||
/* current composing area */
|
||||
#define V4L2_SEL_TGT_COMPOSE_ACTIVE 256
|
||||
/* default composing area */
|
||||
#define V4L2_SEL_TGT_COMPOSE_DEFAULT 257
|
||||
/* composing bounds */
|
||||
#define V4L2_SEL_TGT_COMPOSE_BOUNDS 258
|
||||
/* current composing area plus all padding pixels */
|
||||
#define V4L2_SEL_TGT_COMPOSE_PADDED 259
|
||||
|
||||
/**
|
||||
* struct v4l2_selection - selection info
|
||||
* @type: buffer type (do not use *_MPLANE types)
|
||||
* @target: selection target, used to choose one of possible rectangles
|
||||
* @flags: constraints flags
|
||||
* @r: coordinates of selection window
|
||||
* @reserved: for future use, rounds structure size to 64 bytes, set to zero
|
||||
*
|
||||
* Hardware may use multiple helper window to process a video stream.
|
||||
* The structure is used to exchange this selection areas between
|
||||
* an application and a driver.
|
||||
*/
|
||||
struct v4l2_selection {
|
||||
__u32 type;
|
||||
__u32 target;
|
||||
__u32 flags;
|
||||
struct v4l2_rect r;
|
||||
__u32 reserved[9];
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* A N A L O G V I D E O S T A N D A R D
|
||||
*/
|
||||
@@ -1133,6 +1176,7 @@ struct v4l2_querymenu {
|
||||
#define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000
|
||||
|
||||
/* User-class control IDs defined by V4L2 */
|
||||
#define V4L2_CID_MAX_CTRLS 1024
|
||||
#define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)
|
||||
#define V4L2_CID_USER_BASE V4L2_CID_BASE
|
||||
/* IDs reserved for driver specific controls */
|
||||
@@ -1206,10 +1250,10 @@ enum v4l2_colorfx {
|
||||
#define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39)
|
||||
#define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40)
|
||||
|
||||
/* last CID + 1 */
|
||||
#define V4L2_CID_LASTP1 (V4L2_CID_BASE+41)
|
||||
#define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41)
|
||||
|
||||
/* Minimum number of buffer neede by the device */
|
||||
/* last CID + 1 */
|
||||
#define V4L2_CID_LASTP1 (V4L2_CID_BASE+42)
|
||||
|
||||
/* MPEG-class control IDs defined by V4L2 */
|
||||
#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
|
||||
@@ -1684,6 +1728,8 @@ enum v4l2_flash_strobe_source {
|
||||
#define V4L2_FLASH_FAULT_TIMEOUT (1 << 1)
|
||||
#define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2)
|
||||
#define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3)
|
||||
#define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4)
|
||||
#define V4L2_FLASH_FAULT_INDICATOR (1 << 5)
|
||||
|
||||
#define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11)
|
||||
#define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12)
|
||||
@@ -2257,6 +2303,10 @@ struct v4l2_create_buffers {
|
||||
#define VIDIOC_CREATE_BUFS _IOWR('V', 92, struct v4l2_create_buffers)
|
||||
#define VIDIOC_PREPARE_BUF _IOWR('V', 93, struct v4l2_buffer)
|
||||
|
||||
/* Experimental selection API */
|
||||
#define VIDIOC_G_SELECTION _IOWR('V', 94, struct v4l2_selection)
|
||||
#define VIDIOC_S_SELECTION _IOWR('V', 95, struct v4l2_selection)
|
||||
|
||||
/* Reminder: when adding new ioctls please add support for them to
|
||||
drivers/media/video/v4l2-compat-ioctl32.c as well! */
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* include/media/as3645a.h
|
||||
*
|
||||
* Copyright (C) 2008-2011 Nokia Corporation
|
||||
*
|
||||
* Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __AS3645A_H__
|
||||
#define __AS3645A_H__
|
||||
|
||||
#include <media/v4l2-subdev.h>
|
||||
|
||||
#define AS3645A_NAME "as3645a"
|
||||
#define AS3645A_I2C_ADDR (0x60 >> 1) /* W:0x60, R:0x61 */
|
||||
|
||||
#define AS3645A_FLASH_TIMEOUT_MIN 100000 /* us */
|
||||
#define AS3645A_FLASH_TIMEOUT_MAX 850000
|
||||
#define AS3645A_FLASH_TIMEOUT_STEP 50000
|
||||
|
||||
#define AS3645A_FLASH_INTENSITY_MIN 200 /* mA */
|
||||
#define AS3645A_FLASH_INTENSITY_MAX_1LED 500
|
||||
#define AS3645A_FLASH_INTENSITY_MAX_2LEDS 400
|
||||
#define AS3645A_FLASH_INTENSITY_STEP 20
|
||||
|
||||
#define AS3645A_TORCH_INTENSITY_MIN 20 /* mA */
|
||||
#define AS3645A_TORCH_INTENSITY_MAX 160
|
||||
#define AS3645A_TORCH_INTENSITY_STEP 20
|
||||
|
||||
#define AS3645A_INDICATOR_INTENSITY_MIN 0 /* uA */
|
||||
#define AS3645A_INDICATOR_INTENSITY_MAX 10000
|
||||
#define AS3645A_INDICATOR_INTENSITY_STEP 2500
|
||||
|
||||
/*
|
||||
* as3645a_platform_data - Flash controller platform data
|
||||
* @set_power: Set power callback
|
||||
* @vref: VREF offset (0=0V, 1=+0.3V, 2=-0.3V, 3=+0.6V)
|
||||
* @peak: Inductor peak current limit (0=1.25A, 1=1.5A, 2=1.75A, 3=2.0A)
|
||||
* @ext_strobe: True if external flash strobe can be used
|
||||
* @flash_max_current: Max flash current (mA, <= AS3645A_FLASH_INTENSITY_MAX)
|
||||
* @torch_max_current: Max torch current (mA, >= AS3645A_TORCH_INTENSITY_MAX)
|
||||
* @timeout_max: Max flash timeout (us, <= AS3645A_FLASH_TIMEOUT_MAX)
|
||||
*/
|
||||
struct as3645a_platform_data {
|
||||
int (*set_power)(struct v4l2_subdev *subdev, int on);
|
||||
unsigned int vref;
|
||||
unsigned int peak;
|
||||
bool ext_strobe;
|
||||
|
||||
/* Flash and torch currents and timeout limits */
|
||||
unsigned int flash_max_current;
|
||||
unsigned int torch_max_current;
|
||||
unsigned int timeout_max;
|
||||
};
|
||||
|
||||
#endif /* __AS3645A_H__ */
|
||||
@@ -110,10 +110,12 @@ struct isi_platform_data {
|
||||
u8 hsync_act_low;
|
||||
u8 vsync_act_low;
|
||||
u8 pclk_act_falling;
|
||||
u8 isi_full_mode;
|
||||
u8 full_mode;
|
||||
u32 data_width_flags;
|
||||
/* Using for ISI_CFG1 */
|
||||
u32 frate;
|
||||
/* Using for ISI_MCK */
|
||||
u32 mck_hz;
|
||||
};
|
||||
|
||||
#endif /* __ATMEL_ISI_H__ */
|
||||
|
||||
@@ -85,6 +85,7 @@ enum cx25840_video_input {
|
||||
CX25840_NONE1_CH3 = 0x800000c0,
|
||||
CX25840_SVIDEO_ON = 0x80000100,
|
||||
CX25840_COMPONENT_ON = 0x80000200,
|
||||
CX25840_DIF_ON = 0x80000400,
|
||||
};
|
||||
|
||||
enum cx25840_audio_input {
|
||||
|
||||
@@ -63,6 +63,7 @@ struct vpbe_output {
|
||||
* output basis. If per mode is needed, we may have to move this to
|
||||
* mode_info structure
|
||||
*/
|
||||
enum v4l2_mbus_pixelcode if_params;
|
||||
};
|
||||
|
||||
/* encoder configuration info */
|
||||
@@ -74,6 +75,15 @@ struct encoder_config_info {
|
||||
struct i2c_board_info board_info;
|
||||
};
|
||||
|
||||
/*amplifier configuration info */
|
||||
struct amp_config_info {
|
||||
char module_name[32];
|
||||
/* Is this an i2c device ? */
|
||||
unsigned int is_i2c:1;
|
||||
/* i2c subdevice board info */
|
||||
struct i2c_board_info board_info;
|
||||
};
|
||||
|
||||
/* structure for defining vpbe display subsystem components */
|
||||
struct vpbe_config {
|
||||
char module_name[32];
|
||||
@@ -84,6 +94,8 @@ struct vpbe_config {
|
||||
/* external encoder information goes here */
|
||||
int num_ext_encoders;
|
||||
struct encoder_config_info *ext_encoders;
|
||||
/* amplifier information goes here */
|
||||
struct amp_config_info *amp;
|
||||
int num_outputs;
|
||||
/* Order is venc outputs followed by LCD and then external encoders */
|
||||
struct vpbe_output *outputs;
|
||||
@@ -158,6 +170,8 @@ struct vpbe_device {
|
||||
struct v4l2_subdev **encoders;
|
||||
/* current encoder index */
|
||||
int current_sd_index;
|
||||
/* external amplifier v4l2 subdevice */
|
||||
struct v4l2_subdev *amp;
|
||||
struct mutex lock;
|
||||
/* device initialized */
|
||||
int initialized;
|
||||
@@ -165,6 +179,8 @@ struct vpbe_device {
|
||||
struct clk *dac_clk;
|
||||
/* osd_device pointer */
|
||||
struct osd_state *osd_device;
|
||||
/* venc device pointer */
|
||||
struct venc_platform_data *venc_device;
|
||||
/*
|
||||
* fields below are accessed by users of vpbe_device. Not the
|
||||
* ones above
|
||||
|
||||
@@ -29,10 +29,14 @@
|
||||
|
||||
struct venc_platform_data {
|
||||
enum vpbe_version venc_type;
|
||||
int (*setup_pinmux)(enum v4l2_mbus_pixelcode if_type,
|
||||
int field);
|
||||
int (*setup_clock)(enum vpbe_enc_timings_type type,
|
||||
unsigned int mode);
|
||||
int (*setup_if_config)(enum v4l2_mbus_pixelcode pixcode);
|
||||
/* Number of LCD outputs supported */
|
||||
int num_lcd_outputs;
|
||||
struct vpbe_if_params *lcd_if_params;
|
||||
};
|
||||
|
||||
enum venc_ioctls {
|
||||
|
||||
@@ -98,7 +98,7 @@ struct media_entity {
|
||||
|
||||
/* Sub-device specifications */
|
||||
/* Nothing needed yet */
|
||||
};
|
||||
} info;
|
||||
};
|
||||
|
||||
static inline u32 media_entity_type(struct media_entity *entity)
|
||||
|
||||
@@ -58,7 +58,7 @@ enum {
|
||||
* ISP_LANE_SHIFT_4 - CAMEXT[13:4] -> CAM[9:0]
|
||||
* ISP_LANE_SHIFT_6 - CAMEXT[13:6] -> CAM[7:0]
|
||||
* @clk_pol: Pixel clock polarity
|
||||
* 0 - Non Inverted, 1 - Inverted
|
||||
* 0 - Sample on rising edge, 1 - Sample on falling edge
|
||||
* @hs_pol: Horizontal synchronization polarity
|
||||
* 0 - Active high, 1 - Active low
|
||||
* @vs_pol: Vertical synchronization polarity
|
||||
|
||||
@@ -1,323 +0,0 @@
|
||||
#ifndef PWC_IOCTL_H
|
||||
#define PWC_IOCTL_H
|
||||
|
||||
/* (C) 2001-2004 Nemosoft Unv.
|
||||
(C) 2004-2006 Luc Saillard (luc@saillard.org)
|
||||
|
||||
NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx
|
||||
driver and thus may have bugs that are not present in the original version.
|
||||
Please send bug reports and support requests to <luc@saillard.org>.
|
||||
The decompression routines have been implemented by reverse-engineering the
|
||||
Nemosoft binary pwcx module. Caveat emptor.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* This is pwc-ioctl.h belonging to PWC 10.0.10
|
||||
It contains structures and defines to communicate from user space
|
||||
directly to the driver.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes
|
||||
2001/08/03 Alvarado Added ioctl constants to access methods for
|
||||
changing white balance and red/blue gains
|
||||
2002/12/15 G. H. Fernandez-Toribio VIDIOCGREALSIZE
|
||||
2003/12/13 Nemosft Unv. Some modifications to make interfacing to
|
||||
PWCX easier
|
||||
2006/01/01 Luc Saillard Add raw format definition
|
||||
*/
|
||||
|
||||
/* These are private ioctl() commands, specific for the Philips webcams.
|
||||
They contain functions not found in other webcams, and settings not
|
||||
specified in the Video4Linux API.
|
||||
|
||||
The #define names are built up like follows:
|
||||
VIDIOC VIDeo IOCtl prefix
|
||||
PWC Philps WebCam
|
||||
G optional: Get
|
||||
S optional: Set
|
||||
... the function
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* Enumeration of image sizes */
|
||||
#define PSZ_SQCIF 0x00
|
||||
#define PSZ_QSIF 0x01
|
||||
#define PSZ_QCIF 0x02
|
||||
#define PSZ_SIF 0x03
|
||||
#define PSZ_CIF 0x04
|
||||
#define PSZ_VGA 0x05
|
||||
#define PSZ_MAX 6
|
||||
|
||||
|
||||
/* The frame rate is encoded in the video_window.flags parameter using
|
||||
the upper 16 bits, since some flags are defined nowadays. The following
|
||||
defines provide a mask and shift to filter out this value.
|
||||
This value can also be passing using the private flag when using v4l2 and
|
||||
VIDIOC_S_FMT ioctl.
|
||||
|
||||
In 'Snapshot' mode the camera freezes its automatic exposure and colour
|
||||
balance controls.
|
||||
*/
|
||||
#define PWC_FPS_SHIFT 16
|
||||
#define PWC_FPS_MASK 0x00FF0000
|
||||
#define PWC_FPS_FRMASK 0x003F0000
|
||||
#define PWC_FPS_SNAPSHOT 0x00400000
|
||||
#define PWC_QLT_MASK 0x03000000
|
||||
#define PWC_QLT_SHIFT 24
|
||||
|
||||
|
||||
/* structure for transferring x & y coordinates */
|
||||
struct pwc_coord
|
||||
{
|
||||
int x, y; /* guess what */
|
||||
int size; /* size, or offset */
|
||||
};
|
||||
|
||||
|
||||
/* Used with VIDIOCPWCPROBE */
|
||||
struct pwc_probe
|
||||
{
|
||||
char name[32];
|
||||
int type;
|
||||
};
|
||||
|
||||
struct pwc_serial
|
||||
{
|
||||
char serial[30]; /* String with serial number. Contains terminating 0 */
|
||||
};
|
||||
|
||||
/* pwc_whitebalance.mode values */
|
||||
#define PWC_WB_INDOOR 0
|
||||
#define PWC_WB_OUTDOOR 1
|
||||
#define PWC_WB_FL 2
|
||||
#define PWC_WB_MANUAL 3
|
||||
#define PWC_WB_AUTO 4
|
||||
|
||||
/* Used with VIDIOCPWC[SG]AWB (Auto White Balance).
|
||||
Set mode to one of the PWC_WB_* values above.
|
||||
*red and *blue are the respective gains of these colour components inside
|
||||
the camera; range 0..65535
|
||||
When 'mode' == PWC_WB_MANUAL, 'manual_red' and 'manual_blue' are set or read;
|
||||
otherwise undefined.
|
||||
'read_red' and 'read_blue' are read-only.
|
||||
*/
|
||||
struct pwc_whitebalance
|
||||
{
|
||||
int mode;
|
||||
int manual_red, manual_blue; /* R/W */
|
||||
int read_red, read_blue; /* R/O */
|
||||
};
|
||||
|
||||
/*
|
||||
'control_speed' and 'control_delay' are used in automatic whitebalance mode,
|
||||
and tell the camera how fast it should react to changes in lighting, and
|
||||
with how much delay. Valid values are 0..65535.
|
||||
*/
|
||||
struct pwc_wb_speed
|
||||
{
|
||||
int control_speed;
|
||||
int control_delay;
|
||||
|
||||
};
|
||||
|
||||
/* Used with VIDIOCPWC[SG]LED */
|
||||
struct pwc_leds
|
||||
{
|
||||
int led_on; /* Led on-time; range = 0..25000 */
|
||||
int led_off; /* Led off-time; range = 0..25000 */
|
||||
};
|
||||
|
||||
/* Image size (used with GREALSIZE) */
|
||||
struct pwc_imagesize
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
|
||||
/* Defines and structures for Motorized Pan & Tilt */
|
||||
#define PWC_MPT_PAN 0x01
|
||||
#define PWC_MPT_TILT 0x02
|
||||
#define PWC_MPT_TIMEOUT 0x04 /* for status */
|
||||
|
||||
/* Set angles; when absolute != 0, the angle is absolute and the
|
||||
driver calculates the relative offset for you. This can only
|
||||
be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns
|
||||
absolute angles.
|
||||
*/
|
||||
struct pwc_mpt_angles
|
||||
{
|
||||
int absolute; /* write-only */
|
||||
int pan; /* degrees * 100 */
|
||||
int tilt; /* degress * 100 */
|
||||
};
|
||||
|
||||
/* Range of angles of the camera, both horizontally and vertically.
|
||||
*/
|
||||
struct pwc_mpt_range
|
||||
{
|
||||
int pan_min, pan_max; /* degrees * 100 */
|
||||
int tilt_min, tilt_max;
|
||||
};
|
||||
|
||||
struct pwc_mpt_status
|
||||
{
|
||||
int status;
|
||||
int time_pan;
|
||||
int time_tilt;
|
||||
};
|
||||
|
||||
|
||||
/* This is used for out-of-kernel decompression. With it, you can get
|
||||
all the necessary information to initialize and use the decompressor
|
||||
routines in standalone applications.
|
||||
*/
|
||||
struct pwc_video_command
|
||||
{
|
||||
int type; /* camera type (645, 675, 730, etc.) */
|
||||
int release; /* release number */
|
||||
|
||||
int size; /* one of PSZ_* */
|
||||
int alternate;
|
||||
int command_len; /* length of USB video command */
|
||||
unsigned char command_buf[13]; /* Actual USB video command */
|
||||
int bandlength; /* >0 = compressed */
|
||||
int frame_size; /* Size of one (un)compressed frame */
|
||||
};
|
||||
|
||||
/* Flags for PWCX subroutines. Not all modules honour all flags. */
|
||||
#define PWCX_FLAG_PLANAR 0x0001
|
||||
#define PWCX_FLAG_BAYER 0x0008
|
||||
|
||||
|
||||
/* IOCTL definitions */
|
||||
|
||||
/* Restore user settings */
|
||||
#define VIDIOCPWCRUSER _IO('v', 192)
|
||||
/* Save user settings */
|
||||
#define VIDIOCPWCSUSER _IO('v', 193)
|
||||
/* Restore factory settings */
|
||||
#define VIDIOCPWCFACTORY _IO('v', 194)
|
||||
|
||||
/* You can manipulate the compression factor. A compression preference of 0
|
||||
means use uncompressed modes when available; 1 is low compression, 2 is
|
||||
medium and 3 is high compression preferred. Of course, the higher the
|
||||
compression, the lower the bandwidth used but more chance of artefacts
|
||||
in the image. The driver automatically chooses a higher compression when
|
||||
the preferred mode is not available.
|
||||
*/
|
||||
/* Set preferred compression quality (0 = uncompressed, 3 = highest compression) */
|
||||
#define VIDIOCPWCSCQUAL _IOW('v', 195, int)
|
||||
/* Get preferred compression quality */
|
||||
#define VIDIOCPWCGCQUAL _IOR('v', 195, int)
|
||||
|
||||
|
||||
/* Retrieve serial number of camera */
|
||||
#define VIDIOCPWCGSERIAL _IOR('v', 198, struct pwc_serial)
|
||||
|
||||
/* This is a probe function; since so many devices are supported, it
|
||||
becomes difficult to include all the names in programs that want to
|
||||
check for the enhanced Philips stuff. So in stead, try this PROBE;
|
||||
it returns a structure with the original name, and the corresponding
|
||||
Philips type.
|
||||
To use, fill the structure with zeroes, call PROBE and if that succeeds,
|
||||
compare the name with that returned from VIDIOCGCAP; they should be the
|
||||
same. If so, you can be assured it is a Philips (OEM) cam and the type
|
||||
is valid.
|
||||
*/
|
||||
#define VIDIOCPWCPROBE _IOR('v', 199, struct pwc_probe)
|
||||
|
||||
/* Set AGC (Automatic Gain Control); int < 0 = auto, 0..65535 = fixed */
|
||||
#define VIDIOCPWCSAGC _IOW('v', 200, int)
|
||||
/* Get AGC; int < 0 = auto; >= 0 = fixed, range 0..65535 */
|
||||
#define VIDIOCPWCGAGC _IOR('v', 200, int)
|
||||
/* Set shutter speed; int < 0 = auto; >= 0 = fixed, range 0..65535 */
|
||||
#define VIDIOCPWCSSHUTTER _IOW('v', 201, int)
|
||||
|
||||
/* Color compensation (Auto White Balance) */
|
||||
#define VIDIOCPWCSAWB _IOW('v', 202, struct pwc_whitebalance)
|
||||
#define VIDIOCPWCGAWB _IOR('v', 202, struct pwc_whitebalance)
|
||||
|
||||
/* Auto WB speed */
|
||||
#define VIDIOCPWCSAWBSPEED _IOW('v', 203, struct pwc_wb_speed)
|
||||
#define VIDIOCPWCGAWBSPEED _IOR('v', 203, struct pwc_wb_speed)
|
||||
|
||||
/* LEDs on/off/blink; int range 0..65535 */
|
||||
#define VIDIOCPWCSLED _IOW('v', 205, struct pwc_leds)
|
||||
#define VIDIOCPWCGLED _IOR('v', 205, struct pwc_leds)
|
||||
|
||||
/* Contour (sharpness); int < 0 = auto, 0..65536 = fixed */
|
||||
#define VIDIOCPWCSCONTOUR _IOW('v', 206, int)
|
||||
#define VIDIOCPWCGCONTOUR _IOR('v', 206, int)
|
||||
|
||||
/* Backlight compensation; 0 = off, otherwise on */
|
||||
#define VIDIOCPWCSBACKLIGHT _IOW('v', 207, int)
|
||||
#define VIDIOCPWCGBACKLIGHT _IOR('v', 207, int)
|
||||
|
||||
/* Flickerless mode; = 0 off, otherwise on */
|
||||
#define VIDIOCPWCSFLICKER _IOW('v', 208, int)
|
||||
#define VIDIOCPWCGFLICKER _IOR('v', 208, int)
|
||||
|
||||
/* Dynamic noise reduction; 0 off, 3 = high noise reduction */
|
||||
#define VIDIOCPWCSDYNNOISE _IOW('v', 209, int)
|
||||
#define VIDIOCPWCGDYNNOISE _IOR('v', 209, int)
|
||||
|
||||
/* Real image size as used by the camera; tells you whether or not there's a gray border around the image */
|
||||
#define VIDIOCPWCGREALSIZE _IOR('v', 210, struct pwc_imagesize)
|
||||
|
||||
/* Motorized pan & tilt functions */
|
||||
#define VIDIOCPWCMPTRESET _IOW('v', 211, int)
|
||||
#define VIDIOCPWCMPTGRANGE _IOR('v', 211, struct pwc_mpt_range)
|
||||
#define VIDIOCPWCMPTSANGLE _IOW('v', 212, struct pwc_mpt_angles)
|
||||
#define VIDIOCPWCMPTGANGLE _IOR('v', 212, struct pwc_mpt_angles)
|
||||
#define VIDIOCPWCMPTSTATUS _IOR('v', 213, struct pwc_mpt_status)
|
||||
|
||||
/* Get the USB set-video command; needed for initializing libpwcx */
|
||||
#define VIDIOCPWCGVIDCMD _IOR('v', 215, struct pwc_video_command)
|
||||
struct pwc_table_init_buffer {
|
||||
int len;
|
||||
char *buffer;
|
||||
|
||||
};
|
||||
#define VIDIOCPWCGVIDTABLE _IOR('v', 216, struct pwc_table_init_buffer)
|
||||
|
||||
/*
|
||||
* This is private command used when communicating with v4l2.
|
||||
* In the future all private ioctl will be remove/replace to
|
||||
* use interface offer by v4l2.
|
||||
*/
|
||||
|
||||
#define V4L2_CID_PRIVATE_SAVE_USER (V4L2_CID_PRIVATE_BASE + 0)
|
||||
#define V4L2_CID_PRIVATE_RESTORE_USER (V4L2_CID_PRIVATE_BASE + 1)
|
||||
#define V4L2_CID_PRIVATE_RESTORE_FACTORY (V4L2_CID_PRIVATE_BASE + 2)
|
||||
#define V4L2_CID_PRIVATE_COLOUR_MODE (V4L2_CID_PRIVATE_BASE + 3)
|
||||
#define V4L2_CID_PRIVATE_AUTOCONTOUR (V4L2_CID_PRIVATE_BASE + 4)
|
||||
#define V4L2_CID_PRIVATE_CONTOUR (V4L2_CID_PRIVATE_BASE + 5)
|
||||
#define V4L2_CID_PRIVATE_BACKLIGHT (V4L2_CID_PRIVATE_BASE + 6)
|
||||
#define V4L2_CID_PRIVATE_FLICKERLESS (V4L2_CID_PRIVATE_BASE + 7)
|
||||
#define V4L2_CID_PRIVATE_NOISE_REDUCTION (V4L2_CID_PRIVATE_BASE + 8)
|
||||
|
||||
struct pwc_raw_frame {
|
||||
__le16 type; /* type of the webcam */
|
||||
__le16 vbandlength; /* Size of 4lines compressed (used by the decompressor) */
|
||||
__u8 cmd[4]; /* the four byte of the command (in case of nala,
|
||||
only the first 3 bytes is filled) */
|
||||
__u8 rawframe[0]; /* frame_size = H/4*vbandlength */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
#endif
|
||||
@@ -18,13 +18,15 @@
|
||||
#define RC_TYPE_JVC (1 << 3) /* JVC protocol */
|
||||
#define RC_TYPE_SONY (1 << 4) /* Sony12/15/20 protocol */
|
||||
#define RC_TYPE_RC5_SZ (1 << 5) /* RC5 variant used by Streamzap */
|
||||
#define RC_TYPE_SANYO (1 << 6) /* Sanyo protocol */
|
||||
#define RC_TYPE_MCE_KBD (1 << 29) /* RC6-ish MCE keyboard/mouse */
|
||||
#define RC_TYPE_LIRC (1 << 30) /* Pass raw IR to lirc userspace */
|
||||
#define RC_TYPE_OTHER (1u << 31)
|
||||
|
||||
#define RC_TYPE_ALL (RC_TYPE_RC5 | RC_TYPE_NEC | RC_TYPE_RC6 | \
|
||||
RC_TYPE_JVC | RC_TYPE_SONY | RC_TYPE_LIRC | \
|
||||
RC_TYPE_RC5_SZ | RC_TYPE_MCE_KBD | RC_TYPE_OTHER)
|
||||
#define RC_TYPE_ALL (RC_TYPE_RC5 | RC_TYPE_NEC | RC_TYPE_RC6 | \
|
||||
RC_TYPE_JVC | RC_TYPE_SONY | RC_TYPE_LIRC | \
|
||||
RC_TYPE_RC5_SZ | RC_TYPE_SANYO | RC_TYPE_MCE_KBD | \
|
||||
RC_TYPE_OTHER)
|
||||
|
||||
struct rc_map_table {
|
||||
u32 scancode;
|
||||
@@ -145,7 +147,7 @@ void rc_map_init(void);
|
||||
#define RC_MAP_TREKSTOR "rc-trekstor"
|
||||
#define RC_MAP_TT_1500 "rc-tt-1500"
|
||||
#define RC_MAP_TWINHAN_VP1027_DVBS "rc-twinhan1027"
|
||||
#define RC_MAP_VIDEOMATE_M1F "rc-videomate-m1f"
|
||||
#define RC_MAP_VIDEOMATE_K100 "rc-videomate-k100"
|
||||
#define RC_MAP_VIDEOMATE_S350 "rc-videomate-s350"
|
||||
#define RC_MAP_VIDEOMATE_TV_PVR "rc-videomate-tv-pvr"
|
||||
#define RC_MAP_WINFAST "rc-winfast"
|
||||
|
||||
@@ -94,7 +94,7 @@ struct soc_camera_host_ops {
|
||||
struct soc_camera_device *);
|
||||
int (*reqbufs)(struct soc_camera_device *, struct v4l2_requestbuffers *);
|
||||
int (*querycap)(struct soc_camera_host *, struct v4l2_capability *);
|
||||
int (*set_bus_param)(struct soc_camera_device *, __u32);
|
||||
int (*set_bus_param)(struct soc_camera_device *);
|
||||
int (*get_parm)(struct soc_camera_device *, struct v4l2_streamparm *);
|
||||
int (*set_parm)(struct soc_camera_device *, struct v4l2_streamparm *);
|
||||
int (*enum_fsizes)(struct soc_camera_device *, struct v4l2_frmsizeenum *);
|
||||
|
||||
@@ -196,6 +196,10 @@ struct v4l2_ioctl_ops {
|
||||
struct v4l2_crop *a);
|
||||
int (*vidioc_s_crop) (struct file *file, void *fh,
|
||||
struct v4l2_crop *a);
|
||||
int (*vidioc_g_selection) (struct file *file, void *fh,
|
||||
struct v4l2_selection *s);
|
||||
int (*vidioc_s_selection) (struct file *file, void *fh,
|
||||
struct v4l2_selection *s);
|
||||
/* Compression ioctls */
|
||||
int (*vidioc_g_jpegcomp) (struct file *file, void *fh,
|
||||
struct v4l2_jpegcompression *a);
|
||||
|
||||
Reference in New Issue
Block a user