aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-04-02 00:08:05 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-04-02 00:08:05 -0500
commit95d465fd750897ab32462a6702fbfe1b122cbbc0 (patch)
tree65c38b2f11c51bb6932e44dd6c92f15b0091abfe /include/media
parent642fde17dceceb56c7ba2762733ac688666ae657 (diff)
parent683aa4012f53b2ada0f430487e05d37b0d94e90a (diff)
Manual merge with Linus.
Conflicts: arch/powerpc/kernel/setup-common.c drivers/input/keyboard/hil_kbd.c drivers/input/mouse/hil_ptr.c
Diffstat (limited to 'include/media')
-rw-r--r--include/media/audiochip.h14
-rw-r--r--include/media/cs53l32a.h34
-rw-r--r--include/media/i2c-addr.h44
-rw-r--r--include/media/ir-common.h40
-rw-r--r--include/media/msp3400.h226
-rw-r--r--include/media/rds.h44
-rw-r--r--include/media/saa7146.h21
-rw-r--r--include/media/saa7146_vv.h3
-rw-r--r--include/media/tuner-types.h3
-rw-r--r--include/media/tuner.h6
-rw-r--r--include/media/tvaudio.h30
-rw-r--r--include/media/v4l2-common.h65
-rw-r--r--include/media/video-buf-dvb.h2
-rw-r--r--include/media/video-buf.h58
-rw-r--r--include/media/wm8775.h35
15 files changed, 558 insertions, 67 deletions
diff --git a/include/media/audiochip.h b/include/media/audiochip.h
index 295d256ee811..1fd4a2207574 100644
--- a/include/media/audiochip.h
+++ b/include/media/audiochip.h
@@ -21,18 +21,4 @@ enum audiochip {
21 AUDIO_CHIP_MSP34XX 21 AUDIO_CHIP_MSP34XX
22}; 22};
23 23
24/* ---------------------------------------------------------------------- */
25
26/* audio inputs */
27#define AUDIO_TUNER 0x00
28#define AUDIO_RADIO 0x01
29#define AUDIO_EXTERN 0x02
30#define AUDIO_INTERN 0x03
31#define AUDIO_OFF 0x04
32#define AUDIO_ON 0x05
33#define AUDIO_EXTERN_1 AUDIO_EXTERN
34#define AUDIO_EXTERN_2 0x06
35#define AUDIO_MUTE 0x80
36#define AUDIO_UNMUTE 0x81
37
38#endif /* AUDIOCHIP_H */ 24#endif /* AUDIOCHIP_H */
diff --git a/include/media/cs53l32a.h b/include/media/cs53l32a.h
new file mode 100644
index 000000000000..bf76197d3790
--- /dev/null
+++ b/include/media/cs53l32a.h
@@ -0,0 +1,34 @@
1/*
2 cs53l32a.h - definition for cs53l32a inputs and outputs
3
4 Copyright (C) 2006 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., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/
20
21#ifndef _CS53L32A_H_
22#define _CS53L32A_H_
23
24/* There are 2 physical inputs, but the second input can be
25 placed in two modes, the first mode bypasses the PGA (gain),
26 the second goes through the PGA. Hence there are three
27 possible inputs to choose from. */
28
29/* CS53L32A HW inputs */
30#define CS53L32A_IN0 0
31#define CS53L32A_IN1 1
32#define CS53L32A_IN2 2
33
34#endif
diff --git a/include/media/i2c-addr.h b/include/media/i2c-addr.h
new file mode 100644
index 000000000000..e7ff44a35ca0
--- /dev/null
+++ b/include/media/i2c-addr.h
@@ -0,0 +1,44 @@
1/*
2 * V4L I2C address list
3 *
4 *
5 * Copyright (C) 2006 Mauro Carvalho Chehab <mchehab@infradead.org>
6 * Based on a previous mapping by
7 * Ralph Metzler (rjkm@thp.uni-koeln.de)
8 * Gerd Knorr <kraxel@goldbach.in-berlin.de>
9 *
10 */
11
12/* bttv address list */
13#define I2C_ADDR_TSA5522 0xc2
14#define I2C_ADDR_TDA7432 0x8a
15#define I2C_ADDR_BT832_ALT1 0x88
16#define I2C_ADDR_BT832_ALT2 0x8a // alternate setting
17#define I2C_ADDR_TDA8425 0x82
18#define I2C_ADDR_TDA9840 0x84
19#define I2C_ADDR_TDA9850 0xb6 /* also used by 9855,9873 */
20#define I2C_ADDR_TDA9874 0xb0 /* also used by 9875 */
21#define I2C_ADDR_TDA9875 0xb0
22#define I2C_ADDR_HAUPEE 0xa0
23#define I2C_ADDR_STBEE 0xae
24#define I2C_ADDR_VHX 0xc0
25#define I2C_ADDR_MSP3400 0x80
26#define I2C_ADDR_MSP3400_ALT 0x88
27#define I2C_ADDR_TEA6300 0x80 /* also used by 6320 */
28#define I2C_ADDR_DPL3518 0x84
29#define I2C_ADDR_TDA9887 0x86
30
31/*
32 * i2c bus addresses for the chips supported by tvaudio.c
33 */
34
35#define I2C_ADDR_TDA8425 0x82
36#define I2C_ADDR_TDA9840 0x84 /* also used by TA8874Z */
37#define I2C_ADDR_TDA985x_L 0xb4 /* also used by 9873 */
38#define I2C_ADDR_TDA985x_H 0xb6
39#define I2C_ADDR_TDA9874 0xb0 /* also used by 9875 */
40
41#define I2C_ADDR_TEA6300 0x80 /* also used by 6320 */
42#define I2C_ADDR_TEA6420 0x98
43
44#define I2C_ADDR_PIC16C54 0x96 /* PV951 */
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index ad3e9bb670c3..302d5b3946e7 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -47,13 +47,6 @@ struct ir_input_state {
47 int keypressed; /* current state */ 47 int keypressed; /* current state */
48}; 48};
49 49
50extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE];
51extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE];
52extern IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE];
53extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE];
54extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE];
55extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE];
56
57void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, 50void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
58 int ir_type, IR_KEYTAB_TYPE *ir_codes); 51 int ir_type, IR_KEYTAB_TYPE *ir_codes);
59void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); 52void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir);
@@ -64,6 +57,39 @@ int ir_dump_samples(u32 *samples, int count);
64int ir_decode_biphase(u32 *samples, int count, int low, int high); 57int ir_decode_biphase(u32 *samples, int count, int low, int high);
65int ir_decode_pulsedistance(u32 *samples, int count, int low, int high); 58int ir_decode_pulsedistance(u32 *samples, int count, int low, int high);
66 59
60/* Keymaps to be used by other modules */
61
62extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE];
63extern IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE];
64extern IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE];
65extern IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE];
66extern IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE];
67extern IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE];
68extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvb_t[IR_KEYTAB_SIZE];
69extern IR_KEYTAB_TYPE ir_codes_iodata_bctv7e[IR_KEYTAB_SIZE];
70extern IR_KEYTAB_TYPE ir_codes_adstech_dvb_t_pci[IR_KEYTAB_SIZE];
71extern IR_KEYTAB_TYPE ir_codes_msi_tvanywhere[IR_KEYTAB_SIZE];
72extern IR_KEYTAB_TYPE ir_codes_cinergy_1400[IR_KEYTAB_SIZE];
73extern IR_KEYTAB_TYPE ir_codes_avertv_303[IR_KEYTAB_SIZE];
74extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvbt_pro[IR_KEYTAB_SIZE];
75extern IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE];
76extern IR_KEYTAB_TYPE ir_codes_em_pinnacle_usb[IR_KEYTAB_SIZE];
77extern IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE];
78extern IR_KEYTAB_TYPE ir_codes_flydvb[IR_KEYTAB_SIZE];
79extern IR_KEYTAB_TYPE ir_codes_cinergy[IR_KEYTAB_SIZE];
80extern IR_KEYTAB_TYPE ir_codes_eztv[IR_KEYTAB_SIZE];
81extern IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE];
82extern IR_KEYTAB_TYPE ir_codes_videomate_tv_pvr[IR_KEYTAB_SIZE];
83extern IR_KEYTAB_TYPE ir_codes_manli[IR_KEYTAB_SIZE];
84extern IR_KEYTAB_TYPE ir_codes_gotview7135[IR_KEYTAB_SIZE];
85extern IR_KEYTAB_TYPE ir_codes_purpletv[IR_KEYTAB_SIZE];
86extern IR_KEYTAB_TYPE ir_codes_pctv_sedna[IR_KEYTAB_SIZE];
87extern IR_KEYTAB_TYPE ir_codes_pv951[IR_KEYTAB_SIZE];
88extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE];
89extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE];
90extern IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE];
91extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE];
92
67#endif 93#endif
68 94
69/* 95/*
diff --git a/include/media/msp3400.h b/include/media/msp3400.h
new file mode 100644
index 000000000000..0be61a021d45
--- /dev/null
+++ b/include/media/msp3400.h
@@ -0,0 +1,226 @@
1/*
2 msp3400.h - definition for msp3400 inputs and outputs
3
4 Copyright (C) 2006 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., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/
20
21#ifndef _MSP3400_H_
22#define _MSP3400_H_
23
24/* msp3400 routing
25 ===============
26
27 The msp3400 has a complicated routing scheme with many possible
28 combinations. The details are all in the datasheets but I will try
29 to give a short description here.
30
31 Inputs
32 ======
33
34 There are 1) tuner inputs, 2) I2S inputs, 3) SCART inputs. You will have
35 to select which tuner input to use and which SCART input to use. The
36 selected tuner input, the selected SCART input and all I2S inputs go to
37 the DSP (the tuner input first goes through the demodulator).
38
39 The DSP handles things like volume, bass/treble, balance, and some chips
40 have support for surround sound. It has several outputs: MAIN, AUX, I2S
41 and SCART1/2. Each output can select which DSP input to use. So the MAIN
42 output can select the tuner input while at the same time the SCART1 output
43 uses the I2S input.
44
45 Outputs
46 =======
47
48 Most DSP outputs are also the outputs of the msp3400. However, the SCART
49 outputs of the msp3400 can select which input to use: either the SCART1 or
50 SCART2 output from the DSP, or the msp3400 SCART inputs, thus completely
51 bypassing the DSP.
52
53 Summary
54 =======
55
56 So to specify a complete routing scheme for the msp3400 you will have to
57 specify in the 'input' field of the v4l2_routing struct:
58
59 1) which tuner input to use
60 2) which SCART input to use
61 3) which DSP input to use for each DSP output
62
63 And in the 'output' field of the v4l2_routing struct you specify:
64
65 1) which SCART input to use for each SCART output
66
67 Depending on how the msp is wired to the other components you can
68 ignore or mute certain inputs or outputs.
69
70 Also, depending on the msp version only a subset of the inputs or
71 outputs may be present. At the end of this header some tables are
72 added containing a list of what is available for each msp version.
73 */
74
75/* Inputs to the DSP unit: two independent selections have to be made:
76 1) the tuner (SIF) input
77 2) the SCART input
78 Bits 0-2 are used for the SCART input select, bit 3 is used for the tuner
79 input, bits 4-7 are reserved.
80 */
81
82/* SCART input to DSP selection */
83#define MSP_IN_SCART_1 0 /* Pin SC1_IN */
84#define MSP_IN_SCART_2 1 /* Pin SC2_IN */
85#define MSP_IN_SCART_3 2 /* Pin SC3_IN */
86#define MSP_IN_SCART_4 3 /* Pin SC4_IN */
87#define MSP_IN_MONO 6 /* Pin MONO_IN */
88#define MSP_IN_MUTE 7 /* Mute DSP input */
89#define MSP_SCART_TO_DSP(in) (in)
90/* Tuner input to demodulator and DSP selection */
91#define MSP_IN_TUNER_1 0 /* Analog Sound IF input pin ANA_IN1 */
92#define MSP_IN_TUNER_2 1 /* Analog Sound IF input pin ANA_IN2 */
93#define MSP_TUNER_TO_DSP(in) ((in) << 3)
94
95/* The msp has up to 5 DSP outputs, each output can independently select
96 a DSP input.
97
98 The DSP outputs are: loudspeaker output (aka MAIN), headphones output
99 (aka AUX), SCART1 DA output, SCART2 DA output and an I2S output.
100 There also is a quasi-peak detector output, but that is not used by
101 this driver and is set to the same input as the loudspeaker output.
102 Not all outputs are supported by all msp models. Setting the input
103 of an unsupported output will be ignored by the driver.
104
105 There are up to 16 DSP inputs to choose from, so each output is
106 assigned 4 bits.
107
108 Note: the 44x8G can mix two inputs and feed the result back to the
109 DSP. This is currently not implemented. Also not implemented is the
110 multi-channel capable I2S3 input of the 44x0G. If someone can demonstrate
111 a need for one of those features then additional support can be added. */
112#define MSP_DSP_OUT_TUNER 0 /* Tuner output */
113#define MSP_DSP_OUT_SCART 2 /* SCART output */
114#define MSP_DSP_OUT_I2S1 5 /* I2S1 output */
115#define MSP_DSP_OUT_I2S2 6 /* I2S2 output */
116#define MSP_DSP_OUT_I2S3 7 /* I2S3 output */
117#define MSP_DSP_OUT_MAIN_AVC 11 /* MAIN AVC processed output */
118#define MSP_DSP_OUT_MAIN 12 /* MAIN output */
119#define MSP_DSP_OUT_AUX 13 /* AUX output */
120#define MSP_DSP_TO_MAIN(in) ((in) << 4)
121#define MSP_DSP_TO_AUX(in) ((in) << 8)
122#define MSP_DSP_TO_SCART1(in) ((in) << 12)
123#define MSP_DSP_TO_SCART2(in) ((in) << 16)
124#define MSP_DSP_TO_I2S(in) ((in) << 20)
125
126/* Output SCART select: the SCART outputs can select which input
127 to use. */
128#define MSP_OUT_SCART1 0 /* SCART1 input, bypassing the DSP */
129#define MSP_OUT_SCART2 1 /* SCART2 input, bypassing the DSP */
130#define MSP_OUT_SCART3 2 /* SCART3 input, bypassing the DSP */
131#define MSP_OUT_SCART4 3 /* SCART4 input, bypassing the DSP */
132#define MSP_OUT_SCART1_DA 4 /* DSP SCART1 output */
133#define MSP_OUT_SCART2_DA 5 /* DSP SCART2 output */
134#define MSP_OUT_MONO 6 /* MONO input, bypassing the DSP */
135#define MSP_OUT_MUTE 7 /* MUTE output */
136#define MSP_OUT_TO_SCART1(in) (in)
137#define MSP_OUT_TO_SCART2(in) ((in) << 4)
138
139/* Shortcut macros */
140#define MSP_INPUT(sc, t, main_aux_src, sc_i2s_src) \
141 (MSP_SCART_TO_DSP(sc) | \
142 MSP_TUNER_TO_DSP(t) | \
143 MSP_DSP_TO_MAIN(main_aux_src) | \
144 MSP_DSP_TO_AUX(main_aux_src) | \
145 MSP_DSP_TO_SCART1(sc_i2s_src) | \
146 MSP_DSP_TO_SCART2(sc_i2s_src) | \
147 MSP_DSP_TO_I2S(sc_i2s_src))
148#define MSP_INPUT_DEFAULT MSP_INPUT(MSP_IN_SCART_1, MSP_IN_TUNER_1, \
149 MSP_DSP_OUT_TUNER, MSP_DSP_OUT_TUNER)
150#define MSP_OUTPUT(sc) \
151 (MSP_OUT_TO_SCART1(sc) | \
152 MSP_OUT_TO_SCART2(sc))
153/* This equals the RESET position of the msp3400 ACB register */
154#define MSP_OUTPUT_DEFAULT (MSP_OUT_TO_SCART1(MSP_OUT_SCART3) | \
155 MSP_OUT_TO_SCART2(MSP_OUT_SCART1_DA))
156
157/* Tuner inputs vs. msp version */
158/* Chip TUNER_1 TUNER_2
159 -------------------------
160 msp34x0b y y
161 msp34x0c y y
162 msp34x0d y y
163 msp34x5d y n
164 msp34x7d y n
165 msp34x0g y y
166 msp34x1g y y
167 msp34x2g y y
168 msp34x5g y n
169 msp34x7g y n
170 msp44x0g y y
171 msp44x8g y y
172 */
173
174/* SCART inputs vs. msp version */
175/* Chip SC1 SC2 SC3 SC4
176 -------------------------
177 msp34x0b y y y n
178 msp34x0c y y y n
179 msp34x0d y y y y
180 msp34x5d y y n n
181 msp34x7d y n n n
182 msp34x0g y y y y
183 msp34x1g y y y y
184 msp34x2g y y y y
185 msp34x5g y y n n
186 msp34x7g y n n n
187 msp44x0g y y y y
188 msp44x8g y y y y
189 */
190
191/* DSP inputs vs. msp version (tuner and SCART inputs are always available) */
192/* Chip I2S1 I2S2 I2S3 MAIN_AVC MAIN AUX
193 ------------------------------------------
194 msp34x0b y n n n n n
195 msp34x0c y y n n n n
196 msp34x0d y y n n n n
197 msp34x5d y y n n n n
198 msp34x7d n n n n n n
199 msp34x0g y y n n n n
200 msp34x1g y y n n n n
201 msp34x2g y y n y y y
202 msp34x5g y y n n n n
203 msp34x7g n n n n n n
204 msp44x0g y y y y y y
205 msp44x8g y y y n n n
206 */
207
208/* DSP outputs vs. msp version */
209/* Chip MAIN AUX SCART1 SCART2 I2S
210 ------------------------------------
211 msp34x0b y y y n y
212 msp34x0c y y y n y
213 msp34x0d y y y y y
214 msp34x5d y n y n y
215 msp34x7d y n y n n
216 msp34x0g y y y y y
217 msp34x1g y y y y y
218 msp34x2g y y y y y
219 msp34x5g y n y n y
220 msp34x7g y n y n n
221 msp44x0g y y y y y
222 msp44x8g y y y y y
223 */
224
225#endif /* MSP3400_H */
226
diff --git a/include/media/rds.h b/include/media/rds.h
new file mode 100644
index 000000000000..951c1ae0be74
--- /dev/null
+++ b/include/media/rds.h
@@ -0,0 +1,44 @@
1/*
2
3 Types and defines needed for RDS. This is included by
4 saa6588.c and every driver (e.g. bttv-driver.c) that wants
5 to use the saa6588 module.
6
7 Instead of having a seperate rds.h, I'd prefer to include
8 this stuff in one of the already existing files like tuner.h
9
10 (c) 2005 by Hans J. Koch
11
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
16
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25
26*/
27
28#ifndef _RDS_H
29#define _RDS_H
30
31struct rds_command {
32 unsigned int block_count;
33 int result;
34 unsigned char __user *buffer;
35 struct file *instance;
36 poll_table *event_list;
37};
38
39#define RDS_CMD_OPEN _IOW('R',1,int)
40#define RDS_CMD_CLOSE _IOW('R',2,int)
41#define RDS_CMD_READ _IOR('R',3,int)
42#define RDS_CMD_POLL _IOR('R',4,int)
43
44#endif
diff --git a/include/media/saa7146.h b/include/media/saa7146.h
index 2bc634fcb7bb..fee579f10b32 100644
--- a/include/media/saa7146.h
+++ b/include/media/saa7146.h
@@ -11,6 +11,8 @@
11#include <linux/i2c.h> /* for i2c subsystem */ 11#include <linux/i2c.h> /* for i2c subsystem */
12#include <asm/io.h> /* for accessing devices */ 12#include <asm/io.h> /* for accessing devices */
13#include <linux/stringify.h> 13#include <linux/stringify.h>
14#include <linux/mutex.h>
15
14#include <linux/vmalloc.h> /* for vmalloc() */ 16#include <linux/vmalloc.h> /* for vmalloc() */
15#include <linux/mm.h> /* for vmalloc_to_page() */ 17#include <linux/mm.h> /* for vmalloc_to_page() */
16 18
@@ -112,7 +114,7 @@ struct saa7146_dev
112 114
113 /* different device locks */ 115 /* different device locks */
114 spinlock_t slock; 116 spinlock_t slock;
115 struct semaphore lock; 117 struct mutex lock;
116 118
117 unsigned char __iomem *mem; /* pointer to mapped IO memory */ 119 unsigned char __iomem *mem; /* pointer to mapped IO memory */
118 int revision; /* chip revision; needed for bug-workarounds*/ 120 int revision; /* chip revision; needed for bug-workarounds*/
@@ -133,15 +135,16 @@ struct saa7146_dev
133 void (*vv_callback)(struct saa7146_dev *dev, unsigned long status); 135 void (*vv_callback)(struct saa7146_dev *dev, unsigned long status);
134 136
135 /* i2c-stuff */ 137 /* i2c-stuff */
136 struct semaphore i2c_lock; 138 struct mutex i2c_lock;
137 u32 i2c_bitrate; 139
138 struct saa7146_dma d_i2c; /* pointer to i2c memory */ 140 u32 i2c_bitrate;
139 wait_queue_head_t i2c_wq; 141 struct saa7146_dma d_i2c; /* pointer to i2c memory */
140 int i2c_op; 142 wait_queue_head_t i2c_wq;
143 int i2c_op;
141 144
142 /* memories */ 145 /* memories */
143 struct saa7146_dma d_rps0; 146 struct saa7146_dma d_rps0;
144 struct saa7146_dma d_rps1; 147 struct saa7146_dma d_rps1;
145}; 148};
146 149
147/* from saa7146_i2c.c */ 150/* from saa7146_i2c.c */
@@ -150,7 +153,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg *msgs, in
150 153
151/* from saa7146_core.c */ 154/* from saa7146_core.c */
152extern struct list_head saa7146_devices; 155extern struct list_head saa7146_devices;
153extern struct semaphore saa7146_devices_lock; 156extern struct mutex saa7146_devices_lock;
154int saa7146_register_extension(struct saa7146_extension*); 157int saa7146_register_extension(struct saa7146_extension*);
155int saa7146_unregister_extension(struct saa7146_extension*); 158int saa7146_unregister_extension(struct saa7146_extension*);
156struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc); 159struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc);
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h
index e5e749e984ee..4507cb61ae93 100644
--- a/include/media/saa7146_vv.h
+++ b/include/media/saa7146_vv.h
@@ -197,7 +197,8 @@ void saa7146_buffer_finish(struct saa7146_dev *dev, struct saa7146_dmaqueue *q,
197void saa7146_buffer_next(struct saa7146_dev *dev, struct saa7146_dmaqueue *q,int vbi); 197void saa7146_buffer_next(struct saa7146_dev *dev, struct saa7146_dmaqueue *q,int vbi);
198int saa7146_buffer_queue(struct saa7146_dev *dev, struct saa7146_dmaqueue *q, struct saa7146_buf *buf); 198int saa7146_buffer_queue(struct saa7146_dev *dev, struct saa7146_dmaqueue *q, struct saa7146_buf *buf);
199void saa7146_buffer_timeout(unsigned long data); 199void saa7146_buffer_timeout(unsigned long data);
200void saa7146_dma_free(struct saa7146_dev *dev,struct saa7146_buf *buf); 200void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q,
201 struct saa7146_buf *buf);
201 202
202int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv); 203int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv);
203int saa7146_vv_release(struct saa7146_dev* dev); 204int saa7146_vv_release(struct saa7146_dev* dev);
diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h
index 15821ab14a9e..ad9c171bfa07 100644
--- a/include/media/tuner-types.h
+++ b/include/media/tuner-types.h
@@ -14,6 +14,7 @@ enum param_type {
14 14
15struct tuner_range { 15struct tuner_range {
16 unsigned short limit; 16 unsigned short limit;
17 unsigned char config;
17 unsigned char cb; 18 unsigned char cb;
18}; 19};
19 20
@@ -38,7 +39,6 @@ struct tuner_params {
38 * static unless the control byte was sent first. 39 * static unless the control byte was sent first.
39 */ 40 */
40 unsigned int cb_first_if_lower_freq:1; 41 unsigned int cb_first_if_lower_freq:1;
41 unsigned char config; /* to be moved into struct tuner_range for dvb-pll merge */
42 42
43 unsigned int count; 43 unsigned int count;
44 struct tuner_range *ranges; 44 struct tuner_range *ranges;
@@ -46,6 +46,7 @@ struct tuner_params {
46 46
47struct tunertype { 47struct tunertype {
48 char *name; 48 char *name;
49 unsigned int count;
49 struct tuner_params *params; 50 struct tuner_params *params;
50}; 51};
51 52
diff --git a/include/media/tuner.h b/include/media/tuner.h
index a5beeac495c7..017fed7d5e4d 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -110,12 +110,15 @@
110 110
111#define TUNER_LG_TDVS_H062F 64 /* DViCO FusionHDTV 5 */ 111#define TUNER_LG_TDVS_H062F 64 /* DViCO FusionHDTV 5 */
112#define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ 112#define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */
113#define TUNER_LG_NTSC_TALN_MINI 66 113#define TUNER_LG_TALN 66
114#define TUNER_PHILIPS_TD1316 67 114#define TUNER_PHILIPS_TD1316 67
115 115
116#define TUNER_PHILIPS_TUV1236D 68 /* ATI HDTV Wonder */ 116#define TUNER_PHILIPS_TUV1236D 68 /* ATI HDTV Wonder */
117#define TUNER_TNF_5335MF 69 /* Sabrent Bt848 */ 117#define TUNER_TNF_5335MF 69 /* Sabrent Bt848 */
118#define TUNER_SAMSUNG_TCPN_2121P30A 70 /* Hauppauge PVR-500MCE NTSC */ 118#define TUNER_SAMSUNG_TCPN_2121P30A 70 /* Hauppauge PVR-500MCE NTSC */
119#define TUNER_XCEIVE_XC3028 71
120
121#define TUNER_THOMSON_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */
119 122
120/* tv card specific */ 123/* tv card specific */
121#define TDA9887_PRESENT (1<<0) 124#define TDA9887_PRESENT (1<<0)
@@ -209,6 +212,7 @@ struct tuner {
209extern unsigned const int tuner_count; 212extern unsigned const int tuner_count;
210 213
211extern int microtune_init(struct i2c_client *c); 214extern int microtune_init(struct i2c_client *c);
215extern int xc3028_init(struct i2c_client *c);
212extern int tda8290_init(struct i2c_client *c); 216extern int tda8290_init(struct i2c_client *c);
213extern int tda8290_probe(struct i2c_client *c); 217extern int tda8290_probe(struct i2c_client *c);
214extern int tea5767_tuner_init(struct i2c_client *c); 218extern int tea5767_tuner_init(struct i2c_client *c);
diff --git a/include/media/tvaudio.h b/include/media/tvaudio.h
new file mode 100644
index 000000000000..6915aafc875a
--- /dev/null
+++ b/include/media/tvaudio.h
@@ -0,0 +1,30 @@
1/*
2 tvaudio.h - definition for tvaudio inputs
3
4 Copyright (C) 2006 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., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/
20
21#ifndef _TVAUDIO_H
22#define _TVAUDIO_H
23
24/* The tvaudio module accepts the following inputs: */
25#define TVAUDIO_INPUT_TUNER 0
26#define TVAUDIO_INPUT_RADIO 1
27#define TVAUDIO_INPUT_EXTERN 2
28#define TVAUDIO_INPUT_INTERN 3
29
30#endif
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index d4030a7e16e0..642520acdfa7 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -58,6 +58,9 @@
58/* Prints the ioctl in a human-readable format */ 58/* Prints the ioctl in a human-readable format */
59extern void v4l_printk_ioctl(unsigned int cmd); 59extern void v4l_printk_ioctl(unsigned int cmd);
60 60
61/* Prints the ioctl and arg in a human-readable format */
62extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg);
63
61/* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ 64/* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */
62#define v4l_print_ioctl(name, cmd) \ 65#define v4l_print_ioctl(name, cmd) \
63 do { \ 66 do { \
@@ -100,6 +103,7 @@ enum v4l2_chip_ident {
100 V4L2_IDENT_UNKNOWN = 0, 103 V4L2_IDENT_UNKNOWN = 0,
101 104
102 /* module saa7115: reserved range 100-149 */ 105 /* module saa7115: reserved range 100-149 */
106 V4L2_IDENT_SAA7113 = 103,
103 V4L2_IDENT_SAA7114 = 104, 107 V4L2_IDENT_SAA7114 = 104,
104 V4L2_IDENT_SAA7115 = 105, 108 V4L2_IDENT_SAA7115 = 105,
105 109
@@ -115,25 +119,30 @@ enum v4l2_chip_ident {
115}; 119};
116 120
117/* audio ioctls */ 121/* audio ioctls */
118/* v4l device was opened in Radio mode */
119#define AUDC_SET_RADIO _IO('d',88)
120/* select from TV,radio,extern,MUTE */
121#define AUDC_SET_INPUT _IOW('d',89,int)
122 122
123/* msp3400 ioctl: will be removed in the near future */ 123/* v4l device was opened in Radio mode, to be replaced by VIDIOC_INT_S_TUNER_MODE */
124struct msp_matrix { 124#define AUDC_SET_RADIO _IO('d',88)
125 int input;
126 int output;
127};
128#define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix)
129 125
130/* tuner ioctls */ 126/* tuner ioctls */
127
131/* Sets tuner type and its I2C addr */ 128/* Sets tuner type and its I2C addr */
132#define TUNER_SET_TYPE_ADDR _IOW('d',90,int) 129#define TUNER_SET_TYPE_ADDR _IOW('d', 90, int)
133/* Puts tuner on powersaving state, disabling it, except for i2c */ 130
134#define TUNER_SET_STANDBY _IOW('d',91,int) 131/* Puts tuner on powersaving state, disabling it, except for i2c. To be replaced
132 by VIDIOC_INT_S_STANDBY. */
133#define TUNER_SET_STANDBY _IOW('d', 91, int)
134
135/* Sets tda9887 specific stuff, like port1, port2 and qss */ 135/* Sets tda9887 specific stuff, like port1, port2 and qss */
136#define TDA9887_SET_CONFIG _IOW('d',92,int) 136#define TDA9887_SET_CONFIG _IOW('d', 92, int)
137
138/* Switch the tuner to a specific tuner mode. Replacement of AUDC_SET_RADIO */
139#define VIDIOC_INT_S_TUNER_MODE _IOW('d', 93, enum v4l2_tuner_type)
140
141/* Generic standby command. Passing -1 (all bits set to 1) will put the whole
142 chip into standby mode, value 0 will make the chip fully active. Specific
143 bits can be used by certain chips to enable/disable specific subsystems.
144 Replacement of TUNER_SET_STANDBY. */
145#define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32)
137 146
138/* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ 147/* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */
139#define VIDIOC_INT_S_REGISTER _IOR ('d', 100, struct v4l2_register) 148#define VIDIOC_INT_S_REGISTER _IOR ('d', 100, struct v4l2_register)
@@ -160,7 +169,8 @@ struct msp_matrix {
160 169
161/* Used to generate VBI signals on a video signal. v4l2_sliced_vbi_data is 170/* Used to generate VBI signals on a video signal. v4l2_sliced_vbi_data is
162 filled with the data packets that should be output. Note that if you set 171 filled with the data packets that should be output. Note that if you set
163 the line field to 0, then that VBI signal is disabled. */ 172 the line field to 0, then that VBI signal is disabled. If no
173 valid VBI data was found, then the type field is set to 0 on return. */
164#define VIDIOC_INT_S_VBI_DATA _IOW ('d', 105, struct v4l2_sliced_vbi_data) 174#define VIDIOC_INT_S_VBI_DATA _IOW ('d', 105, struct v4l2_sliced_vbi_data)
165 175
166/* Used to obtain the sliced VBI packet from a readback register. Not all 176/* Used to obtain the sliced VBI packet from a readback register. Not all
@@ -168,11 +178,11 @@ struct msp_matrix {
168 register contains invalid or erroneous data -EIO is returned. Note that 178 register contains invalid or erroneous data -EIO is returned. Note that
169 you must fill in the 'id' member and the 'field' member (to determine 179 you must fill in the 'id' member and the 'field' member (to determine
170 whether CC data from the first or second field should be obtained). */ 180 whether CC data from the first or second field should be obtained). */
171#define VIDIOC_INT_G_VBI_DATA _IOWR('d', 106, struct v4l2_sliced_vbi_data *) 181#define VIDIOC_INT_G_VBI_DATA _IOWR('d', 106, struct v4l2_sliced_vbi_data)
172 182
173/* Returns the chip identifier or V4L2_IDENT_UNKNOWN if no identification can 183/* Returns the chip identifier or V4L2_IDENT_UNKNOWN if no identification can
174 be made. */ 184 be made. */
175#define VIDIOC_INT_G_CHIP_IDENT _IOR ('d', 107, enum v4l2_chip_ident *) 185#define VIDIOC_INT_G_CHIP_IDENT _IOR ('d', 107, enum v4l2_chip_ident)
176 186
177/* Sets I2S speed in bps. This is used to provide a standard way to select I2S 187/* Sets I2S speed in bps. This is used to provide a standard way to select I2S
178 clock used by driving digital audio streams at some board designs. 188 clock used by driving digital audio streams at some board designs.
@@ -180,4 +190,25 @@ struct msp_matrix {
180 If the frequency is not supported, then -EINVAL is returned. */ 190 If the frequency is not supported, then -EINVAL is returned. */
181#define VIDIOC_INT_I2S_CLOCK_FREQ _IOW ('d', 108, u32) 191#define VIDIOC_INT_I2S_CLOCK_FREQ _IOW ('d', 108, u32)
182 192
193/* Routing definition, device dependent. It specifies which inputs (if any)
194 should be routed to which outputs (if any). */
195struct v4l2_routing {
196 u32 input;
197 u32 output;
198};
199
200/* These internal commands should be used to define the inputs and outputs
201 of an audio/video chip. They will replace the v4l2 API commands
202 VIDIOC_S/G_INPUT, VIDIOC_S/G_OUTPUT, VIDIOC_S/G_AUDIO and VIDIOC_S/G_AUDOUT
203 that are meant to be used by the user.
204 The internal commands should be used to switch inputs/outputs
205 because only the driver knows how to map a 'Television' input to the precise
206 input/output routing of an A/D converter, or a DSP, or a video digitizer.
207 These four commands should only be sent directly to an i2c device, they
208 should not be broadcast as the routing is very device specific. */
209#define VIDIOC_INT_S_AUDIO_ROUTING _IOW ('d', 109, struct v4l2_routing)
210#define VIDIOC_INT_G_AUDIO_ROUTING _IOR ('d', 110, struct v4l2_routing)
211#define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing)
212#define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing)
213
183#endif /* V4L2_COMMON_H_ */ 214#endif /* V4L2_COMMON_H_ */
diff --git a/include/media/video-buf-dvb.h b/include/media/video-buf-dvb.h
index ad0a07a3a895..b78d90fe629f 100644
--- a/include/media/video-buf-dvb.h
+++ b/include/media/video-buf-dvb.h
@@ -11,7 +11,7 @@ struct videobuf_dvb {
11 struct videobuf_queue dvbq; 11 struct videobuf_queue dvbq;
12 12
13 /* video-buf-dvb state info */ 13 /* video-buf-dvb state info */
14 struct semaphore lock; 14 struct mutex lock;
15 struct task_struct *thread; 15 struct task_struct *thread;
16 int nfeeds; 16 int nfeeds;
17 17
diff --git a/include/media/video-buf.h b/include/media/video-buf.h
index 8ecfd78e0027..fff3fd0fbf94 100644
--- a/include/media/video-buf.h
+++ b/include/media/video-buf.h
@@ -1,15 +1,20 @@
1/* 1/*
2 * 2 *
3 * generic helper functions for video4linux capture buffers, to handle 3 * generic helper functions for video4linux capture buffers, to handle
4 * memory management and PCI DMA. Right now bttv + saa7134 use it. 4 * memory management and PCI DMA.
5 * Right now, bttv, saa7134, saa7146 and cx88 use it.
5 * 6 *
6 * The functions expect the hardware being able to scatter gatter 7 * The functions expect the hardware being able to scatter gatter
7 * (i.e. the buffers are not linear in physical memory, but fragmented 8 * (i.e. the buffers are not linear in physical memory, but fragmented
8 * into PAGE_SIZE chunks). They also assume the driver does not need 9 * into PAGE_SIZE chunks). They also assume the driver does not need
9 * to touch the video data (thus it is probably not useful for USB as 10 * to touch the video data.
10 * data often must be uncompressed by the drivers). 11 *
12 * device specific map/unmap/sync stuff now are mapped as file operations
13 * to allow its usage by USB and virtual devices.
11 * 14 *
12 * (c) 2001,02 Gerd Knorr <kraxel@bytesex.org> 15 * (c) 2001,02 Gerd Knorr <kraxel@bytesex.org>
16 * (c) 2006 Mauro Carvalho Chehab, <mchehab@infradead.org>
17 * (c) 2006 Ted Walther and John Sokol
13 * 18 *
14 * This program is free software; you can redistribute it and/or modify 19 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by 20 * it under the terms of the GNU General Public License as published by
@@ -38,6 +43,9 @@ struct scatterlist* videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages);
38struct scatterlist* videobuf_pages_to_sg(struct page **pages, int nr_pages, 43struct scatterlist* videobuf_pages_to_sg(struct page **pages, int nr_pages,
39 int offset); 44 int offset);
40 45
46struct videobuf_buffer;
47struct videobuf_queue;
48
41/* --------------------------------------------------------------------- */ 49/* --------------------------------------------------------------------- */
42 50
43/* 51/*
@@ -49,7 +57,7 @@ struct scatterlist* videobuf_pages_to_sg(struct page **pages, int nr_pages,
49 * pointer + length. The kernel version just wants the size and 57 * pointer + length. The kernel version just wants the size and
50 * does memory allocation too using vmalloc_32(). 58 * does memory allocation too using vmalloc_32().
51 * 59 *
52 * videobuf_dma_pci_*() 60 * videobuf_dma_*()
53 * see Documentation/DMA-mapping.txt, these functions to 61 * see Documentation/DMA-mapping.txt, these functions to
54 * basically the same. The map function does also build a 62 * basically the same. The map function does also build a
55 * scatterlist for the buffer (and unmap frees it ...) 63 * scatterlist for the buffer (and unmap frees it ...)
@@ -86,12 +94,18 @@ int videobuf_dma_init_kernel(struct videobuf_dmabuf *dma, int direction,
86 int nr_pages); 94 int nr_pages);
87int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction, 95int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction,
88 dma_addr_t addr, int nr_pages); 96 dma_addr_t addr, int nr_pages);
89int videobuf_dma_pci_map(struct pci_dev *dev, struct videobuf_dmabuf *dma);
90int videobuf_dma_pci_sync(struct pci_dev *dev,
91 struct videobuf_dmabuf *dma);
92int videobuf_dma_pci_unmap(struct pci_dev *dev, struct videobuf_dmabuf *dma);
93int videobuf_dma_free(struct videobuf_dmabuf *dma); 97int videobuf_dma_free(struct videobuf_dmabuf *dma);
94 98
99int videobuf_dma_map(struct videobuf_queue* q,struct videobuf_dmabuf *dma);
100int videobuf_dma_sync(struct videobuf_queue* q,struct videobuf_dmabuf *dma);
101int videobuf_dma_unmap(struct videobuf_queue* q,struct videobuf_dmabuf *dma);
102
103 /*FIXME: these variants are used only on *-alsa code, where videobuf is
104 * used without queue
105 */
106int videobuf_pci_dma_map(struct pci_dev *pci,struct videobuf_dmabuf *dma);
107int videobuf_pci_dma_unmap(struct pci_dev *pci,struct videobuf_dmabuf *dma);
108
95/* --------------------------------------------------------------------- */ 109/* --------------------------------------------------------------------- */
96 110
97/* 111/*
@@ -115,9 +129,6 @@ int videobuf_dma_free(struct videobuf_dmabuf *dma);
115 * 129 *
116 */ 130 */
117 131
118struct videobuf_buffer;
119struct videobuf_queue;
120
121struct videobuf_mapping { 132struct videobuf_mapping {
122 unsigned int count; 133 unsigned int count;
123 unsigned long start; 134 unsigned long start;
@@ -164,6 +175,10 @@ struct videobuf_buffer {
164 struct timeval ts; 175 struct timeval ts;
165}; 176};
166 177
178typedef int (vb_map_sg_t)(void *dev,struct scatterlist *sglist,int nr_pages,
179 int direction);
180
181
167struct videobuf_queue_ops { 182struct videobuf_queue_ops {
168 int (*buf_setup)(struct videobuf_queue *q, 183 int (*buf_setup)(struct videobuf_queue *q,
169 unsigned int *count, unsigned int *size); 184 unsigned int *count, unsigned int *size);
@@ -174,12 +189,20 @@ struct videobuf_queue_ops {
174 struct videobuf_buffer *vb); 189 struct videobuf_buffer *vb);
175 void (*buf_release)(struct videobuf_queue *q, 190 void (*buf_release)(struct videobuf_queue *q,
176 struct videobuf_buffer *vb); 191 struct videobuf_buffer *vb);
192
193 /* Helper operations - device dependent.
194 * If null, videobuf_init defaults all to PCI handling
195 */
196
197 vb_map_sg_t *vb_map_sg;
198 vb_map_sg_t *vb_dma_sync_sg;
199 vb_map_sg_t *vb_unmap_sg;
177}; 200};
178 201
179struct videobuf_queue { 202struct videobuf_queue {
180 struct semaphore lock; 203 struct mutex lock;
181 spinlock_t *irqlock; 204 spinlock_t *irqlock;
182 struct pci_dev *pci; 205 void *dev; /* on pci, points to struct pci_dev */
183 206
184 enum v4l2_buf_type type; 207 enum v4l2_buf_type type;
185 unsigned int inputs; /* for V4L2_BUF_FLAG_INPUT */ 208 unsigned int inputs; /* for V4L2_BUF_FLAG_INPUT */
@@ -204,12 +227,15 @@ struct videobuf_queue {
204 227
205void* videobuf_alloc(unsigned int size); 228void* videobuf_alloc(unsigned int size);
206int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr); 229int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr);
207int videobuf_iolock(struct pci_dev *pci, struct videobuf_buffer *vb, 230int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb,
208 struct v4l2_framebuffer *fbuf); 231 struct v4l2_framebuffer *fbuf);
232
233/* Maps fops to PCI stuff */
234void videobuf_queue_pci(struct videobuf_queue* q);
209 235
210void videobuf_queue_init(struct videobuf_queue *q, 236void videobuf_queue_init(struct videobuf_queue *q,
211 struct videobuf_queue_ops *ops, 237 struct videobuf_queue_ops *ops,
212 struct pci_dev *pci, 238 void *dev,
213 spinlock_t *irqlock, 239 spinlock_t *irqlock,
214 enum v4l2_buf_type type, 240 enum v4l2_buf_type type,
215 enum v4l2_field field, 241 enum v4l2_field field,
diff --git a/include/media/wm8775.h b/include/media/wm8775.h
new file mode 100644
index 000000000000..60739c5a23ae
--- /dev/null
+++ b/include/media/wm8775.h
@@ -0,0 +1,35 @@
1/*
2 wm8775.h - definition for wm8775 inputs and outputs
3
4 Copyright (C) 2006 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., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/
20
21#ifndef _WM8775_H_
22#define _WM8775_H_
23
24/* The WM8775 has 4 inputs and one output. Zero or more inputs
25 are multiplexed together to the output. Hence there are
26 16 combinations.
27 If only one input is active (the normal case) then the
28 input values 1, 2, 4 or 8 should be used. */
29
30#define WM8775_AIN1 1
31#define WM8775_AIN2 2
32#define WM8775_AIN3 4
33#define WM8775_AIN4 8
34
35#endif