aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/v4l2-common.h')
-rw-r--r--include/media/v4l2-common.h62
1 files changed, 52 insertions, 10 deletions
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index d4030a7e16e0..2360453e7496 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,12 +119,15 @@ enum v4l2_chip_ident {
115}; 119};
116 120
117/* audio ioctls */ 121/* audio ioctls */
118/* v4l device was opened in Radio mode */ 122
123/* v4l device was opened in Radio mode, to be replaced by VIDIOC_INT_S_TUNER_MODE */
119#define AUDC_SET_RADIO _IO('d',88) 124#define AUDC_SET_RADIO _IO('d',88)
120/* select from TV,radio,extern,MUTE */ 125
126/* select from TV,radio,extern,MUTE, to be replaced with VIDIOC_INT_S_AUDIO_ROUTING */
121#define AUDC_SET_INPUT _IOW('d',89,int) 127#define AUDC_SET_INPUT _IOW('d',89,int)
122 128
123/* msp3400 ioctl: will be removed in the near future */ 129/* msp3400 ioctl: will be removed in the near future, to be replaced by
130 VIDIOC_INT_S_AUDIO_ROUTING. */
124struct msp_matrix { 131struct msp_matrix {
125 int input; 132 int input;
126 int output; 133 int output;
@@ -128,12 +135,25 @@ struct msp_matrix {
128#define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix) 135#define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix)
129 136
130/* tuner ioctls */ 137/* tuner ioctls */
138
131/* Sets tuner type and its I2C addr */ 139/* Sets tuner type and its I2C addr */
132#define TUNER_SET_TYPE_ADDR _IOW('d',90,int) 140#define TUNER_SET_TYPE_ADDR _IOW('d', 90, int)
133/* Puts tuner on powersaving state, disabling it, except for i2c */ 141
134#define TUNER_SET_STANDBY _IOW('d',91,int) 142/* Puts tuner on powersaving state, disabling it, except for i2c. To be replaced
143 by VIDIOC_INT_S_STANDBY. */
144#define TUNER_SET_STANDBY _IOW('d', 91, int)
145
135/* Sets tda9887 specific stuff, like port1, port2 and qss */ 146/* Sets tda9887 specific stuff, like port1, port2 and qss */
136#define TDA9887_SET_CONFIG _IOW('d',92,int) 147#define TDA9887_SET_CONFIG _IOW('d', 92, int)
148
149/* Switch the tuner to a specific tuner mode. Replacement of AUDC_SET_RADIO */
150#define VIDIOC_INT_S_TUNER_MODE _IOW('d', 93, enum v4l2_tuner_type)
151
152/* Generic standby command. Passing -1 (all bits set to 1) will put the whole
153 chip into standby mode, value 0 will make the chip fully active. Specific
154 bits can be used by certain chips to enable/disable specific subsystems.
155 Replacement of TUNER_SET_STANDBY. */
156#define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32)
137 157
138/* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ 158/* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */
139#define VIDIOC_INT_S_REGISTER _IOR ('d', 100, struct v4l2_register) 159#define VIDIOC_INT_S_REGISTER _IOR ('d', 100, struct v4l2_register)
@@ -160,7 +180,8 @@ struct msp_matrix {
160 180
161/* Used to generate VBI signals on a video signal. v4l2_sliced_vbi_data is 181/* 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 182 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. */ 183 the line field to 0, then that VBI signal is disabled. If no
184 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) 185#define VIDIOC_INT_S_VBI_DATA _IOW ('d', 105, struct v4l2_sliced_vbi_data)
165 186
166/* Used to obtain the sliced VBI packet from a readback register. Not all 187/* Used to obtain the sliced VBI packet from a readback register. Not all
@@ -168,11 +189,11 @@ struct msp_matrix {
168 register contains invalid or erroneous data -EIO is returned. Note that 189 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 190 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). */ 191 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 *) 192#define VIDIOC_INT_G_VBI_DATA _IOWR('d', 106, struct v4l2_sliced_vbi_data)
172 193
173/* Returns the chip identifier or V4L2_IDENT_UNKNOWN if no identification can 194/* Returns the chip identifier or V4L2_IDENT_UNKNOWN if no identification can
174 be made. */ 195 be made. */
175#define VIDIOC_INT_G_CHIP_IDENT _IOR ('d', 107, enum v4l2_chip_ident *) 196#define VIDIOC_INT_G_CHIP_IDENT _IOR ('d', 107, enum v4l2_chip_ident)
176 197
177/* Sets I2S speed in bps. This is used to provide a standard way to select I2S 198/* 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. 199 clock used by driving digital audio streams at some board designs.
@@ -180,4 +201,25 @@ struct msp_matrix {
180 If the frequency is not supported, then -EINVAL is returned. */ 201 If the frequency is not supported, then -EINVAL is returned. */
181#define VIDIOC_INT_I2S_CLOCK_FREQ _IOW ('d', 108, u32) 202#define VIDIOC_INT_I2S_CLOCK_FREQ _IOW ('d', 108, u32)
182 203
204/* Routing definition, device dependent. It specifies which inputs (if any)
205 should be routed to which outputs (if any). */
206struct v4l2_routing {
207 u32 input;
208 u32 output;
209};
210
211/* These internal commands should be used to define the inputs and outputs
212 of an audio/video chip. They will replace AUDC_SET_INPUT.
213 The v4l2 API commands VIDIOC_S/G_INPUT, VIDIOC_S/G_OUTPUT,
214 VIDIOC_S/G_AUDIO and VIDIOC_S/G_AUDOUT are meant to be used by the
215 user. Internally these commands should be used to switch inputs/outputs
216 because only the driver knows how to map a 'Television' input to the precise
217 input/output routing of an A/D converter, or a DSP, or a video digitizer.
218 These four commands should only be sent directly to an i2c device, they
219 should not be broadcast as the routing is very device specific. */
220#define VIDIOC_INT_S_AUDIO_ROUTING _IOW ('d', 109, struct v4l2_routing)
221#define VIDIOC_INT_G_AUDIO_ROUTING _IOR ('d', 110, struct v4l2_routing)
222#define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing)
223#define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing)
224
183#endif /* V4L2_COMMON_H_ */ 225#endif /* V4L2_COMMON_H_ */