aboutsummaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
Diffstat (limited to 'include/media')
-rw-r--r--include/media/cx2341x.h6
-rw-r--r--include/media/ivtv.h65
-rw-r--r--include/media/tuner.h5
-rw-r--r--include/media/v4l2-chip-ident.h149
-rw-r--r--include/media/v4l2-common.h47
-rw-r--r--include/media/v4l2-dev.h10
6 files changed, 244 insertions, 38 deletions
diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h
index d758a52cf55..38c12fed753 100644
--- a/include/media/cx2341x.h
+++ b/include/media/cx2341x.h
@@ -40,6 +40,7 @@ struct cx2341x_mpeg_params {
/* stream */
enum v4l2_mpeg_stream_type stream_type;
enum v4l2_mpeg_stream_vbi_fmt stream_vbi_fmt;
+ u16 stream_insert_nav_packets;
/* audio */
enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq;
@@ -50,6 +51,7 @@ struct cx2341x_mpeg_params {
enum v4l2_mpeg_audio_emphasis audio_emphasis;
enum v4l2_mpeg_audio_crc audio_crc;
u16 audio_properties;
+ u16 audio_mute;
/* video */
enum v4l2_mpeg_video_encoding video_encoding;
@@ -61,6 +63,8 @@ struct cx2341x_mpeg_params {
u32 video_bitrate;
u32 video_bitrate_peak;
u16 video_temporal_decimation;
+ u16 video_mute;
+ u32 video_mute_yuv;
/* encoding filters */
enum v4l2_mpeg_cx2341x_video_spatial_filter_mode video_spatial_filter_mode;
@@ -162,7 +166,7 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix);
#define CX2341X_ENC_SET_PLACEHOLDER 0xd7
#define CX2341X_ENC_MUTE_VIDEO 0xd9
#define CX2341X_ENC_MUTE_AUDIO 0xda
-#define CX2341X_ENC_UNKNOWN 0xdb
+#define CX2341X_ENC_SET_VERT_CROP_LINE 0xdb
#define CX2341X_ENC_MISC 0xdc
/* OSD API, specific to the cx23415 */
diff --git a/include/media/ivtv.h b/include/media/ivtv.h
new file mode 100644
index 00000000000..412b48ea8ed
--- /dev/null
+++ b/include/media/ivtv.h
@@ -0,0 +1,65 @@
+/*
+ Public ivtv API header
+ Copyright (C) 2003-2004 Kevin Thayer <nufan_wfk at yahoo.com>
+ Copyright (C) 2004-2007 Hans Verkuil <hverkuil@xs4all.nl>
+
+ 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
+ */
+
+#ifndef _LINUX_IVTV_H
+#define _LINUX_IVTV_H
+
+/* ivtv knows several distinct output modes: MPEG streaming,
+ YUV streaming, YUV updates through user DMA and the passthrough
+ mode.
+
+ In order to clearly tell the driver that we are in user DMA
+ YUV mode you need to call IVTV_IOC_DMA_FRAME with y_source == NULL
+ first (althrough if you don't then the first time
+ DMA_FRAME is called the mode switch is done automatically).
+
+ When you close the file handle the user DMA mode is exited again.
+
+ While in one mode, you cannot use another mode (EBUSY is returned).
+
+ All this means that if you want to change the YUV interlacing
+ for the user DMA YUV mode you first need to do call IVTV_IOC_DMA_FRAME
+ with y_source == NULL before you can set the correct format using
+ VIDIOC_S_FMT.
+
+ Eventually all this should be replaced with a proper V4L2 API,
+ but for now we have to do it this way. */
+
+struct ivtv_dma_frame {
+ enum v4l2_buf_type type; /* V4L2_BUF_TYPE_VIDEO_OUTPUT */
+ __u32 pixelformat; /* 0 == same as destination */
+ void __user *y_source; /* if NULL and type == V4L2_BUF_TYPE_VIDEO_OUTPUT,
+ then just switch to user DMA YUV output mode */
+ void __user *uv_source; /* Unused for RGB pixelformats */
+ struct v4l2_rect src;
+ struct v4l2_rect dst;
+ __u32 src_width;
+ __u32 src_height;
+};
+
+#define IVTV_IOC_DMA_FRAME _IOW ('V', BASE_VIDIOC_PRIVATE+0, struct ivtv_dma_frame)
+
+/* These are the VBI types as they appear in the embedded VBI private packets. */
+#define IVTV_SLICED_TYPE_TELETEXT_B (1)
+#define IVTV_SLICED_TYPE_CAPTION_525 (4)
+#define IVTV_SLICED_TYPE_WSS_625 (5)
+#define IVTV_SLICED_TYPE_VPS (7)
+
+#endif /* _LINUX_IVTV_H */
diff --git a/include/media/tuner.h b/include/media/tuner.h
index 99acf847365..a41ac41113a 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -177,6 +177,8 @@ struct tuner_setup {
unsigned short addr; /* I2C address */
unsigned int type; /* Tuner type */
unsigned int mode_mask; /* Allowed tuner modes */
+ unsigned int config; /* configuraion for more complex tuners */
+ int (*tuner_callback) (void *dev, int command,int arg);
};
struct tuner {
@@ -211,6 +213,9 @@ struct tuner {
unsigned char tda827x_ver;
unsigned int sgIF;
+ unsigned int config;
+ int (*tuner_callback) (void *dev, int command,int arg);
+
/* function ptrs */
void (*set_tv_freq)(struct i2c_client *c, unsigned int freq);
void (*set_radio_freq)(struct i2c_client *c, unsigned int freq);
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
new file mode 100644
index 00000000000..09d16c4f00f
--- /dev/null
+++ b/include/media/v4l2-chip-ident.h
@@ -0,0 +1,149 @@
+/*
+ v4l2 chip identifiers header
+
+ This header provides a list of chip identifiers that can be returned
+ through the VIDIOC_G_CHIP_IDENT ioctl.
+
+ Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl>
+
+ 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
+ */
+
+#ifndef V4L2_CHIP_IDENT_H_
+#define V4L2_CHIP_IDENT_H_
+
+/* VIDIOC_G_CHIP_IDENT: identifies the actual chip installed on the board */
+enum {
+ /* general idents: reserved range 0-49 */
+ V4L2_IDENT_NONE = 0, /* No chip matched */
+ V4L2_IDENT_AMBIGUOUS = 1, /* Match too general, multiple chips matched */
+ V4L2_IDENT_UNKNOWN = 2, /* Chip found, but cannot identify */
+
+ /* module tvaudio: reserved range 50-99 */
+ V4L2_IDENT_TVAUDIO = 50, /* A tvaudio chip, unknown which it is exactly */
+
+ /* module saa7110: just ident 100 */
+ V4L2_IDENT_SAA7110 = 100,
+
+ /* module saa7111: just ident 101 */
+ V4L2_IDENT_SAA7111 = 101,
+
+ /* module saa7115: reserved range 102-149 */
+ V4L2_IDENT_SAA7113 = 103,
+ V4L2_IDENT_SAA7114 = 104,
+ V4L2_IDENT_SAA7115 = 105,
+ V4L2_IDENT_SAA7118 = 108,
+
+ /* module saa7127: reserved range 150-199 */
+ V4L2_IDENT_SAA7127 = 157,
+ V4L2_IDENT_SAA7129 = 159,
+
+ /* module cx25840: reserved range 200-249 */
+ V4L2_IDENT_CX25836 = 236,
+ V4L2_IDENT_CX25837 = 237,
+ V4L2_IDENT_CX25840 = 240,
+ V4L2_IDENT_CX25841 = 241,
+ V4L2_IDENT_CX25842 = 242,
+ V4L2_IDENT_CX25843 = 243,
+
+ /* OmniVision sensors: reserved range 250-299 */
+ V4L2_IDENT_OV7670 = 250,
+
+ /* Conexant MPEG encoder/decoders: reserved range 410-420 */
+ V4L2_IDENT_CX23415 = 415,
+ V4L2_IDENT_CX23416 = 416,
+
+ /* module wm8739: just ident 8739 */
+ V4L2_IDENT_WM8739 = 8739,
+
+ /* module wm8775: just ident 8775 */
+ V4L2_IDENT_WM8775 = 8775,
+
+ /* module cs53132a: just ident 53132 */
+ V4L2_IDENT_CS53l32A = 53132,
+
+ /* module upd64031a: just ident 64031 */
+ V4L2_IDENT_UPD64031A = 64031,
+
+ /* module upd64083: just ident 64083 */
+ V4L2_IDENT_UPD64083 = 64083,
+
+ /* module msp34xx: reserved range 34000-34999 */
+ V4L2_IDENT_MSP3400B = 34002,
+ V4L2_IDENT_MSP3410B = 34102,
+
+ V4L2_IDENT_MSP3400C = 34003,
+ V4L2_IDENT_MSP3410C = 34103,
+
+ V4L2_IDENT_MSP3400D = 34004,
+ V4L2_IDENT_MSP3410D = 34104,
+ V4L2_IDENT_MSP3405D = 34054,
+ V4L2_IDENT_MSP3415D = 34154,
+ V4L2_IDENT_MSP3407D = 34074,
+ V4L2_IDENT_MSP3417D = 34174,
+
+ V4L2_IDENT_MSP3400G = 34007,
+ V4L2_IDENT_MSP3410G = 34107,
+ V4L2_IDENT_MSP3420G = 34207,
+ V4L2_IDENT_MSP3430G = 34307,
+ V4L2_IDENT_MSP3440G = 34407,
+ V4L2_IDENT_MSP3450G = 34507,
+ V4L2_IDENT_MSP3460G = 34607,
+
+ V4L2_IDENT_MSP3401G = 34017,
+ V4L2_IDENT_MSP3411G = 34117,
+ V4L2_IDENT_MSP3421G = 34217,
+ V4L2_IDENT_MSP3431G = 34317,
+ V4L2_IDENT_MSP3441G = 34417,
+ V4L2_IDENT_MSP3451G = 34517,
+ V4L2_IDENT_MSP3461G = 34617,
+
+ V4L2_IDENT_MSP3402G = 34027,
+ V4L2_IDENT_MSP3412G = 34127,
+ V4L2_IDENT_MSP3422G = 34227,
+ V4L2_IDENT_MSP3442G = 34427,
+ V4L2_IDENT_MSP3452G = 34527,
+
+ V4L2_IDENT_MSP3405G = 34057,
+ V4L2_IDENT_MSP3415G = 34157,
+ V4L2_IDENT_MSP3425G = 34257,
+ V4L2_IDENT_MSP3435G = 34357,
+ V4L2_IDENT_MSP3445G = 34457,
+ V4L2_IDENT_MSP3455G = 34557,
+ V4L2_IDENT_MSP3465G = 34657,
+
+ V4L2_IDENT_MSP3407G = 34077,
+ V4L2_IDENT_MSP3417G = 34177,
+ V4L2_IDENT_MSP3427G = 34277,
+ V4L2_IDENT_MSP3437G = 34377,
+ V4L2_IDENT_MSP3447G = 34477,
+ V4L2_IDENT_MSP3457G = 34577,
+ V4L2_IDENT_MSP3467G = 34677,
+
+ /* module msp44xx: reserved range 44000-44999 */
+ V4L2_IDENT_MSP4400G = 44007,
+ V4L2_IDENT_MSP4410G = 44107,
+ V4L2_IDENT_MSP4420G = 44207,
+ V4L2_IDENT_MSP4440G = 44407,
+ V4L2_IDENT_MSP4450G = 44507,
+
+ V4L2_IDENT_MSP4408G = 44087,
+ V4L2_IDENT_MSP4418G = 44187,
+ V4L2_IDENT_MSP4428G = 44287,
+ V4L2_IDENT_MSP4448G = 44487,
+ V4L2_IDENT_MSP4458G = 44587,
+};
+
+#endif
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index 6eaeec98ed8..181a40c46a5 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -98,6 +98,8 @@ u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id);
struct i2c_client; /* forward reference */
int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 id_type, u32 chip_id);
+int v4l2_chip_ident_i2c_client(struct i2c_client *c, struct v4l2_chip_ident *chip,
+ u32 ident, u32 revision);
int v4l2_chip_match_host(u32 id_type, u32 chip_id);
/* ------------------------------------------------------------------------- */
@@ -114,39 +116,6 @@ struct v4l2_decode_vbi_line {
u32 type; /* VBI service type (V4L2_SLICED_*). 0 if no service found */
};
-/* VIDIOC_INT_G_CHIP_IDENT: identifies the actual chip installed on the board */
-enum v4l2_chip_ident {
- /* general idents: reserved range 0-49 */
- V4L2_IDENT_UNKNOWN = 0,
-
- /* module saa7110: just ident= 100 */
- V4L2_IDENT_SAA7110 = 100,
-
- /* module saa7111: just ident= 101 */
- V4L2_IDENT_SAA7111 = 101,
-
- /* module saa7115: reserved range 102-149 */
- V4L2_IDENT_SAA7113 = 103,
- V4L2_IDENT_SAA7114 = 104,
- V4L2_IDENT_SAA7115 = 105,
- V4L2_IDENT_SAA7118 = 108,
-
- /* module saa7127: reserved range 150-199 */
- V4L2_IDENT_SAA7127 = 157,
- V4L2_IDENT_SAA7129 = 159,
-
- /* module cx25840: reserved range 200-249 */
- V4L2_IDENT_CX25836 = 236,
- V4L2_IDENT_CX25837 = 237,
- V4L2_IDENT_CX25840 = 240,
- V4L2_IDENT_CX25841 = 241,
- V4L2_IDENT_CX25842 = 242,
- V4L2_IDENT_CX25843 = 243,
-
- /* OmniVision sensors - range 250-299 */
- V4L2_IDENT_OV7670 = 250,
-};
-
/* audio ioctls */
/* v4l device was opened in Radio mode, to be replaced by VIDIOC_INT_S_TUNER_MODE */
@@ -208,10 +177,6 @@ enum v4l2_chip_ident {
whether CC data from the first or second field should be obtained). */
#define VIDIOC_INT_G_VBI_DATA _IOWR('d', 106, struct v4l2_sliced_vbi_data)
-/* Returns the chip identifier or V4L2_IDENT_UNKNOWN if no identification can
- be made. */
-#define VIDIOC_INT_G_CHIP_IDENT _IOR ('d', 107, enum v4l2_chip_ident)
-
/* Sets I2S speed in bps. This is used to provide a standard way to select I2S
clock used by driving digital audio streams at some board designs.
Usual values for the frequency are 1024000 and 2048000.
@@ -254,4 +219,12 @@ struct v4l2_crystal_freq {
default values. */
#define VIDIOC_INT_INIT _IOW ('d', 114, u32)
+/* Set v4l2_std_id for video OUTPUT devices. This is ignored by
+ video input devices. */
+#define VIDIOC_INT_S_STD_OUTPUT _IOW ('d', 115, v4l2_std_id)
+
+/* Get v4l2_std_id for video OUTPUT devices. This is ignored by
+ video input devices. */
+#define VIDIOC_INT_G_STD_OUTPUT _IOW ('d', 116, v4l2_std_id)
+
#endif /* V4L2_COMMON_H_ */
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index 1dd3d3239ec..d62847f846c 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -127,6 +127,8 @@ struct video_device
struct v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_video_output)(struct file *file, void *fh,
struct v4l2_fmtdesc *f);
+ int (*vidioc_enum_fmt_output_overlay) (struct file *file, void *fh,
+ struct v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh,
struct v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh,
@@ -145,6 +147,8 @@ struct video_device
struct v4l2_format *f);
int (*vidioc_g_fmt_video_output)(struct file *file, void *fh,
struct v4l2_format *f);
+ int (*vidioc_g_fmt_output_overlay) (struct file *file, void *fh,
+ struct v4l2_format *f);
int (*vidioc_g_fmt_type_private)(struct file *file, void *fh,
struct v4l2_format *f);
@@ -162,6 +166,8 @@ struct video_device
struct v4l2_format *f);
int (*vidioc_s_fmt_video_output)(struct file *file, void *fh,
struct v4l2_format *f);
+ int (*vidioc_s_fmt_output_overlay) (struct file *file, void *fh,
+ struct v4l2_format *f);
int (*vidioc_s_fmt_type_private)(struct file *file, void *fh,
struct v4l2_format *f);
@@ -178,6 +184,8 @@ struct video_device
struct v4l2_format *f);
int (*vidioc_try_fmt_video_output)(struct file *file, void *fh,
struct v4l2_format *f);
+ int (*vidioc_try_fmt_output_overlay)(struct file *file, void *fh,
+ struct v4l2_format *f);
int (*vidioc_try_fmt_type_private)(struct file *file, void *fh,
struct v4l2_format *f);
@@ -309,6 +317,8 @@ struct video_device
int (*vidioc_s_register) (struct file *file, void *fh,
struct v4l2_register *reg);
#endif
+ int (*vidioc_g_chip_ident) (struct file *file, void *fh,
+ struct v4l2_chip_ident *chip);
#ifdef OBSOLETE_OWNER /* to be removed soon */