aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-05-01 00:24:54 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-05-01 00:24:54 -0400
commitbc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775 (patch)
tree427fcf2a7287c16d4b5aa6cbf494d59579a6a8b1 /include/media
parent3d29cdff999c37b3876082278a8134a0642a02cd (diff)
parentdc87c3985e9b442c60994308a96f887579addc39 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/usb/input/Makefile drivers/usb/input/gtco.c
Diffstat (limited to 'include/media')
-rw-r--r--include/media/cx2341x.h10
-rw-r--r--include/media/ir-common.h46
-rw-r--r--include/media/ivtv.h65
-rw-r--r--include/media/saa7115.h3
-rw-r--r--include/media/saa7146_vv.h3
-rw-r--r--include/media/tuner.h5
-rw-r--r--include/media/v4l2-chip-ident.h149
-rw-r--r--include/media/v4l2-common.h69
-rw-r--r--include/media/v4l2-dev.h25
-rw-r--r--include/media/video-buf.h3
10 files changed, 322 insertions, 56 deletions
diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h
index ecad55bf0162..38c12fed7535 100644
--- a/include/media/cx2341x.h
+++ b/include/media/cx2341x.h
@@ -40,6 +40,7 @@ struct cx2341x_mpeg_params {
40 /* stream */ 40 /* stream */
41 enum v4l2_mpeg_stream_type stream_type; 41 enum v4l2_mpeg_stream_type stream_type;
42 enum v4l2_mpeg_stream_vbi_fmt stream_vbi_fmt; 42 enum v4l2_mpeg_stream_vbi_fmt stream_vbi_fmt;
43 u16 stream_insert_nav_packets;
43 44
44 /* audio */ 45 /* audio */
45 enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq; 46 enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq;
@@ -50,6 +51,7 @@ struct cx2341x_mpeg_params {
50 enum v4l2_mpeg_audio_emphasis audio_emphasis; 51 enum v4l2_mpeg_audio_emphasis audio_emphasis;
51 enum v4l2_mpeg_audio_crc audio_crc; 52 enum v4l2_mpeg_audio_crc audio_crc;
52 u16 audio_properties; 53 u16 audio_properties;
54 u16 audio_mute;
53 55
54 /* video */ 56 /* video */
55 enum v4l2_mpeg_video_encoding video_encoding; 57 enum v4l2_mpeg_video_encoding video_encoding;
@@ -57,11 +59,12 @@ struct cx2341x_mpeg_params {
57 u16 video_b_frames; 59 u16 video_b_frames;
58 u16 video_gop_size; 60 u16 video_gop_size;
59 u16 video_gop_closure; 61 u16 video_gop_closure;
60 u16 video_pulldown;
61 enum v4l2_mpeg_video_bitrate_mode video_bitrate_mode; 62 enum v4l2_mpeg_video_bitrate_mode video_bitrate_mode;
62 u32 video_bitrate; 63 u32 video_bitrate;
63 u32 video_bitrate_peak; 64 u32 video_bitrate_peak;
64 u16 video_temporal_decimation; 65 u16 video_temporal_decimation;
66 u16 video_mute;
67 u32 video_mute_yuv;
65 68
66 /* encoding filters */ 69 /* encoding filters */
67 enum v4l2_mpeg_cx2341x_video_spatial_filter_mode video_spatial_filter_mode; 70 enum v4l2_mpeg_cx2341x_video_spatial_filter_mode video_spatial_filter_mode;
@@ -121,8 +124,6 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix);
121#define CX2341X_DEC_SET_DISPLAY_BUFFERS 0x18 124#define CX2341X_DEC_SET_DISPLAY_BUFFERS 0x18
122#define CX2341X_DEC_EXTRACT_VBI 0x19 125#define CX2341X_DEC_EXTRACT_VBI 0x19
123#define CX2341X_DEC_SET_DECODER_SOURCE 0x1a 126#define CX2341X_DEC_SET_DECODER_SOURCE 0x1a
124#define CX2341X_DEC_SET_AUDIO_OUTPUT 0x1b
125#define CX2341X_DEC_SET_AV_DELAY 0x1c
126#define CX2341X_DEC_SET_PREBUFFERING 0x1e 127#define CX2341X_DEC_SET_PREBUFFERING 0x1e
127 128
128/* MPEG encoder API */ 129/* MPEG encoder API */
@@ -141,7 +142,6 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix);
141#define CX2341X_ENC_SET_DNR_FILTER_PROPS 0x9d 142#define CX2341X_ENC_SET_DNR_FILTER_PROPS 0x9d
142#define CX2341X_ENC_SET_CORING_LEVELS 0x9f 143#define CX2341X_ENC_SET_CORING_LEVELS 0x9f
143#define CX2341X_ENC_SET_SPATIAL_FILTER_TYPE 0xa1 144#define CX2341X_ENC_SET_SPATIAL_FILTER_TYPE 0xa1
144#define CX2341X_ENC_SET_3_2_PULLDOWN 0xb1
145#define CX2341X_ENC_SET_VBI_LINE 0xb7 145#define CX2341X_ENC_SET_VBI_LINE 0xb7
146#define CX2341X_ENC_SET_STREAM_TYPE 0xb9 146#define CX2341X_ENC_SET_STREAM_TYPE 0xb9
147#define CX2341X_ENC_SET_OUTPUT_PORT 0xbb 147#define CX2341X_ENC_SET_OUTPUT_PORT 0xbb
@@ -166,7 +166,7 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix);
166#define CX2341X_ENC_SET_PLACEHOLDER 0xd7 166#define CX2341X_ENC_SET_PLACEHOLDER 0xd7
167#define CX2341X_ENC_MUTE_VIDEO 0xd9 167#define CX2341X_ENC_MUTE_VIDEO 0xd9
168#define CX2341X_ENC_MUTE_AUDIO 0xda 168#define CX2341X_ENC_MUTE_AUDIO 0xda
169#define CX2341X_ENC_UNKNOWN 0xdb 169#define CX2341X_ENC_SET_VERT_CROP_LINE 0xdb
170#define CX2341X_ENC_MISC 0xdc 170#define CX2341X_ENC_MISC 0xdc
171 171
172/* OSD API, specific to the cx23415 */ 172/* OSD API, specific to the cx23415 */
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 4bb0ad810179..9807a7c15830 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -36,6 +36,11 @@
36#define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \ 36#define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \
37 ? tab[code] : KEY_RESERVED) 37 ? tab[code] : KEY_RESERVED)
38 38
39#define RC5_START(x) (((x)>>12)&3)
40#define RC5_TOGGLE(x) (((x)>>11)&1)
41#define RC5_ADDR(x) (((x)>>6)&31)
42#define RC5_INSTR(x) ((x)&63)
43
39struct ir_input_state { 44struct ir_input_state {
40 /* configuration */ 45 /* configuration */
41 int ir_type; 46 int ir_type;
@@ -48,6 +53,40 @@ struct ir_input_state {
48 int keypressed; /* current state */ 53 int keypressed; /* current state */
49}; 54};
50 55
56/* this was saa7134_ir and bttv_ir, moved here for
57 * rc5 decoding. */
58struct card_ir {
59 struct input_dev *dev;
60 struct ir_input_state ir;
61 char name[32];
62 char phys[32];
63
64 /* Usual gpio signalling */
65
66 u32 mask_keycode;
67 u32 mask_keydown;
68 u32 mask_keyup;
69 u32 polling;
70 u32 last_gpio;
71 int shift_by;
72 int start; // What should RC5_START() be
73 int addr; // What RC5_ADDR() should be.
74 int rc5_key_timeout;
75 int rc5_remote_gap;
76 struct work_struct work;
77 struct timer_list timer;
78
79 /* RC5 gpio */
80 u32 rc5_gpio;
81 struct timer_list timer_end; /* timer_end for code completion */
82 struct timer_list timer_keyup; /* timer_end for key release */
83 u32 last_rc5; /* last good rc5 code */
84 u32 last_bit; /* last raw bit seen */
85 u32 code; /* raw code under construction */
86 struct timeval base_time; /* time of last seen code */
87 int active; /* building raw code */
88};
89
51void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, 90void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
52 int ir_type, IR_KEYTAB_TYPE *ir_codes); 91 int ir_type, IR_KEYTAB_TYPE *ir_codes);
53void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); 92void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir);
@@ -58,6 +97,10 @@ int ir_dump_samples(u32 *samples, int count);
58int ir_decode_biphase(u32 *samples, int count, int low, int high); 97int ir_decode_biphase(u32 *samples, int count, int low, int high);
59int ir_decode_pulsedistance(u32 *samples, int count, int low, int high); 98int ir_decode_pulsedistance(u32 *samples, int count, int low, int high);
60 99
100u32 ir_rc5_decode(unsigned int code);
101void ir_rc5_timer_end(unsigned long data);
102void ir_rc5_timer_keyup(unsigned long data);
103
61/* Keymaps to be used by other modules */ 104/* Keymaps to be used by other modules */
62 105
63extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE]; 106extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE];
@@ -94,6 +137,9 @@ extern IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE];
94extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE]; 137extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE];
95extern IR_KEYTAB_TYPE ir_codes_proteus_2309[IR_KEYTAB_SIZE]; 138extern IR_KEYTAB_TYPE ir_codes_proteus_2309[IR_KEYTAB_SIZE];
96extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE]; 139extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE];
140extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE];
141extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE];
142extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE];
97 143
98#endif 144#endif
99 145
diff --git a/include/media/ivtv.h b/include/media/ivtv.h
new file mode 100644
index 000000000000..412b48ea8eda
--- /dev/null
+++ b/include/media/ivtv.h
@@ -0,0 +1,65 @@
1/*
2 Public ivtv API header
3 Copyright (C) 2003-2004 Kevin Thayer <nufan_wfk at yahoo.com>
4 Copyright (C) 2004-2007 Hans Verkuil <hverkuil@xs4all.nl>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef _LINUX_IVTV_H
22#define _LINUX_IVTV_H
23
24/* ivtv knows several distinct output modes: MPEG streaming,
25 YUV streaming, YUV updates through user DMA and the passthrough
26 mode.
27
28 In order to clearly tell the driver that we are in user DMA
29 YUV mode you need to call IVTV_IOC_DMA_FRAME with y_source == NULL
30 first (althrough if you don't then the first time
31 DMA_FRAME is called the mode switch is done automatically).
32
33 When you close the file handle the user DMA mode is exited again.
34
35 While in one mode, you cannot use another mode (EBUSY is returned).
36
37 All this means that if you want to change the YUV interlacing
38 for the user DMA YUV mode you first need to do call IVTV_IOC_DMA_FRAME
39 with y_source == NULL before you can set the correct format using
40 VIDIOC_S_FMT.
41
42 Eventually all this should be replaced with a proper V4L2 API,
43 but for now we have to do it this way. */
44
45struct ivtv_dma_frame {
46 enum v4l2_buf_type type; /* V4L2_BUF_TYPE_VIDEO_OUTPUT */
47 __u32 pixelformat; /* 0 == same as destination */
48 void __user *y_source; /* if NULL and type == V4L2_BUF_TYPE_VIDEO_OUTPUT,
49 then just switch to user DMA YUV output mode */
50 void __user *uv_source; /* Unused for RGB pixelformats */
51 struct v4l2_rect src;
52 struct v4l2_rect dst;
53 __u32 src_width;
54 __u32 src_height;
55};
56
57#define IVTV_IOC_DMA_FRAME _IOW ('V', BASE_VIDIOC_PRIVATE+0, struct ivtv_dma_frame)
58
59/* These are the VBI types as they appear in the embedded VBI private packets. */
60#define IVTV_SLICED_TYPE_TELETEXT_B (1)
61#define IVTV_SLICED_TYPE_CAPTION_525 (4)
62#define IVTV_SLICED_TYPE_WSS_625 (5)
63#define IVTV_SLICED_TYPE_VPS (7)
64
65#endif /* _LINUX_IVTV_H */
diff --git a/include/media/saa7115.h b/include/media/saa7115.h
index 9f0e2285a099..f677dfb9d373 100644
--- a/include/media/saa7115.h
+++ b/include/media/saa7115.h
@@ -42,5 +42,8 @@
42#define SAA7115_FREQ_FL_CGCDIV (1 << 1) /* SA 3A[6], CGCDIV, SAA7115 only */ 42#define SAA7115_FREQ_FL_CGCDIV (1 << 1) /* SA 3A[6], CGCDIV, SAA7115 only */
43#define SAA7115_FREQ_FL_APLL (1 << 2) /* SA 3A[3], APLL, SAA7114/5 only */ 43#define SAA7115_FREQ_FL_APLL (1 << 2) /* SA 3A[3], APLL, SAA7114/5 only */
44 44
45#define SAA7115_IPORT_ON 1
46#define SAA7115_IPORT_OFF 0
47
45#endif 48#endif
46 49
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h
index 83fe2e3d1e25..50e33b0e9349 100644
--- a/include/media/saa7146_vv.h
+++ b/include/media/saa7146_vv.h
@@ -239,7 +239,8 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits);
239#define SAA7146_HPS_SYNC_PORT_B 0x01 239#define SAA7146_HPS_SYNC_PORT_B 0x01
240 240
241/* some memory sizes */ 241/* some memory sizes */
242#define SAA7146_CLIPPING_MEM (14*PAGE_SIZE) 242/* max. 16 clipping rectangles */
243#define SAA7146_CLIPPING_MEM (16 * 4 * sizeof(u32))
243 244
244/* some defines for the various clipping-modes */ 245/* some defines for the various clipping-modes */
245#define SAA7146_CLIPPING_RECT 0x4 246#define SAA7146_CLIPPING_RECT 0x4
diff --git a/include/media/tuner.h b/include/media/tuner.h
index 99acf847365c..a41ac41113ac 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -177,6 +177,8 @@ struct tuner_setup {
177 unsigned short addr; /* I2C address */ 177 unsigned short addr; /* I2C address */
178 unsigned int type; /* Tuner type */ 178 unsigned int type; /* Tuner type */
179 unsigned int mode_mask; /* Allowed tuner modes */ 179 unsigned int mode_mask; /* Allowed tuner modes */
180 unsigned int config; /* configuraion for more complex tuners */
181 int (*tuner_callback) (void *dev, int command,int arg);
180}; 182};
181 183
182struct tuner { 184struct tuner {
@@ -211,6 +213,9 @@ struct tuner {
211 unsigned char tda827x_ver; 213 unsigned char tda827x_ver;
212 unsigned int sgIF; 214 unsigned int sgIF;
213 215
216 unsigned int config;
217 int (*tuner_callback) (void *dev, int command,int arg);
218
214 /* function ptrs */ 219 /* function ptrs */
215 void (*set_tv_freq)(struct i2c_client *c, unsigned int freq); 220 void (*set_tv_freq)(struct i2c_client *c, unsigned int freq);
216 void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); 221 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 000000000000..09d16c4f00f7
--- /dev/null
+++ b/include/media/v4l2-chip-ident.h
@@ -0,0 +1,149 @@
1/*
2 v4l2 chip identifiers header
3
4 This header provides a list of chip identifiers that can be returned
5 through the VIDIOC_G_CHIP_IDENT ioctl.
6
7 Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl>
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#ifndef V4L2_CHIP_IDENT_H_
25#define V4L2_CHIP_IDENT_H_
26
27/* VIDIOC_G_CHIP_IDENT: identifies the actual chip installed on the board */
28enum {
29 /* general idents: reserved range 0-49 */
30 V4L2_IDENT_NONE = 0, /* No chip matched */
31 V4L2_IDENT_AMBIGUOUS = 1, /* Match too general, multiple chips matched */
32 V4L2_IDENT_UNKNOWN = 2, /* Chip found, but cannot identify */
33
34 /* module tvaudio: reserved range 50-99 */
35 V4L2_IDENT_TVAUDIO = 50, /* A tvaudio chip, unknown which it is exactly */
36
37 /* module saa7110: just ident 100 */
38 V4L2_IDENT_SAA7110 = 100,
39
40 /* module saa7111: just ident 101 */
41 V4L2_IDENT_SAA7111 = 101,
42
43 /* module saa7115: reserved range 102-149 */
44 V4L2_IDENT_SAA7113 = 103,
45 V4L2_IDENT_SAA7114 = 104,
46 V4L2_IDENT_SAA7115 = 105,
47 V4L2_IDENT_SAA7118 = 108,
48
49 /* module saa7127: reserved range 150-199 */
50 V4L2_IDENT_SAA7127 = 157,
51 V4L2_IDENT_SAA7129 = 159,
52
53 /* module cx25840: reserved range 200-249 */
54 V4L2_IDENT_CX25836 = 236,
55 V4L2_IDENT_CX25837 = 237,
56 V4L2_IDENT_CX25840 = 240,
57 V4L2_IDENT_CX25841 = 241,
58 V4L2_IDENT_CX25842 = 242,
59 V4L2_IDENT_CX25843 = 243,
60
61 /* OmniVision sensors: reserved range 250-299 */
62 V4L2_IDENT_OV7670 = 250,
63
64 /* Conexant MPEG encoder/decoders: reserved range 410-420 */
65 V4L2_IDENT_CX23415 = 415,
66 V4L2_IDENT_CX23416 = 416,
67
68 /* module wm8739: just ident 8739 */
69 V4L2_IDENT_WM8739 = 8739,
70
71 /* module wm8775: just ident 8775 */
72 V4L2_IDENT_WM8775 = 8775,
73
74 /* module cs53132a: just ident 53132 */
75 V4L2_IDENT_CS53l32A = 53132,
76
77 /* module upd64031a: just ident 64031 */
78 V4L2_IDENT_UPD64031A = 64031,
79
80 /* module upd64083: just ident 64083 */
81 V4L2_IDENT_UPD64083 = 64083,
82
83 /* module msp34xx: reserved range 34000-34999 */
84 V4L2_IDENT_MSP3400B = 34002,
85 V4L2_IDENT_MSP3410B = 34102,
86
87 V4L2_IDENT_MSP3400C = 34003,
88 V4L2_IDENT_MSP3410C = 34103,
89
90 V4L2_IDENT_MSP3400D = 34004,
91 V4L2_IDENT_MSP3410D = 34104,
92 V4L2_IDENT_MSP3405D = 34054,
93 V4L2_IDENT_MSP3415D = 34154,
94 V4L2_IDENT_MSP3407D = 34074,
95 V4L2_IDENT_MSP3417D = 34174,
96
97 V4L2_IDENT_MSP3400G = 34007,
98 V4L2_IDENT_MSP3410G = 34107,
99 V4L2_IDENT_MSP3420G = 34207,
100 V4L2_IDENT_MSP3430G = 34307,
101 V4L2_IDENT_MSP3440G = 34407,
102 V4L2_IDENT_MSP3450G = 34507,
103 V4L2_IDENT_MSP3460G = 34607,
104
105 V4L2_IDENT_MSP3401G = 34017,
106 V4L2_IDENT_MSP3411G = 34117,
107 V4L2_IDENT_MSP3421G = 34217,
108 V4L2_IDENT_MSP3431G = 34317,
109 V4L2_IDENT_MSP3441G = 34417,
110 V4L2_IDENT_MSP3451G = 34517,
111 V4L2_IDENT_MSP3461G = 34617,
112
113 V4L2_IDENT_MSP3402G = 34027,
114 V4L2_IDENT_MSP3412G = 34127,
115 V4L2_IDENT_MSP3422G = 34227,
116 V4L2_IDENT_MSP3442G = 34427,
117 V4L2_IDENT_MSP3452G = 34527,
118
119 V4L2_IDENT_MSP3405G = 34057,
120 V4L2_IDENT_MSP3415G = 34157,
121 V4L2_IDENT_MSP3425G = 34257,
122 V4L2_IDENT_MSP3435G = 34357,
123 V4L2_IDENT_MSP3445G = 34457,
124 V4L2_IDENT_MSP3455G = 34557,
125 V4L2_IDENT_MSP3465G = 34657,
126
127 V4L2_IDENT_MSP3407G = 34077,
128 V4L2_IDENT_MSP3417G = 34177,
129 V4L2_IDENT_MSP3427G = 34277,
130 V4L2_IDENT_MSP3437G = 34377,
131 V4L2_IDENT_MSP3447G = 34477,
132 V4L2_IDENT_MSP3457G = 34577,
133 V4L2_IDENT_MSP3467G = 34677,
134
135 /* module msp44xx: reserved range 44000-44999 */
136 V4L2_IDENT_MSP4400G = 44007,
137 V4L2_IDENT_MSP4410G = 44107,
138 V4L2_IDENT_MSP4420G = 44207,
139 V4L2_IDENT_MSP4440G = 44407,
140 V4L2_IDENT_MSP4450G = 44507,
141
142 V4L2_IDENT_MSP4408G = 44087,
143 V4L2_IDENT_MSP4418G = 44187,
144 V4L2_IDENT_MSP4428G = 44287,
145 V4L2_IDENT_MSP4448G = 44487,
146 V4L2_IDENT_MSP4458G = 44587,
147};
148
149#endif
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index 91b19921f958..181a40c46a52 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -64,9 +64,6 @@
64/* Prints the ioctl in a human-readable format */ 64/* Prints the ioctl in a human-readable format */
65extern void v4l_printk_ioctl(unsigned int cmd); 65extern void v4l_printk_ioctl(unsigned int cmd);
66 66
67/* Prints the ioctl and arg in a human-readable format */
68extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg);
69
70/* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ 67/* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */
71#define v4l_print_ioctl(name, cmd) \ 68#define v4l_print_ioctl(name, cmd) \
72 do { \ 69 do { \
@@ -97,14 +94,17 @@ u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id);
97 94
98/* ------------------------------------------------------------------------- */ 95/* ------------------------------------------------------------------------- */
99 96
100/* Internal ioctls */ 97/* Register/chip ident helper function */
101 98
102/* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ 99struct i2c_client; /* forward reference */
103struct v4l2_register { 100int v4l2_chip_match_i2c_client(struct i2c_client *c, u32 id_type, u32 chip_id);
104 u32 i2c_id; /* I2C driver ID of the I2C chip. 0 for the I2C adapter. */ 101int v4l2_chip_ident_i2c_client(struct i2c_client *c, struct v4l2_chip_ident *chip,
105 unsigned long reg; 102 u32 ident, u32 revision);
106 u32 val; 103int v4l2_chip_match_host(u32 id_type, u32 chip_id);
107}; 104
105/* ------------------------------------------------------------------------- */
106
107/* Internal ioctls */
108 108
109/* VIDIOC_INT_DECODE_VBI_LINE */ 109/* VIDIOC_INT_DECODE_VBI_LINE */
110struct v4l2_decode_vbi_line { 110struct v4l2_decode_vbi_line {
@@ -116,39 +116,6 @@ struct v4l2_decode_vbi_line {
116 u32 type; /* VBI service type (V4L2_SLICED_*). 0 if no service found */ 116 u32 type; /* VBI service type (V4L2_SLICED_*). 0 if no service found */
117}; 117};
118 118
119/* VIDIOC_INT_G_CHIP_IDENT: identifies the actual chip installed on the board */
120enum v4l2_chip_ident {
121 /* general idents: reserved range 0-49 */
122 V4L2_IDENT_UNKNOWN = 0,
123
124 /* module saa7110: just ident= 100 */
125 V4L2_IDENT_SAA7110 = 100,
126
127 /* module saa7111: just ident= 101 */
128 V4L2_IDENT_SAA7111 = 101,
129
130 /* module saa7115: reserved range 102-149 */
131 V4L2_IDENT_SAA7113 = 103,
132 V4L2_IDENT_SAA7114 = 104,
133 V4L2_IDENT_SAA7115 = 105,
134 V4L2_IDENT_SAA7118 = 108,
135
136 /* module saa7127: reserved range 150-199 */
137 V4L2_IDENT_SAA7127 = 157,
138 V4L2_IDENT_SAA7129 = 159,
139
140 /* module cx25840: reserved range 200-249 */
141 V4L2_IDENT_CX25836 = 236,
142 V4L2_IDENT_CX25837 = 237,
143 V4L2_IDENT_CX25840 = 240,
144 V4L2_IDENT_CX25841 = 241,
145 V4L2_IDENT_CX25842 = 242,
146 V4L2_IDENT_CX25843 = 243,
147
148 /* OmniVision sensors - range 250-299 */
149 V4L2_IDENT_OV7670 = 250,
150};
151
152/* audio ioctls */ 119/* audio ioctls */
153 120
154/* v4l device was opened in Radio mode, to be replaced by VIDIOC_INT_S_TUNER_MODE */ 121/* v4l device was opened in Radio mode, to be replaced by VIDIOC_INT_S_TUNER_MODE */
@@ -175,9 +142,7 @@ enum v4l2_chip_ident {
175 Replacement of TUNER_SET_STANDBY. */ 142 Replacement of TUNER_SET_STANDBY. */
176#define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32) 143#define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32)
177 144
178/* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ 145/* 100, 101 used by VIDIOC_DBG_[SG]_REGISTER */
179#define VIDIOC_INT_S_REGISTER _IOW ('d', 100, struct v4l2_register)
180#define VIDIOC_INT_G_REGISTER _IOWR('d', 101, struct v4l2_register)
181 146
182/* Generic reset command. The argument selects which subsystems to reset. 147/* Generic reset command. The argument selects which subsystems to reset.
183 Passing 0 will always reset the whole chip. */ 148 Passing 0 will always reset the whole chip. */
@@ -212,10 +177,6 @@ enum v4l2_chip_ident {
212 whether CC data from the first or second field should be obtained). */ 177 whether CC data from the first or second field should be obtained). */
213#define VIDIOC_INT_G_VBI_DATA _IOWR('d', 106, struct v4l2_sliced_vbi_data) 178#define VIDIOC_INT_G_VBI_DATA _IOWR('d', 106, struct v4l2_sliced_vbi_data)
214 179
215/* Returns the chip identifier or V4L2_IDENT_UNKNOWN if no identification can
216 be made. */
217#define VIDIOC_INT_G_CHIP_IDENT _IOR ('d', 107, enum v4l2_chip_ident)
218
219/* Sets I2S speed in bps. This is used to provide a standard way to select I2S 180/* Sets I2S speed in bps. This is used to provide a standard way to select I2S
220 clock used by driving digital audio streams at some board designs. 181 clock used by driving digital audio streams at some board designs.
221 Usual values for the frequency are 1024000 and 2048000. 182 Usual values for the frequency are 1024000 and 2048000.
@@ -258,4 +219,12 @@ struct v4l2_crystal_freq {
258 default values. */ 219 default values. */
259#define VIDIOC_INT_INIT _IOW ('d', 114, u32) 220#define VIDIOC_INT_INIT _IOW ('d', 114, u32)
260 221
222/* Set v4l2_std_id for video OUTPUT devices. This is ignored by
223 video input devices. */
224#define VIDIOC_INT_S_STD_OUTPUT _IOW ('d', 115, v4l2_std_id)
225
226/* Get v4l2_std_id for video OUTPUT devices. This is ignored by
227 video input devices. */
228#define VIDIOC_INT_G_STD_OUTPUT _IOW ('d', 116, v4l2_std_id)
229
261#endif /* V4L2_COMMON_H_ */ 230#endif /* V4L2_COMMON_H_ */
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index fb96472a1bd3..d62847f846c2 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -127,6 +127,8 @@ struct video_device
127 struct v4l2_fmtdesc *f); 127 struct v4l2_fmtdesc *f);
128 int (*vidioc_enum_fmt_video_output)(struct file *file, void *fh, 128 int (*vidioc_enum_fmt_video_output)(struct file *file, void *fh,
129 struct v4l2_fmtdesc *f); 129 struct v4l2_fmtdesc *f);
130 int (*vidioc_enum_fmt_output_overlay) (struct file *file, void *fh,
131 struct v4l2_fmtdesc *f);
130 int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh, 132 int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh,
131 struct v4l2_fmtdesc *f); 133 struct v4l2_fmtdesc *f);
132 int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, 134 int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh,
@@ -145,6 +147,8 @@ struct video_device
145 struct v4l2_format *f); 147 struct v4l2_format *f);
146 int (*vidioc_g_fmt_video_output)(struct file *file, void *fh, 148 int (*vidioc_g_fmt_video_output)(struct file *file, void *fh,
147 struct v4l2_format *f); 149 struct v4l2_format *f);
150 int (*vidioc_g_fmt_output_overlay) (struct file *file, void *fh,
151 struct v4l2_format *f);
148 int (*vidioc_g_fmt_type_private)(struct file *file, void *fh, 152 int (*vidioc_g_fmt_type_private)(struct file *file, void *fh,
149 struct v4l2_format *f); 153 struct v4l2_format *f);
150 154
@@ -162,6 +166,8 @@ struct video_device
162 struct v4l2_format *f); 166 struct v4l2_format *f);
163 int (*vidioc_s_fmt_video_output)(struct file *file, void *fh, 167 int (*vidioc_s_fmt_video_output)(struct file *file, void *fh,
164 struct v4l2_format *f); 168 struct v4l2_format *f);
169 int (*vidioc_s_fmt_output_overlay) (struct file *file, void *fh,
170 struct v4l2_format *f);
165 int (*vidioc_s_fmt_type_private)(struct file *file, void *fh, 171 int (*vidioc_s_fmt_type_private)(struct file *file, void *fh,
166 struct v4l2_format *f); 172 struct v4l2_format *f);
167 173
@@ -178,6 +184,8 @@ struct video_device
178 struct v4l2_format *f); 184 struct v4l2_format *f);
179 int (*vidioc_try_fmt_video_output)(struct file *file, void *fh, 185 int (*vidioc_try_fmt_video_output)(struct file *file, void *fh,
180 struct v4l2_format *f); 186 struct v4l2_format *f);
187 int (*vidioc_try_fmt_output_overlay)(struct file *file, void *fh,
188 struct v4l2_format *f);
181 int (*vidioc_try_fmt_type_private)(struct file *file, void *fh, 189 int (*vidioc_try_fmt_type_private)(struct file *file, void *fh,
182 struct v4l2_format *f); 190 struct v4l2_format *f);
183 191
@@ -271,6 +279,12 @@ struct video_device
271 struct v4l2_jpegcompression *a); 279 struct v4l2_jpegcompression *a);
272 int (*vidioc_s_jpegcomp) (struct file *file, void *fh, 280 int (*vidioc_s_jpegcomp) (struct file *file, void *fh,
273 struct v4l2_jpegcompression *a); 281 struct v4l2_jpegcompression *a);
282 int (*vidioc_g_enc_index) (struct file *file, void *fh,
283 struct v4l2_enc_idx *a);
284 int (*vidioc_encoder_cmd) (struct file *file, void *fh,
285 struct v4l2_encoder_cmd *a);
286 int (*vidioc_try_encoder_cmd) (struct file *file, void *fh,
287 struct v4l2_encoder_cmd *a);
274 288
275 /* Stream type-dependent parameter ioctls */ 289 /* Stream type-dependent parameter ioctls */
276 int (*vidioc_g_parm) (struct file *file, void *fh, 290 int (*vidioc_g_parm) (struct file *file, void *fh,
@@ -296,6 +310,17 @@ struct video_device
296 int (*vidioc_log_status) (struct file *file, void *fh); 310 int (*vidioc_log_status) (struct file *file, void *fh);
297 311
298 312
313 /* Debugging ioctls */
314#ifdef CONFIG_VIDEO_ADV_DEBUG
315 int (*vidioc_g_register) (struct file *file, void *fh,
316 struct v4l2_register *reg);
317 int (*vidioc_s_register) (struct file *file, void *fh,
318 struct v4l2_register *reg);
319#endif
320 int (*vidioc_g_chip_ident) (struct file *file, void *fh,
321 struct v4l2_chip_ident *chip);
322
323
299#ifdef OBSOLETE_OWNER /* to be removed soon */ 324#ifdef OBSOLETE_OWNER /* to be removed soon */
300/* obsolete -- fops->owner is used instead */ 325/* obsolete -- fops->owner is used instead */
301struct module *owner; 326struct module *owner;
diff --git a/include/media/video-buf.h b/include/media/video-buf.h
index 1115a256969f..d6f079476db3 100644
--- a/include/media/video-buf.h
+++ b/include/media/video-buf.h
@@ -78,6 +78,9 @@ struct videobuf_dmabuf {
78 /* for kernel buffers */ 78 /* for kernel buffers */
79 void *vmalloc; 79 void *vmalloc;
80 80
81 /* Stores the userspace pointer to vmalloc area */
82 void *varea;
83
81 /* for overlay buffers (pci-pci dma) */ 84 /* for overlay buffers (pci-pci dma) */
82 dma_addr_t bus_addr; 85 dma_addr_t bus_addr;
83 86