diff options
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/v4l2-common.h | 51 |
1 files changed, 44 insertions, 7 deletions
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 11728daf0096..234e9cf7e844 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
@@ -115,12 +115,15 @@ enum v4l2_chip_ident { | |||
115 | }; | 115 | }; |
116 | 116 | ||
117 | /* audio ioctls */ | 117 | /* audio ioctls */ |
118 | /* v4l device was opened in Radio mode */ | 118 | |
119 | /* v4l device was opened in Radio mode, to be replaced by VIDIOC_INT_S_TUNER_MODE */ | ||
119 | #define AUDC_SET_RADIO _IO('d',88) | 120 | #define AUDC_SET_RADIO _IO('d',88) |
120 | /* select from TV,radio,extern,MUTE */ | 121 | |
122 | /* select from TV,radio,extern,MUTE, to be replaced with VIDIOC_INT_S_AUDIO_ROUTING */ | ||
121 | #define AUDC_SET_INPUT _IOW('d',89,int) | 123 | #define AUDC_SET_INPUT _IOW('d',89,int) |
122 | 124 | ||
123 | /* msp3400 ioctl: will be removed in the near future */ | 125 | /* msp3400 ioctl: will be removed in the near future, to be replaced by |
126 | VIDIOC_INT_S_AUDIO_ROUTING. */ | ||
124 | struct msp_matrix { | 127 | struct msp_matrix { |
125 | int input; | 128 | int input; |
126 | int output; | 129 | int output; |
@@ -128,12 +131,25 @@ struct msp_matrix { | |||
128 | #define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix) | 131 | #define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix) |
129 | 132 | ||
130 | /* tuner ioctls */ | 133 | /* tuner ioctls */ |
134 | |||
131 | /* Sets tuner type and its I2C addr */ | 135 | /* Sets tuner type and its I2C addr */ |
132 | #define TUNER_SET_TYPE_ADDR _IOW('d',90,int) | 136 | #define TUNER_SET_TYPE_ADDR _IOW('d', 90, int) |
133 | /* Puts tuner on powersaving state, disabling it, except for i2c */ | 137 | |
134 | #define TUNER_SET_STANDBY _IOW('d',91,int) | 138 | /* Puts tuner on powersaving state, disabling it, except for i2c. To be replaced |
139 | by VIDIOC_INT_S_STANDBY. */ | ||
140 | #define TUNER_SET_STANDBY _IOW('d', 91, int) | ||
141 | |||
135 | /* Sets tda9887 specific stuff, like port1, port2 and qss */ | 142 | /* Sets tda9887 specific stuff, like port1, port2 and qss */ |
136 | #define TDA9887_SET_CONFIG _IOW('d',92,int) | 143 | #define TDA9887_SET_CONFIG _IOW('d', 92, int) |
144 | |||
145 | /* Switch the tuner to a specific tuner mode. Replacement of AUDC_SET_RADIO */ | ||
146 | #define VIDIOC_INT_S_TUNER_MODE _IOW('d', 93, enum v4l2_tuner_type) | ||
147 | |||
148 | /* Generic standby command. Passing -1 (all bits set to 1) will put the whole | ||
149 | chip into standby mode, value 0 will make the chip fully active. Specific | ||
150 | bits can be used by certain chips to enable/disable specific subsystems. | ||
151 | Replacement of TUNER_SET_STANDBY. */ | ||
152 | #define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32) | ||
137 | 153 | ||
138 | /* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ | 154 | /* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ |
139 | #define VIDIOC_INT_S_REGISTER _IOR ('d', 100, struct v4l2_register) | 155 | #define VIDIOC_INT_S_REGISTER _IOR ('d', 100, struct v4l2_register) |
@@ -181,4 +197,25 @@ struct msp_matrix { | |||
181 | If the frequency is not supported, then -EINVAL is returned. */ | 197 | If the frequency is not supported, then -EINVAL is returned. */ |
182 | #define VIDIOC_INT_I2S_CLOCK_FREQ _IOW ('d', 108, u32) | 198 | #define VIDIOC_INT_I2S_CLOCK_FREQ _IOW ('d', 108, u32) |
183 | 199 | ||
200 | /* Routing definition, device dependent. It specifies which inputs (if any) | ||
201 | should be routed to which outputs (if any). */ | ||
202 | struct v4l2_routing { | ||
203 | u32 input; | ||
204 | u32 output; | ||
205 | }; | ||
206 | |||
207 | /* These internal commands should be used to define the inputs and outputs | ||
208 | of an audio/video chip. They will replace AUDC_SET_INPUT. | ||
209 | The v4l2 API commands VIDIOC_S/G_INPUT, VIDIOC_S/G_OUTPUT, | ||
210 | VIDIOC_S/G_AUDIO and VIDIOC_S/G_AUDOUT are meant to be used by the | ||
211 | user. Internally these commands should be used to switch inputs/outputs | ||
212 | because only the driver knows how to map a 'Television' input to the precise | ||
213 | input/output routing of an A/D converter, or a DSP, or a video digitizer. | ||
214 | These four commands should only be sent directly to an i2c device, they | ||
215 | should not be broadcast as the routing is very device specific. */ | ||
216 | #define VIDIOC_INT_S_AUDIO_ROUTING _IOW ('d', 109, struct v4l2_routing) | ||
217 | #define VIDIOC_INT_G_AUDIO_ROUTING _IOR ('d', 110, struct v4l2_routing *) | ||
218 | #define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing) | ||
219 | #define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing *) | ||
220 | |||
184 | #endif /* V4L2_COMMON_H_ */ | 221 | #endif /* V4L2_COMMON_H_ */ |