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.h65
1 files changed, 48 insertions, 17 deletions
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_ */