diff options
Diffstat (limited to 'include/media')
| -rw-r--r-- | include/media/cx2341x.h | 195 | ||||
| -rw-r--r-- | include/media/ir-common.h | 5 | ||||
| -rw-r--r-- | include/media/ir-kbd-i2c.h | 3 | ||||
| -rw-r--r-- | include/media/ovcamchip.h | 1 | ||||
| -rw-r--r-- | include/media/pwc-ioctl.h | 325 | ||||
| -rw-r--r-- | include/media/saa7115.h | 11 | ||||
| -rw-r--r-- | include/media/saa7146_vv.h | 2 | ||||
| -rw-r--r-- | include/media/tuner-types.h | 55 | ||||
| -rw-r--r-- | include/media/tuner.h | 13 | ||||
| -rw-r--r-- | include/media/tvp5150.h | 34 | ||||
| -rw-r--r-- | include/media/v4l2-common.h | 32 | ||||
| -rw-r--r-- | include/media/v4l2-dev.h | 378 | ||||
| -rw-r--r-- | include/media/video-buf-dvb.h | 3 | ||||
| -rw-r--r-- | include/media/video-buf.h | 1 |
14 files changed, 1051 insertions, 7 deletions
diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h new file mode 100644 index 000000000000..d91d88f93c8b --- /dev/null +++ b/include/media/cx2341x.h | |||
| @@ -0,0 +1,195 @@ | |||
| 1 | /* | ||
| 2 | cx23415/6 header containing common defines. | ||
| 3 | |||
| 4 | This program is free software; you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation; either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program; if not, write to the Free Software | ||
| 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef CX2341X_H | ||
| 20 | #define CX2341X_H | ||
| 21 | |||
| 22 | enum cx2341x_port { | ||
| 23 | CX2341X_PORT_MEMORY = 0, | ||
| 24 | CX2341X_PORT_STREAMING = 1, | ||
| 25 | CX2341X_PORT_SERIAL = 2 | ||
| 26 | }; | ||
| 27 | |||
| 28 | enum cx2341x_cap { | ||
| 29 | CX2341X_CAP_HAS_SLICED_VBI = 1 << 0, | ||
| 30 | }; | ||
| 31 | |||
| 32 | struct cx2341x_mpeg_params { | ||
| 33 | /* misc */ | ||
| 34 | u32 capabilities; | ||
| 35 | enum cx2341x_port port; | ||
| 36 | u16 width; | ||
| 37 | u16 height; | ||
| 38 | u16 is_50hz; | ||
| 39 | |||
| 40 | /* stream */ | ||
| 41 | enum v4l2_mpeg_stream_type stream_type; | ||
| 42 | enum v4l2_mpeg_stream_vbi_fmt stream_vbi_fmt; | ||
| 43 | |||
| 44 | /* audio */ | ||
| 45 | enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq; | ||
| 46 | enum v4l2_mpeg_audio_encoding audio_encoding; | ||
| 47 | enum v4l2_mpeg_audio_l2_bitrate audio_l2_bitrate; | ||
| 48 | enum v4l2_mpeg_audio_mode audio_mode; | ||
| 49 | enum v4l2_mpeg_audio_mode_extension audio_mode_extension; | ||
| 50 | enum v4l2_mpeg_audio_emphasis audio_emphasis; | ||
| 51 | enum v4l2_mpeg_audio_crc audio_crc; | ||
| 52 | u8 audio_properties; | ||
| 53 | |||
| 54 | /* video */ | ||
| 55 | enum v4l2_mpeg_video_encoding video_encoding; | ||
| 56 | enum v4l2_mpeg_video_aspect video_aspect; | ||
| 57 | u16 video_b_frames; | ||
| 58 | u16 video_gop_size; | ||
| 59 | u16 video_gop_closure; | ||
| 60 | u16 video_pulldown; | ||
| 61 | enum v4l2_mpeg_video_bitrate_mode video_bitrate_mode; | ||
| 62 | u32 video_bitrate; | ||
| 63 | u32 video_bitrate_peak; | ||
| 64 | u16 video_temporal_decimation; | ||
| 65 | |||
| 66 | /* encoding filters */ | ||
| 67 | enum v4l2_mpeg_cx2341x_video_spatial_filter_mode video_spatial_filter_mode; | ||
| 68 | u16 video_spatial_filter; | ||
| 69 | enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type video_luma_spatial_filter_type; | ||
| 70 | enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type video_chroma_spatial_filter_type; | ||
| 71 | enum v4l2_mpeg_cx2341x_video_temporal_filter_mode video_temporal_filter_mode; | ||
| 72 | u16 video_temporal_filter; | ||
| 73 | enum v4l2_mpeg_cx2341x_video_median_filter_type video_median_filter_type; | ||
| 74 | u16 video_luma_median_filter_top; | ||
| 75 | u16 video_luma_median_filter_bottom; | ||
| 76 | u16 video_chroma_median_filter_top; | ||
| 77 | u16 video_chroma_median_filter_bottom; | ||
| 78 | }; | ||
| 79 | |||
| 80 | #define CX2341X_MBOX_MAX_DATA 16 | ||
| 81 | |||
| 82 | extern const u32 cx2341x_mpeg_ctrls[]; | ||
| 83 | typedef int (*cx2341x_mbox_func)(void *priv, int cmd, int in, int out, | ||
| 84 | u32 data[CX2341X_MBOX_MAX_DATA]); | ||
| 85 | int cx2341x_update(void *priv, cx2341x_mbox_func func, | ||
| 86 | const struct cx2341x_mpeg_params *old, | ||
| 87 | const struct cx2341x_mpeg_params *new); | ||
| 88 | int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params, | ||
| 89 | struct v4l2_queryctrl *qctrl); | ||
| 90 | const char **cx2341x_ctrl_get_menu(u32 id); | ||
| 91 | int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, | ||
| 92 | struct v4l2_ext_controls *ctrls, unsigned int cmd); | ||
| 93 | void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p); | ||
| 94 | void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix); | ||
| 95 | |||
| 96 | /* Firmware names */ | ||
| 97 | #define CX2341X_FIRM_ENC_FILENAME "v4l-cx2341x-enc.fw" | ||
| 98 | /* Decoder firmware for the cx23415 only */ | ||
| 99 | #define CX2341X_FIRM_DEC_FILENAME "v4l-cx2341x-dec.fw" | ||
| 100 | |||
| 101 | /* Firmware API commands */ | ||
| 102 | |||
| 103 | /* MPEG decoder API, specific to the cx23415 */ | ||
| 104 | #define CX2341X_DEC_PING_FW 0x00 | ||
| 105 | #define CX2341X_DEC_START_PLAYBACK 0x01 | ||
| 106 | #define CX2341X_DEC_STOP_PLAYBACK 0x02 | ||
| 107 | #define CX2341X_DEC_SET_PLAYBACK_SPEED 0x03 | ||
| 108 | #define CX2341X_DEC_STEP_VIDEO 0x05 | ||
| 109 | #define CX2341X_DEC_SET_DMA_BLOCK_SIZE 0x08 | ||
| 110 | #define CX2341X_DEC_GET_XFER_INFO 0x09 | ||
| 111 | #define CX2341X_DEC_GET_DMA_STATUS 0x0a | ||
| 112 | #define CX2341X_DEC_SCHED_DMA_FROM_HOST 0x0b | ||
| 113 | #define CX2341X_DEC_PAUSE_PLAYBACK 0x0d | ||
| 114 | #define CX2341X_DEC_HALT_FW 0x0e | ||
| 115 | #define CX2341X_DEC_SET_STANDARD 0x10 | ||
| 116 | #define CX2341X_DEC_GET_VERSION 0x11 | ||
| 117 | #define CX2341X_DEC_SET_STREAM_INPUT 0x14 | ||
| 118 | #define CX2341X_DEC_GET_TIMING_INFO 0x15 | ||
| 119 | #define CX2341X_DEC_SET_AUDIO_MODE 0x16 | ||
| 120 | #define CX2341X_DEC_SET_EVENT_NOTIFICATION 0x17 | ||
| 121 | #define CX2341X_DEC_SET_DISPLAY_BUFFERS 0x18 | ||
| 122 | #define CX2341X_DEC_EXTRACT_VBI 0x19 | ||
| 123 | #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 | |||
| 128 | /* MPEG encoder API */ | ||
| 129 | #define CX2341X_ENC_PING_FW 0x80 | ||
| 130 | #define CX2341X_ENC_START_CAPTURE 0x81 | ||
| 131 | #define CX2341X_ENC_STOP_CAPTURE 0x82 | ||
| 132 | #define CX2341X_ENC_SET_AUDIO_ID 0x89 | ||
| 133 | #define CX2341X_ENC_SET_VIDEO_ID 0x8b | ||
| 134 | #define CX2341X_ENC_SET_PCR_ID 0x8d | ||
| 135 | #define CX2341X_ENC_SET_FRAME_RATE 0x8f | ||
| 136 | #define CX2341X_ENC_SET_FRAME_SIZE 0x91 | ||
| 137 | #define CX2341X_ENC_SET_BIT_RATE 0x95 | ||
| 138 | #define CX2341X_ENC_SET_GOP_PROPERTIES 0x97 | ||
| 139 | #define CX2341X_ENC_SET_ASPECT_RATIO 0x99 | ||
| 140 | #define CX2341X_ENC_SET_DNR_FILTER_MODE 0x9b | ||
| 141 | #define CX2341X_ENC_SET_DNR_FILTER_PROPS 0x9d | ||
| 142 | #define CX2341X_ENC_SET_CORING_LEVELS 0x9f | ||
| 143 | #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 | ||
| 146 | #define CX2341X_ENC_SET_STREAM_TYPE 0xb9 | ||
| 147 | #define CX2341X_ENC_SET_OUTPUT_PORT 0xbb | ||
| 148 | #define CX2341X_ENC_SET_AUDIO_PROPERTIES 0xbd | ||
| 149 | #define CX2341X_ENC_HALT_FW 0xc3 | ||
| 150 | #define CX2341X_ENC_GET_VERSION 0xc4 | ||
| 151 | #define CX2341X_ENC_SET_GOP_CLOSURE 0xc5 | ||
| 152 | #define CX2341X_ENC_GET_SEQ_END 0xc6 | ||
| 153 | #define CX2341X_ENC_SET_PGM_INDEX_INFO 0xc7 | ||
| 154 | #define CX2341X_ENC_SET_VBI_CONFIG 0xc8 | ||
| 155 | #define CX2341X_ENC_SET_DMA_BLOCK_SIZE 0xc9 | ||
| 156 | #define CX2341X_ENC_GET_PREV_DMA_INFO_MB_10 0xca | ||
| 157 | #define CX2341X_ENC_GET_PREV_DMA_INFO_MB_9 0xcb | ||
| 158 | #define CX2341X_ENC_SCHED_DMA_TO_HOST 0xcc | ||
| 159 | #define CX2341X_ENC_INITIALIZE_INPUT 0xcd | ||
| 160 | #define CX2341X_ENC_SET_FRAME_DROP_RATE 0xd0 | ||
| 161 | #define CX2341X_ENC_PAUSE_ENCODER 0xd2 | ||
| 162 | #define CX2341X_ENC_REFRESH_INPUT 0xd3 | ||
| 163 | #define CX2341X_ENC_SET_COPYRIGHT 0xd4 | ||
| 164 | #define CX2341X_ENC_SET_EVENT_NOTIFICATION 0xd5 | ||
| 165 | #define CX2341X_ENC_SET_NUM_VSYNC_LINES 0xd6 | ||
| 166 | #define CX2341X_ENC_SET_PLACEHOLDER 0xd7 | ||
| 167 | #define CX2341X_ENC_MUTE_VIDEO 0xd9 | ||
| 168 | #define CX2341X_ENC_MUTE_AUDIO 0xda | ||
| 169 | #define CX2341X_ENC_UNKNOWN 0xdb | ||
| 170 | #define CX2341X_ENC_MISC 0xdc | ||
| 171 | |||
| 172 | /* OSD API, specific to the cx23415 */ | ||
| 173 | #define CX2341X_OSD_GET_FRAMEBUFFER 0x41 | ||
| 174 | #define CX2341X_OSD_GET_PIXEL_FORMAT 0x42 | ||
| 175 | #define CX2341X_OSD_SET_PIXEL_FORMAT 0x43 | ||
| 176 | #define CX2341X_OSD_GET_STATE 0x44 | ||
| 177 | #define CX2341X_OSD_SET_STATE 0x45 | ||
| 178 | #define CX2341X_OSD_GET_OSD_COORDS 0x46 | ||
| 179 | #define CX2341X_OSD_SET_OSD_COORDS 0x47 | ||
| 180 | #define CX2341X_OSD_GET_SCREEN_COORDS 0x48 | ||
| 181 | #define CX2341X_OSD_SET_SCREEN_COORDS 0x49 | ||
| 182 | #define CX2341X_OSD_GET_GLOBAL_ALPHA 0x4a | ||
| 183 | #define CX2341X_OSD_SET_GLOBAL_ALPHA 0x4b | ||
| 184 | #define CX2341X_OSD_SET_BLEND_COORDS 0x4c | ||
| 185 | #define CX2341X_OSD_GET_FLICKER_STATE 0x4f | ||
| 186 | #define CX2341X_OSD_SET_FLICKER_STATE 0x50 | ||
| 187 | #define CX2341X_OSD_BLT_COPY 0x52 | ||
| 188 | #define CX2341X_OSD_BLT_FILL 0x53 | ||
| 189 | #define CX2341X_OSD_BLT_TEXT 0x54 | ||
| 190 | #define CX2341X_OSD_SET_FRAMEBUFFER_WINDOW 0x56 | ||
| 191 | #define CX2341X_OSD_SET_CHROMA_KEY 0x60 | ||
| 192 | #define CX2341X_OSD_GET_ALPHA_CONTENT_INDEX 0x61 | ||
| 193 | #define CX2341X_OSD_SET_ALPHA_CONTENT_INDEX 0x62 | ||
| 194 | |||
| 195 | #endif /* CX2341X_H */ | ||
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 302d5b3946e7..7bab09b0ed45 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
| @@ -73,7 +73,7 @@ extern IR_KEYTAB_TYPE ir_codes_cinergy_1400[IR_KEYTAB_SIZE]; | |||
| 73 | extern IR_KEYTAB_TYPE ir_codes_avertv_303[IR_KEYTAB_SIZE]; | 73 | extern IR_KEYTAB_TYPE ir_codes_avertv_303[IR_KEYTAB_SIZE]; |
| 74 | extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvbt_pro[IR_KEYTAB_SIZE]; | 74 | extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvbt_pro[IR_KEYTAB_SIZE]; |
| 75 | extern IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE]; | 75 | extern IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE]; |
| 76 | extern IR_KEYTAB_TYPE ir_codes_em_pinnacle_usb[IR_KEYTAB_SIZE]; | 76 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_grey[IR_KEYTAB_SIZE]; |
| 77 | extern IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE]; | 77 | extern IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE]; |
| 78 | extern IR_KEYTAB_TYPE ir_codes_flydvb[IR_KEYTAB_SIZE]; | 78 | extern IR_KEYTAB_TYPE ir_codes_flydvb[IR_KEYTAB_SIZE]; |
| 79 | extern IR_KEYTAB_TYPE ir_codes_cinergy[IR_KEYTAB_SIZE]; | 79 | extern IR_KEYTAB_TYPE ir_codes_cinergy[IR_KEYTAB_SIZE]; |
| @@ -87,8 +87,9 @@ extern IR_KEYTAB_TYPE ir_codes_pctv_sedna[IR_KEYTAB_SIZE]; | |||
| 87 | extern IR_KEYTAB_TYPE ir_codes_pv951[IR_KEYTAB_SIZE]; | 87 | extern IR_KEYTAB_TYPE ir_codes_pv951[IR_KEYTAB_SIZE]; |
| 88 | extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE]; | 88 | extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE]; |
| 89 | extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE]; | 89 | extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE]; |
| 90 | extern IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE]; | 90 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_color[IR_KEYTAB_SIZE]; |
| 91 | extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE]; | 91 | extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE]; |
| 92 | extern IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE]; | ||
| 92 | 93 | ||
| 93 | #endif | 94 | #endif |
| 94 | 95 | ||
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index 730f21ed91db..a455f7ce5ee8 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h | |||
| @@ -20,5 +20,6 @@ struct IR_i2c { | |||
| 20 | int (*get_key)(struct IR_i2c*, u32*, u32*); | 20 | int (*get_key)(struct IR_i2c*, u32*, u32*); |
| 21 | }; | 21 | }; |
| 22 | 22 | ||
| 23 | int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); | 23 | int get_key_pinnacle_grey(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); |
| 24 | int get_key_pinnacle_color(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); | ||
| 24 | #endif | 25 | #endif |
diff --git a/include/media/ovcamchip.h b/include/media/ovcamchip.h index 8138983adced..0f43451f8bb3 100644 --- a/include/media/ovcamchip.h +++ b/include/media/ovcamchip.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #define __LINUX_OVCAMCHIP_H | 15 | #define __LINUX_OVCAMCHIP_H |
| 16 | 16 | ||
| 17 | #include <linux/videodev.h> | 17 | #include <linux/videodev.h> |
| 18 | #include <media/v4l2-common.h> | ||
| 18 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
| 19 | 20 | ||
| 20 | /* --------------------------------- */ | 21 | /* --------------------------------- */ |
diff --git a/include/media/pwc-ioctl.h b/include/media/pwc-ioctl.h new file mode 100644 index 000000000000..adc1254e887e --- /dev/null +++ b/include/media/pwc-ioctl.h | |||
| @@ -0,0 +1,325 @@ | |||
| 1 | #ifndef PWC_IOCTL_H | ||
| 2 | #define PWC_IOCTL_H | ||
| 3 | |||
| 4 | /* (C) 2001-2004 Nemosoft Unv. | ||
| 5 | (C) 2004-2006 Luc Saillard (luc@saillard.org) | ||
| 6 | |||
| 7 | NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx | ||
| 8 | driver and thus may have bugs that are not present in the original version. | ||
| 9 | Please send bug reports and support requests to <luc@saillard.org>. | ||
| 10 | The decompression routines have been implemented by reverse-engineering the | ||
| 11 | Nemosoft binary pwcx module. Caveat emptor. | ||
| 12 | |||
| 13 | This program is free software; you can redistribute it and/or modify | ||
| 14 | it under the terms of the GNU General Public License as published by | ||
| 15 | the Free Software Foundation; either version 2 of the License, or | ||
| 16 | (at your option) any later version. | ||
| 17 | |||
| 18 | This program is distributed in the hope that it will be useful, | ||
| 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 21 | GNU General Public License for more details. | ||
| 22 | |||
| 23 | You should have received a copy of the GNU General Public License | ||
| 24 | along with this program; if not, write to the Free Software | ||
| 25 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 26 | */ | ||
| 27 | |||
| 28 | /* This is pwc-ioctl.h belonging to PWC 10.0.10 | ||
| 29 | It contains structures and defines to communicate from user space | ||
| 30 | directly to the driver. | ||
| 31 | */ | ||
| 32 | |||
| 33 | /* | ||
| 34 | Changes | ||
| 35 | 2001/08/03 Alvarado Added ioctl constants to access methods for | ||
| 36 | changing white balance and red/blue gains | ||
| 37 | 2002/12/15 G. H. Fernandez-Toribio VIDIOCGREALSIZE | ||
| 38 | 2003/12/13 Nemosft Unv. Some modifications to make interfacing to | ||
| 39 | PWCX easier | ||
| 40 | 2006/01/01 Luc Saillard Add raw format definition | ||
| 41 | */ | ||
| 42 | |||
| 43 | /* These are private ioctl() commands, specific for the Philips webcams. | ||
| 44 | They contain functions not found in other webcams, and settings not | ||
| 45 | specified in the Video4Linux API. | ||
| 46 | |||
| 47 | The #define names are built up like follows: | ||
| 48 | VIDIOC VIDeo IOCtl prefix | ||
| 49 | PWC Philps WebCam | ||
| 50 | G optional: Get | ||
| 51 | S optional: Set | ||
| 52 | ... the function | ||
| 53 | */ | ||
| 54 | |||
| 55 | #include <linux/types.h> | ||
| 56 | #include <linux/version.h> | ||
| 57 | |||
| 58 | |||
| 59 | /* Enumeration of image sizes */ | ||
| 60 | #define PSZ_SQCIF 0x00 | ||
| 61 | #define PSZ_QSIF 0x01 | ||
| 62 | #define PSZ_QCIF 0x02 | ||
| 63 | #define PSZ_SIF 0x03 | ||
| 64 | #define PSZ_CIF 0x04 | ||
| 65 | #define PSZ_VGA 0x05 | ||
| 66 | #define PSZ_MAX 6 | ||
| 67 | |||
| 68 | |||
| 69 | /* The frame rate is encoded in the video_window.flags parameter using | ||
| 70 | the upper 16 bits, since some flags are defined nowadays. The following | ||
| 71 | defines provide a mask and shift to filter out this value. | ||
| 72 | This value can also be passing using the private flag when using v4l2 and | ||
| 73 | VIDIOC_S_FMT ioctl. | ||
| 74 | |||
| 75 | In 'Snapshot' mode the camera freezes its automatic exposure and colour | ||
| 76 | balance controls. | ||
| 77 | */ | ||
| 78 | #define PWC_FPS_SHIFT 16 | ||
| 79 | #define PWC_FPS_MASK 0x00FF0000 | ||
| 80 | #define PWC_FPS_FRMASK 0x003F0000 | ||
| 81 | #define PWC_FPS_SNAPSHOT 0x00400000 | ||
| 82 | #define PWC_QLT_MASK 0x03000000 | ||
| 83 | #define PWC_QLT_SHIFT 24 | ||
| 84 | |||
| 85 | |||
| 86 | /* structure for transferring x & y coordinates */ | ||
| 87 | struct pwc_coord | ||
| 88 | { | ||
| 89 | int x, y; /* guess what */ | ||
| 90 | int size; /* size, or offset */ | ||
| 91 | }; | ||
| 92 | |||
| 93 | |||
| 94 | /* Used with VIDIOCPWCPROBE */ | ||
| 95 | struct pwc_probe | ||
| 96 | { | ||
| 97 | char name[32]; | ||
| 98 | int type; | ||
| 99 | }; | ||
| 100 | |||
| 101 | struct pwc_serial | ||
| 102 | { | ||
| 103 | char serial[30]; /* String with serial number. Contains terminating 0 */ | ||
| 104 | }; | ||
| 105 | |||
| 106 | /* pwc_whitebalance.mode values */ | ||
| 107 | #define PWC_WB_INDOOR 0 | ||
| 108 | #define PWC_WB_OUTDOOR 1 | ||
| 109 | #define PWC_WB_FL 2 | ||
| 110 | #define PWC_WB_MANUAL 3 | ||
| 111 | #define PWC_WB_AUTO 4 | ||
| 112 | |||
| 113 | /* Used with VIDIOCPWC[SG]AWB (Auto White Balance). | ||
| 114 | Set mode to one of the PWC_WB_* values above. | ||
| 115 | *red and *blue are the respective gains of these colour components inside | ||
| 116 | the camera; range 0..65535 | ||
| 117 | When 'mode' == PWC_WB_MANUAL, 'manual_red' and 'manual_blue' are set or read; | ||
| 118 | otherwise undefined. | ||
| 119 | 'read_red' and 'read_blue' are read-only. | ||
| 120 | */ | ||
| 121 | struct pwc_whitebalance | ||
| 122 | { | ||
| 123 | int mode; | ||
| 124 | int manual_red, manual_blue; /* R/W */ | ||
| 125 | int read_red, read_blue; /* R/O */ | ||
| 126 | }; | ||
| 127 | |||
| 128 | /* | ||
| 129 | 'control_speed' and 'control_delay' are used in automatic whitebalance mode, | ||
| 130 | and tell the camera how fast it should react to changes in lighting, and | ||
| 131 | with how much delay. Valid values are 0..65535. | ||
| 132 | */ | ||
| 133 | struct pwc_wb_speed | ||
| 134 | { | ||
| 135 | int control_speed; | ||
| 136 | int control_delay; | ||
| 137 | |||
| 138 | }; | ||
| 139 | |||
| 140 | /* Used with VIDIOCPWC[SG]LED */ | ||
| 141 | struct pwc_leds | ||
| 142 | { | ||
| 143 | int led_on; /* Led on-time; range = 0..25000 */ | ||
| 144 | int led_off; /* Led off-time; range = 0..25000 */ | ||
| 145 | }; | ||
| 146 | |||
| 147 | /* Image size (used with GREALSIZE) */ | ||
| 148 | struct pwc_imagesize | ||
| 149 | { | ||
| 150 | int width; | ||
| 151 | int height; | ||
| 152 | }; | ||
| 153 | |||
| 154 | /* Defines and structures for Motorized Pan & Tilt */ | ||
| 155 | #define PWC_MPT_PAN 0x01 | ||
| 156 | #define PWC_MPT_TILT 0x02 | ||
| 157 | #define PWC_MPT_TIMEOUT 0x04 /* for status */ | ||
| 158 | |||
| 159 | /* Set angles; when absolute != 0, the angle is absolute and the | ||
| 160 | driver calculates the relative offset for you. This can only | ||
| 161 | be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns | ||
| 162 | absolute angles. | ||
| 163 | */ | ||
| 164 | struct pwc_mpt_angles | ||
| 165 | { | ||
| 166 | int absolute; /* write-only */ | ||
| 167 | int pan; /* degrees * 100 */ | ||
| 168 | int tilt; /* degress * 100 */ | ||
| 169 | }; | ||
| 170 | |||
| 171 | /* Range of angles of the camera, both horizontally and vertically. | ||
| 172 | */ | ||
| 173 | struct pwc_mpt_range | ||
| 174 | { | ||
| 175 | int pan_min, pan_max; /* degrees * 100 */ | ||
| 176 | int tilt_min, tilt_max; | ||
| 177 | }; | ||
| 178 | |||
| 179 | struct pwc_mpt_status | ||
| 180 | { | ||
| 181 | int status; | ||
| 182 | int time_pan; | ||
| 183 | int time_tilt; | ||
| 184 | }; | ||
| 185 | |||
| 186 | |||
| 187 | /* This is used for out-of-kernel decompression. With it, you can get | ||
| 188 | all the necessary information to initialize and use the decompressor | ||
| 189 | routines in standalone applications. | ||
| 190 | */ | ||
| 191 | struct pwc_video_command | ||
| 192 | { | ||
| 193 | int type; /* camera type (645, 675, 730, etc.) */ | ||
| 194 | int release; /* release number */ | ||
| 195 | |||
| 196 | int size; /* one of PSZ_* */ | ||
| 197 | int alternate; | ||
| 198 | int command_len; /* length of USB video command */ | ||
| 199 | unsigned char command_buf[13]; /* Actual USB video command */ | ||
| 200 | int bandlength; /* >0 = compressed */ | ||
| 201 | int frame_size; /* Size of one (un)compressed frame */ | ||
| 202 | }; | ||
| 203 | |||
| 204 | /* Flags for PWCX subroutines. Not all modules honour all flags. */ | ||
| 205 | #define PWCX_FLAG_PLANAR 0x0001 | ||
| 206 | #define PWCX_FLAG_BAYER 0x0008 | ||
| 207 | |||
| 208 | |||
| 209 | /* IOCTL definitions */ | ||
| 210 | |||
| 211 | /* Restore user settings */ | ||
| 212 | #define VIDIOCPWCRUSER _IO('v', 192) | ||
| 213 | /* Save user settings */ | ||
| 214 | #define VIDIOCPWCSUSER _IO('v', 193) | ||
| 215 | /* Restore factory settings */ | ||
| 216 | #define VIDIOCPWCFACTORY _IO('v', 194) | ||
| 217 | |||
| 218 | /* You can manipulate the compression factor. A compression preference of 0 | ||
| 219 | means use uncompressed modes when available; 1 is low compression, 2 is | ||
| 220 | medium and 3 is high compression preferred. Of course, the higher the | ||
| 221 | compression, the lower the bandwidth used but more chance of artefacts | ||
| 222 | in the image. The driver automatically chooses a higher compression when | ||
| 223 | the preferred mode is not available. | ||
| 224 | */ | ||
| 225 | /* Set preferred compression quality (0 = uncompressed, 3 = highest compression) */ | ||
| 226 | #define VIDIOCPWCSCQUAL _IOW('v', 195, int) | ||
| 227 | /* Get preferred compression quality */ | ||
| 228 | #define VIDIOCPWCGCQUAL _IOR('v', 195, int) | ||
| 229 | |||
| 230 | |||
| 231 | /* Retrieve serial number of camera */ | ||
| 232 | #define VIDIOCPWCGSERIAL _IOR('v', 198, struct pwc_serial) | ||
| 233 | |||
| 234 | /* This is a probe function; since so many devices are supported, it | ||
| 235 | becomes difficult to include all the names in programs that want to | ||
| 236 | check for the enhanced Philips stuff. So in stead, try this PROBE; | ||
| 237 | it returns a structure with the original name, and the corresponding | ||
| 238 | Philips type. | ||
| 239 | To use, fill the structure with zeroes, call PROBE and if that succeeds, | ||
| 240 | compare the name with that returned from VIDIOCGCAP; they should be the | ||
| 241 | same. If so, you can be assured it is a Philips (OEM) cam and the type | ||
| 242 | is valid. | ||
| 243 | */ | ||
| 244 | #define VIDIOCPWCPROBE _IOR('v', 199, struct pwc_probe) | ||
| 245 | |||
| 246 | /* Set AGC (Automatic Gain Control); int < 0 = auto, 0..65535 = fixed */ | ||
| 247 | #define VIDIOCPWCSAGC _IOW('v', 200, int) | ||
| 248 | /* Get AGC; int < 0 = auto; >= 0 = fixed, range 0..65535 */ | ||
| 249 | #define VIDIOCPWCGAGC _IOR('v', 200, int) | ||
| 250 | /* Set shutter speed; int < 0 = auto; >= 0 = fixed, range 0..65535 */ | ||
| 251 | #define VIDIOCPWCSSHUTTER _IOW('v', 201, int) | ||
| 252 | |||
| 253 | /* Color compensation (Auto White Balance) */ | ||
| 254 | #define VIDIOCPWCSAWB _IOW('v', 202, struct pwc_whitebalance) | ||
| 255 | #define VIDIOCPWCGAWB _IOR('v', 202, struct pwc_whitebalance) | ||
| 256 | |||
| 257 | /* Auto WB speed */ | ||
| 258 | #define VIDIOCPWCSAWBSPEED _IOW('v', 203, struct pwc_wb_speed) | ||
| 259 | #define VIDIOCPWCGAWBSPEED _IOR('v', 203, struct pwc_wb_speed) | ||
| 260 | |||
| 261 | /* LEDs on/off/blink; int range 0..65535 */ | ||
| 262 | #define VIDIOCPWCSLED _IOW('v', 205, struct pwc_leds) | ||
| 263 | #define VIDIOCPWCGLED _IOR('v', 205, struct pwc_leds) | ||
| 264 | |||
| 265 | /* Contour (sharpness); int < 0 = auto, 0..65536 = fixed */ | ||
| 266 | #define VIDIOCPWCSCONTOUR _IOW('v', 206, int) | ||
| 267 | #define VIDIOCPWCGCONTOUR _IOR('v', 206, int) | ||
| 268 | |||
| 269 | /* Backlight compensation; 0 = off, otherwise on */ | ||
| 270 | #define VIDIOCPWCSBACKLIGHT _IOW('v', 207, int) | ||
| 271 | #define VIDIOCPWCGBACKLIGHT _IOR('v', 207, int) | ||
| 272 | |||
| 273 | /* Flickerless mode; = 0 off, otherwise on */ | ||
| 274 | #define VIDIOCPWCSFLICKER _IOW('v', 208, int) | ||
| 275 | #define VIDIOCPWCGFLICKER _IOR('v', 208, int) | ||
| 276 | |||
| 277 | /* Dynamic noise reduction; 0 off, 3 = high noise reduction */ | ||
| 278 | #define VIDIOCPWCSDYNNOISE _IOW('v', 209, int) | ||
| 279 | #define VIDIOCPWCGDYNNOISE _IOR('v', 209, int) | ||
| 280 | |||
| 281 | /* Real image size as used by the camera; tells you whether or not there's a gray border around the image */ | ||
| 282 | #define VIDIOCPWCGREALSIZE _IOR('v', 210, struct pwc_imagesize) | ||
| 283 | |||
| 284 | /* Motorized pan & tilt functions */ | ||
| 285 | #define VIDIOCPWCMPTRESET _IOW('v', 211, int) | ||
| 286 | #define VIDIOCPWCMPTGRANGE _IOR('v', 211, struct pwc_mpt_range) | ||
| 287 | #define VIDIOCPWCMPTSANGLE _IOW('v', 212, struct pwc_mpt_angles) | ||
| 288 | #define VIDIOCPWCMPTGANGLE _IOR('v', 212, struct pwc_mpt_angles) | ||
| 289 | #define VIDIOCPWCMPTSTATUS _IOR('v', 213, struct pwc_mpt_status) | ||
| 290 | |||
| 291 | /* Get the USB set-video command; needed for initializing libpwcx */ | ||
| 292 | #define VIDIOCPWCGVIDCMD _IOR('v', 215, struct pwc_video_command) | ||
| 293 | struct pwc_table_init_buffer { | ||
| 294 | int len; | ||
| 295 | char *buffer; | ||
| 296 | |||
| 297 | }; | ||
| 298 | #define VIDIOCPWCGVIDTABLE _IOR('v', 216, struct pwc_table_init_buffer) | ||
| 299 | |||
| 300 | /* | ||
| 301 | * This is private command used when communicating with v4l2. | ||
| 302 | * In the future all private ioctl will be remove/replace to | ||
| 303 | * use interface offer by v4l2. | ||
| 304 | */ | ||
| 305 | |||
| 306 | #define V4L2_CID_PRIVATE_SAVE_USER (V4L2_CID_PRIVATE_BASE + 0) | ||
| 307 | #define V4L2_CID_PRIVATE_RESTORE_USER (V4L2_CID_PRIVATE_BASE + 1) | ||
| 308 | #define V4L2_CID_PRIVATE_RESTORE_FACTORY (V4L2_CID_PRIVATE_BASE + 2) | ||
| 309 | #define V4L2_CID_PRIVATE_COLOUR_MODE (V4L2_CID_PRIVATE_BASE + 3) | ||
| 310 | #define V4L2_CID_PRIVATE_AUTOCONTOUR (V4L2_CID_PRIVATE_BASE + 4) | ||
| 311 | #define V4L2_CID_PRIVATE_CONTOUR (V4L2_CID_PRIVATE_BASE + 5) | ||
| 312 | #define V4L2_CID_PRIVATE_BACKLIGHT (V4L2_CID_PRIVATE_BASE + 6) | ||
| 313 | #define V4L2_CID_PRIVATE_FLICKERLESS (V4L2_CID_PRIVATE_BASE + 7) | ||
| 314 | #define V4L2_CID_PRIVATE_NOISE_REDUCTION (V4L2_CID_PRIVATE_BASE + 8) | ||
| 315 | |||
| 316 | struct pwc_raw_frame { | ||
| 317 | __le16 type; /* type of the webcam */ | ||
| 318 | __le16 vbandlength; /* Size of 4lines compressed (used by the decompressor) */ | ||
| 319 | __u8 cmd[4]; /* the four byte of the command (in case of nala, | ||
| 320 | only the first 3 bytes is filled) */ | ||
| 321 | __u8 rawframe[0]; /* frame_size = H/4*vbandlength */ | ||
| 322 | } __attribute__ ((packed)); | ||
| 323 | |||
| 324 | |||
| 325 | #endif | ||
diff --git a/include/media/saa7115.h b/include/media/saa7115.h index 6b4836f3f057..9f0e2285a099 100644 --- a/include/media/saa7115.h +++ b/include/media/saa7115.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | saa7115.h - definition for saa7113/4/5 inputs | 2 | saa7115.h - definition for saa7113/4/5 inputs and frequency flags |
| 3 | 3 | ||
| 4 | Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) | 4 | Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) |
| 5 | 5 | ||
| @@ -33,5 +33,14 @@ | |||
| 33 | #define SAA7115_SVIDEO2 8 | 33 | #define SAA7115_SVIDEO2 8 |
| 34 | #define SAA7115_SVIDEO3 9 | 34 | #define SAA7115_SVIDEO3 9 |
| 35 | 35 | ||
| 36 | /* SAA7115 v4l2_crystal_freq frequency values */ | ||
| 37 | #define SAA7115_FREQ_32_11_MHZ 32110000 /* 32.11 MHz crystal, SAA7114/5 only */ | ||
| 38 | #define SAA7115_FREQ_24_576_MHZ 24576000 /* 24.576 MHz crystal */ | ||
| 39 | |||
| 40 | /* SAA7115 v4l2_crystal_freq audio clock control flags */ | ||
| 41 | #define SAA7115_FREQ_FL_UCGC (1 << 0) /* SA 3A[7], UCGC, 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 */ | ||
| 44 | |||
| 36 | #endif | 45 | #endif |
| 37 | 46 | ||
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index 4507cb61ae93..83fe2e3d1e25 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #define __SAA7146_VV__ | 2 | #define __SAA7146_VV__ |
| 3 | 3 | ||
| 4 | #include <linux/videodev.h> | 4 | #include <linux/videodev.h> |
| 5 | 5 | #include <media/v4l2-common.h> | |
| 6 | #include <media/saa7146.h> | 6 | #include <media/saa7146.h> |
| 7 | #include <media/video-buf.h> | 7 | #include <media/video-buf.h> |
| 8 | 8 | ||
diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h index ad9c171bfa07..3c43b95f4c0d 100644 --- a/include/media/tuner-types.h +++ b/include/media/tuner-types.h | |||
| @@ -20,6 +20,7 @@ struct tuner_range { | |||
| 20 | 20 | ||
| 21 | struct tuner_params { | 21 | struct tuner_params { |
| 22 | enum param_type type; | 22 | enum param_type type; |
| 23 | |||
| 23 | /* Many Philips based tuners have a comment like this in their | 24 | /* Many Philips based tuners have a comment like this in their |
| 24 | * datasheet: | 25 | * datasheet: |
| 25 | * | 26 | * |
| @@ -39,6 +40,60 @@ struct tuner_params { | |||
| 39 | * static unless the control byte was sent first. | 40 | * static unless the control byte was sent first. |
| 40 | */ | 41 | */ |
| 41 | unsigned int cb_first_if_lower_freq:1; | 42 | unsigned int cb_first_if_lower_freq:1; |
| 43 | /* Set to 1 if this tuner uses a tda9887 */ | ||
| 44 | unsigned int has_tda9887:1; | ||
| 45 | /* Many Philips tuners use tda9887 PORT1 to select the FM radio | ||
| 46 | sensitivity. If this setting is 1, then set PORT1 to 1 to | ||
| 47 | get proper FM reception. */ | ||
| 48 | unsigned int port1_fm_high_sensitivity:1; | ||
| 49 | /* Some Philips tuners use tda9887 PORT2 to select the FM radio | ||
| 50 | sensitivity. If this setting is 1, then set PORT2 to 1 to | ||
| 51 | get proper FM reception. */ | ||
| 52 | unsigned int port2_fm_high_sensitivity:1; | ||
| 53 | /* Most tuners with a tda9887 use QSS mode. Some (cheaper) tuners | ||
| 54 | use Intercarrier mode. If this setting is 1, then the tuner | ||
| 55 | needs to be set to intercarrier mode. */ | ||
| 56 | unsigned int intercarrier_mode:1; | ||
| 57 | /* This setting sets the default value for PORT1. | ||
| 58 | 0 means inactive, 1 means active. Note: the actual bit | ||
| 59 | value written to the tda9887 is inverted. So a 0 here | ||
| 60 | means a 1 in the B6 bit. */ | ||
| 61 | unsigned int port1_active:1; | ||
| 62 | /* This setting sets the default value for PORT2. | ||
| 63 | 0 means inactive, 1 means active. Note: the actual bit | ||
| 64 | value written to the tda9887 is inverted. So a 0 here | ||
| 65 | means a 1 in the B7 bit. */ | ||
| 66 | unsigned int port2_active:1; | ||
| 67 | /* Sometimes PORT1 is inverted when the SECAM-L' standard is selected. | ||
| 68 | Set this bit to 1 if this is needed. */ | ||
| 69 | unsigned int port1_invert_for_secam_lc:1; | ||
| 70 | /* Sometimes PORT2 is inverted when the SECAM-L' standard is selected. | ||
| 71 | Set this bit to 1 if this is needed. */ | ||
| 72 | unsigned int port2_invert_for_secam_lc:1; | ||
| 73 | /* Some cards require PORT1 to be 1 for mono Radio FM and 0 for stereo. */ | ||
| 74 | unsigned int port1_set_for_fm_mono:1; | ||
| 75 | /* Default tda9887 TOP value in dB for the low band. Default is 0. | ||
| 76 | Range: -16:+15 */ | ||
| 77 | signed int default_top_low:5; | ||
| 78 | /* Default tda9887 TOP value in dB for the mid band. Default is 0. | ||
| 79 | Range: -16:+15 */ | ||
| 80 | signed int default_top_mid:5; | ||
| 81 | /* Default tda9887 TOP value in dB for the high band. Default is 0. | ||
| 82 | Range: -16:+15 */ | ||
| 83 | signed int default_top_high:5; | ||
| 84 | /* Default tda9887 TOP value in dB for SECAM-L/L' for the low band. | ||
| 85 | Default is 0. Several tuners require a different TOP value for | ||
| 86 | the SECAM-L/L' standards. Range: -16:+15 */ | ||
| 87 | signed int default_top_secam_low:5; | ||
| 88 | /* Default tda9887 TOP value in dB for SECAM-L/L' for the mid band. | ||
| 89 | Default is 0. Several tuners require a different TOP value for | ||
| 90 | the SECAM-L/L' standards. Range: -16:+15 */ | ||
| 91 | signed int default_top_secam_mid:5; | ||
| 92 | /* Default tda9887 TOP value in dB for SECAM-L/L' for the high band. | ||
| 93 | Default is 0. Several tuners require a different TOP value for | ||
| 94 | the SECAM-L/L' standards. Range: -16:+15 */ | ||
| 95 | signed int default_top_secam_high:5; | ||
| 96 | |||
| 42 | 97 | ||
| 43 | unsigned int count; | 98 | unsigned int count; |
| 44 | struct tuner_range *ranges; | 99 | struct tuner_range *ranges; |
diff --git a/include/media/tuner.h b/include/media/tuner.h index 017fed7d5e4d..2f7b00b08e88 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
| @@ -25,6 +25,8 @@ | |||
| 25 | #include <linux/videodev2.h> | 25 | #include <linux/videodev2.h> |
| 26 | #include <media/tuner-types.h> | 26 | #include <media/tuner-types.h> |
| 27 | 27 | ||
| 28 | extern int tuner_debug; | ||
| 29 | |||
| 28 | #define ADDR_UNSET (255) | 30 | #define ADDR_UNSET (255) |
| 29 | 31 | ||
| 30 | #define TUNER_TEMIC_PAL 0 /* 4002 FH5 (3X 7756, 9483) */ | 32 | #define TUNER_TEMIC_PAL 0 /* 4002 FH5 (3X 7756, 9483) */ |
| @@ -108,7 +110,7 @@ | |||
| 108 | #define TUNER_TEA5767 62 /* Only FM Radio Tuner */ | 110 | #define TUNER_TEA5767 62 /* Only FM Radio Tuner */ |
| 109 | #define TUNER_PHILIPS_FMD1216ME_MK3 63 | 111 | #define TUNER_PHILIPS_FMD1216ME_MK3 63 |
| 110 | 112 | ||
| 111 | #define TUNER_LG_TDVS_H062F 64 /* DViCO FusionHDTV 5 */ | 113 | #define TUNER_LG_TDVS_H06XF 64 /* TDVS H061F, H062F, H064F */ |
| 112 | #define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ | 114 | #define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ |
| 113 | #define TUNER_LG_TALN 66 | 115 | #define TUNER_LG_TALN 66 |
| 114 | #define TUNER_PHILIPS_TD1316 67 | 116 | #define TUNER_PHILIPS_TD1316 67 |
| @@ -119,6 +121,8 @@ | |||
| 119 | #define TUNER_XCEIVE_XC3028 71 | 121 | #define TUNER_XCEIVE_XC3028 71 |
| 120 | 122 | ||
| 121 | #define TUNER_THOMSON_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */ | 123 | #define TUNER_THOMSON_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */ |
| 124 | #define TUNER_SAMSUNG_TCPG_6121P30A 73 /* Hauppauge PVR-500 PAL */ | ||
| 125 | #define TUNER_TDA9887 74 /* This tuner should be used only internally */ | ||
| 122 | 126 | ||
| 123 | /* tv card specific */ | 127 | /* tv card specific */ |
| 124 | #define TDA9887_PRESENT (1<<0) | 128 | #define TDA9887_PRESENT (1<<0) |
| @@ -190,6 +194,10 @@ struct tuner { | |||
| 190 | 194 | ||
| 191 | int using_v4l2; | 195 | int using_v4l2; |
| 192 | 196 | ||
| 197 | /* used by tda9887 */ | ||
| 198 | unsigned int tda9887_config; | ||
| 199 | unsigned char tda9887_data[4]; | ||
| 200 | |||
| 193 | /* used by MT2032 */ | 201 | /* used by MT2032 */ |
| 194 | unsigned int xogc; | 202 | unsigned int xogc; |
| 195 | unsigned int radio_if2; | 203 | unsigned int radio_if2; |
| @@ -206,6 +214,8 @@ struct tuner { | |||
| 206 | void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); | 214 | void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); |
| 207 | int (*has_signal)(struct i2c_client *c); | 215 | int (*has_signal)(struct i2c_client *c); |
| 208 | int (*is_stereo)(struct i2c_client *c); | 216 | int (*is_stereo)(struct i2c_client *c); |
| 217 | int (*get_afc)(struct i2c_client *c); | ||
| 218 | void (*tuner_status)(struct i2c_client *c); | ||
| 209 | void (*standby)(struct i2c_client *c); | 219 | void (*standby)(struct i2c_client *c); |
| 210 | }; | 220 | }; |
| 211 | 221 | ||
| @@ -218,6 +228,7 @@ extern int tda8290_probe(struct i2c_client *c); | |||
| 218 | extern int tea5767_tuner_init(struct i2c_client *c); | 228 | extern int tea5767_tuner_init(struct i2c_client *c); |
| 219 | extern int default_tuner_init(struct i2c_client *c); | 229 | extern int default_tuner_init(struct i2c_client *c); |
| 220 | extern int tea5767_autodetection(struct i2c_client *c); | 230 | extern int tea5767_autodetection(struct i2c_client *c); |
| 231 | extern int tda9887_tuner_init(struct i2c_client *c); | ||
| 221 | 232 | ||
| 222 | #define tuner_warn(fmt, arg...) do {\ | 233 | #define tuner_warn(fmt, arg...) do {\ |
| 223 | printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ | 234 | printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ |
diff --git a/include/media/tvp5150.h b/include/media/tvp5150.h new file mode 100644 index 000000000000..72bd2a2b8bfd --- /dev/null +++ b/include/media/tvp5150.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | tvp5150.h - definition for tvp5150 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 _TVP5150_H_ | ||
| 22 | #define _TVP5150_H_ | ||
| 23 | |||
| 24 | /* TVP5150 HW inputs */ | ||
| 25 | #define TVP5150_COMPOSITE0 0 | ||
| 26 | #define TVP5150_COMPOSITE1 1 | ||
| 27 | #define TVP5150_SVIDEO 2 | ||
| 28 | |||
| 29 | /* TVP5150 HW outputs */ | ||
| 30 | #define TVP5150_NORMAL 0 | ||
| 31 | #define TVP5150_BLACK_SCREEN 1 | ||
| 32 | |||
| 33 | #endif | ||
| 34 | |||
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 642520acdfa7..5564db13c0d5 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
| @@ -26,8 +26,14 @@ | |||
| 26 | #ifndef V4L2_COMMON_H_ | 26 | #ifndef V4L2_COMMON_H_ |
| 27 | #define V4L2_COMMON_H_ | 27 | #define V4L2_COMMON_H_ |
| 28 | 28 | ||
| 29 | #include <media/v4l2-dev.h> | ||
| 30 | |||
| 29 | /* v4l debugging and diagnostics */ | 31 | /* v4l debugging and diagnostics */ |
| 30 | 32 | ||
| 33 | /* Debug bitmask flags to be used on V4L2 */ | ||
| 34 | #define V4L2_DEBUG_IOCTL 0x01 | ||
| 35 | #define V4L2_DEBUG_IOCTL_ARG 0x02 | ||
| 36 | |||
| 31 | /* Common printk constucts for v4l-i2c drivers. These macros create a unique | 37 | /* Common printk constucts for v4l-i2c drivers. These macros create a unique |
| 32 | prefix consisting of the driver name, the adapter number and the i2c | 38 | prefix consisting of the driver name, the adapter number and the i2c |
| 33 | address. */ | 39 | address. */ |
| @@ -78,6 +84,19 @@ extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg); | |||
| 78 | 84 | ||
| 79 | /* ------------------------------------------------------------------------- */ | 85 | /* ------------------------------------------------------------------------- */ |
| 80 | 86 | ||
| 87 | /* Control helper functions */ | ||
| 88 | |||
| 89 | int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl, | ||
| 90 | const char **menu_items); | ||
| 91 | const char **v4l2_ctrl_get_menu(u32 id); | ||
| 92 | int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 step, s32 def); | ||
| 93 | int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl); | ||
| 94 | int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu, | ||
| 95 | struct v4l2_queryctrl *qctrl, const char **menu_items); | ||
| 96 | u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id); | ||
| 97 | |||
| 98 | /* ------------------------------------------------------------------------- */ | ||
| 99 | |||
| 81 | /* Internal ioctls */ | 100 | /* Internal ioctls */ |
| 82 | 101 | ||
| 83 | /* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ | 102 | /* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ |
| @@ -112,6 +131,8 @@ enum v4l2_chip_ident { | |||
| 112 | V4L2_IDENT_SAA7129 = 159, | 131 | V4L2_IDENT_SAA7129 = 159, |
| 113 | 132 | ||
| 114 | /* module cx25840: reserved range 200-249 */ | 133 | /* module cx25840: reserved range 200-249 */ |
| 134 | V4L2_IDENT_CX25836 = 236, | ||
| 135 | V4L2_IDENT_CX25837 = 237, | ||
| 115 | V4L2_IDENT_CX25840 = 240, | 136 | V4L2_IDENT_CX25840 = 240, |
| 116 | V4L2_IDENT_CX25841 = 241, | 137 | V4L2_IDENT_CX25841 = 241, |
| 117 | V4L2_IDENT_CX25842 = 242, | 138 | V4L2_IDENT_CX25842 = 242, |
| @@ -211,4 +232,15 @@ struct v4l2_routing { | |||
| 211 | #define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing) | 232 | #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) | 233 | #define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing) |
| 213 | 234 | ||
| 235 | struct v4l2_crystal_freq { | ||
| 236 | u32 freq; /* frequency in Hz of the crystal */ | ||
| 237 | u32 flags; /* device specific flags */ | ||
| 238 | }; | ||
| 239 | |||
| 240 | /* Sets the frequency of the crystal used to generate the clocks. | ||
| 241 | An extra flags field allows device specific configuration regarding | ||
| 242 | clock frequency dividers, etc. If not used, then set flags to 0. | ||
| 243 | If the frequency is not supported, then -EINVAL is returned. */ | ||
| 244 | #define VIDIOC_INT_S_CRYSTAL_FREQ _IOW ('d', 113, struct v4l2_crystal_freq) | ||
| 245 | |||
| 214 | #endif /* V4L2_COMMON_H_ */ | 246 | #endif /* V4L2_COMMON_H_ */ |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h new file mode 100644 index 000000000000..bb495b7f4680 --- /dev/null +++ b/include/media/v4l2-dev.h | |||
| @@ -0,0 +1,378 @@ | |||
| 1 | /* | ||
| 2 | * | ||
| 3 | * V 4 L 2 D R I V E R H E L P E R A P I | ||
| 4 | * | ||
| 5 | * Moved from videodev2.h | ||
| 6 | * | ||
| 7 | * Some commonly needed functions for drivers (v4l2-common.o module) | ||
| 8 | */ | ||
| 9 | #ifndef _V4L2_DEV_H | ||
| 10 | #define _V4L2_DEV_H | ||
| 11 | |||
| 12 | #define OBSOLETE_OWNER 1 /* to be removed soon */ | ||
| 13 | |||
| 14 | #include <linux/poll.h> | ||
| 15 | #include <linux/fs.h> | ||
| 16 | #include <linux/device.h> | ||
| 17 | #include <linux/mutex.h> | ||
| 18 | #include <linux/compiler.h> /* need __user */ | ||
| 19 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
| 20 | #include <linux/videodev.h> | ||
| 21 | #else | ||
| 22 | #include <linux/videodev2.h> | ||
| 23 | #endif | ||
| 24 | |||
| 25 | #include <linux/fs.h> | ||
| 26 | |||
| 27 | #define VIDEO_MAJOR 81 | ||
| 28 | /* Minor device allocation */ | ||
| 29 | #define MINOR_VFL_TYPE_GRABBER_MIN 0 | ||
| 30 | #define MINOR_VFL_TYPE_GRABBER_MAX 63 | ||
| 31 | #define MINOR_VFL_TYPE_RADIO_MIN 64 | ||
| 32 | #define MINOR_VFL_TYPE_RADIO_MAX 127 | ||
| 33 | #define MINOR_VFL_TYPE_VTX_MIN 192 | ||
| 34 | #define MINOR_VFL_TYPE_VTX_MAX 223 | ||
| 35 | #define MINOR_VFL_TYPE_VBI_MIN 224 | ||
| 36 | #define MINOR_VFL_TYPE_VBI_MAX 255 | ||
| 37 | |||
| 38 | #define VFL_TYPE_GRABBER 0 | ||
| 39 | #define VFL_TYPE_VBI 1 | ||
| 40 | #define VFL_TYPE_RADIO 2 | ||
| 41 | #define VFL_TYPE_VTX 3 | ||
| 42 | |||
| 43 | /* Video standard functions */ | ||
| 44 | extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); | ||
| 45 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | ||
| 46 | int id, char *name); | ||
| 47 | |||
| 48 | /* prority handling */ | ||
| 49 | struct v4l2_prio_state { | ||
| 50 | atomic_t prios[4]; | ||
| 51 | }; | ||
| 52 | int v4l2_prio_init(struct v4l2_prio_state *global); | ||
| 53 | int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, | ||
| 54 | enum v4l2_priority new); | ||
| 55 | int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
| 56 | int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
| 57 | enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global); | ||
| 58 | int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
| 59 | |||
| 60 | /* names for fancy debug output */ | ||
| 61 | extern char *v4l2_field_names[]; | ||
| 62 | extern char *v4l2_type_names[]; | ||
| 63 | |||
| 64 | /* Compatibility layer interface -- v4l1-compat module */ | ||
| 65 | typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, | ||
| 66 | unsigned int cmd, void *arg); | ||
| 67 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
| 68 | int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, | ||
| 69 | int cmd, void *arg, v4l2_kioctl driver_ioctl); | ||
| 70 | #else | ||
| 71 | #define v4l_compat_translate_ioctl(inode,file,cmd,arg,ioctl) -EINVAL | ||
| 72 | #endif | ||
| 73 | |||
| 74 | /* 32 Bits compatibility layer for 64 bits processors */ | ||
| 75 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, | ||
| 76 | unsigned long arg); | ||
| 77 | |||
| 78 | /* | ||
| 79 | * Newer version of video_device, handled by videodev2.c | ||
| 80 | * This version moves redundant code from video device code to | ||
| 81 | * the common handler | ||
| 82 | */ | ||
| 83 | struct v4l2_tvnorm { | ||
| 84 | char *name; | ||
| 85 | v4l2_std_id id; | ||
| 86 | |||
| 87 | void *priv_data; | ||
| 88 | }; | ||
| 89 | |||
| 90 | struct video_device | ||
| 91 | { | ||
| 92 | /* device ops */ | ||
| 93 | const struct file_operations *fops; | ||
| 94 | |||
| 95 | /* device info */ | ||
| 96 | struct device *dev; | ||
| 97 | char name[32]; | ||
| 98 | int type; /* v4l1 */ | ||
| 99 | int type2; /* v4l2 */ | ||
| 100 | int hardware; | ||
| 101 | int minor; | ||
| 102 | |||
| 103 | int debug; /* Activates debug level*/ | ||
| 104 | |||
| 105 | /* Video standard vars */ | ||
| 106 | int tvnormsize; /* Size of tvnorm array */ | ||
| 107 | v4l2_std_id current_norm; /* Current tvnorm */ | ||
| 108 | struct v4l2_tvnorm *tvnorms; | ||
| 109 | |||
| 110 | /* callbacks */ | ||
| 111 | void (*release)(struct video_device *vfd); | ||
| 112 | |||
| 113 | /* ioctl callbacks */ | ||
| 114 | |||
| 115 | /* VIDIOC_QUERYCAP handler */ | ||
| 116 | int (*vidioc_querycap)(struct file *file, void *fh, struct v4l2_capability *cap); | ||
| 117 | |||
| 118 | /* Priority handling */ | ||
| 119 | int (*vidioc_g_priority) (struct file *file, void *fh, | ||
| 120 | enum v4l2_priority *p); | ||
| 121 | int (*vidioc_s_priority) (struct file *file, void *fh, | ||
| 122 | enum v4l2_priority p); | ||
| 123 | |||
| 124 | /* VIDIOC_ENUM_FMT handlers */ | ||
| 125 | int (*vidioc_enum_fmt_cap) (struct file *file, void *fh, | ||
| 126 | struct v4l2_fmtdesc *f); | ||
| 127 | int (*vidioc_enum_fmt_overlay) (struct file *file, void *fh, | ||
| 128 | struct v4l2_fmtdesc *f); | ||
| 129 | int (*vidioc_enum_fmt_vbi) (struct file *file, void *fh, | ||
| 130 | struct v4l2_fmtdesc *f); | ||
| 131 | int (*vidioc_enum_fmt_vbi_capture) (struct file *file, void *fh, | ||
| 132 | struct v4l2_fmtdesc *f); | ||
| 133 | int (*vidioc_enum_fmt_video_output)(struct file *file, void *fh, | ||
| 134 | struct v4l2_fmtdesc *f); | ||
| 135 | int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh, | ||
| 136 | struct v4l2_fmtdesc *f); | ||
| 137 | int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, | ||
| 138 | struct v4l2_fmtdesc *f); | ||
| 139 | |||
| 140 | /* VIDIOC_G_FMT handlers */ | ||
| 141 | int (*vidioc_g_fmt_cap) (struct file *file, void *fh, | ||
| 142 | struct v4l2_format *f); | ||
| 143 | int (*vidioc_g_fmt_overlay) (struct file *file, void *fh, | ||
| 144 | struct v4l2_format *f); | ||
| 145 | int (*vidioc_g_fmt_vbi) (struct file *file, void *fh, | ||
| 146 | struct v4l2_format *f); | ||
| 147 | int (*vidioc_g_fmt_vbi_output) (struct file *file, void *fh, | ||
| 148 | struct v4l2_format *f); | ||
| 149 | int (*vidioc_g_fmt_vbi_capture)(struct file *file, void *fh, | ||
| 150 | struct v4l2_format *f); | ||
| 151 | int (*vidioc_g_fmt_video_output)(struct file *file, void *fh, | ||
| 152 | struct v4l2_format *f); | ||
| 153 | int (*vidioc_g_fmt_type_private)(struct file *file, void *fh, | ||
| 154 | struct v4l2_format *f); | ||
| 155 | |||
| 156 | /* VIDIOC_S_FMT handlers */ | ||
| 157 | int (*vidioc_s_fmt_cap) (struct file *file, void *fh, | ||
| 158 | struct v4l2_format *f); | ||
| 159 | |||
| 160 | int (*vidioc_s_fmt_overlay) (struct file *file, void *fh, | ||
| 161 | struct v4l2_format *f); | ||
| 162 | int (*vidioc_s_fmt_vbi) (struct file *file, void *fh, | ||
| 163 | struct v4l2_format *f); | ||
| 164 | int (*vidioc_s_fmt_vbi_output) (struct file *file, void *fh, | ||
| 165 | struct v4l2_format *f); | ||
| 166 | int (*vidioc_s_fmt_vbi_capture)(struct file *file, void *fh, | ||
| 167 | struct v4l2_format *f); | ||
| 168 | int (*vidioc_s_fmt_video_output)(struct file *file, void *fh, | ||
| 169 | struct v4l2_format *f); | ||
| 170 | int (*vidioc_s_fmt_type_private)(struct file *file, void *fh, | ||
| 171 | struct v4l2_format *f); | ||
| 172 | |||
| 173 | /* VIDIOC_TRY_FMT handlers */ | ||
| 174 | int (*vidioc_try_fmt_cap) (struct file *file, void *fh, | ||
| 175 | struct v4l2_format *f); | ||
| 176 | int (*vidioc_try_fmt_overlay) (struct file *file, void *fh, | ||
| 177 | struct v4l2_format *f); | ||
| 178 | int (*vidioc_try_fmt_vbi) (struct file *file, void *fh, | ||
| 179 | struct v4l2_format *f); | ||
| 180 | int (*vidioc_try_fmt_vbi_output) (struct file *file, void *fh, | ||
| 181 | struct v4l2_format *f); | ||
| 182 | int (*vidioc_try_fmt_vbi_capture)(struct file *file, void *fh, | ||
| 183 | struct v4l2_format *f); | ||
| 184 | int (*vidioc_try_fmt_video_output)(struct file *file, void *fh, | ||
| 185 | struct v4l2_format *f); | ||
| 186 | int (*vidioc_try_fmt_type_private)(struct file *file, void *fh, | ||
| 187 | struct v4l2_format *f); | ||
| 188 | |||
| 189 | /* Buffer handlers */ | ||
| 190 | int (*vidioc_reqbufs) (struct file *file, void *fh, struct v4l2_requestbuffers *b); | ||
| 191 | int (*vidioc_querybuf)(struct file *file, void *fh, struct v4l2_buffer *b); | ||
| 192 | int (*vidioc_qbuf) (struct file *file, void *fh, struct v4l2_buffer *b); | ||
| 193 | int (*vidioc_dqbuf) (struct file *file, void *fh, struct v4l2_buffer *b); | ||
| 194 | |||
| 195 | |||
| 196 | int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i); | ||
| 197 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
| 198 | /* buffer type is struct vidio_mbuf * */ | ||
| 199 | int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p); | ||
| 200 | #endif | ||
| 201 | int (*vidioc_g_fbuf) (struct file *file, void *fh, | ||
| 202 | struct v4l2_framebuffer *a); | ||
| 203 | int (*vidioc_s_fbuf) (struct file *file, void *fh, | ||
| 204 | struct v4l2_framebuffer *a); | ||
| 205 | |||
| 206 | /* Stream on/off */ | ||
| 207 | int (*vidioc_streamon) (struct file *file, void *fh, enum v4l2_buf_type i); | ||
| 208 | int (*vidioc_streamoff)(struct file *file, void *fh, enum v4l2_buf_type i); | ||
| 209 | |||
| 210 | /* Standard handling | ||
| 211 | G_STD and ENUMSTD are handled by videodev.c | ||
| 212 | */ | ||
| 213 | int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id a); | ||
| 214 | int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a); | ||
| 215 | |||
| 216 | /* Input handling */ | ||
| 217 | int (*vidioc_enum_input)(struct file *file, void *fh, | ||
| 218 | struct v4l2_input *inp); | ||
| 219 | int (*vidioc_g_input) (struct file *file, void *fh, unsigned int *i); | ||
| 220 | int (*vidioc_s_input) (struct file *file, void *fh, unsigned int i); | ||
| 221 | |||
| 222 | /* Output handling */ | ||
| 223 | int (*vidioc_enumoutput) (struct file *file, void *fh, | ||
| 224 | struct v4l2_output *a); | ||
| 225 | int (*vidioc_g_output) (struct file *file, void *fh, unsigned int *i); | ||
| 226 | int (*vidioc_s_output) (struct file *file, void *fh, unsigned int i); | ||
| 227 | |||
| 228 | /* Control handling */ | ||
| 229 | int (*vidioc_queryctrl) (struct file *file, void *fh, | ||
| 230 | struct v4l2_queryctrl *a); | ||
| 231 | int (*vidioc_g_ctrl) (struct file *file, void *fh, | ||
| 232 | struct v4l2_control *a); | ||
| 233 | int (*vidioc_s_ctrl) (struct file *file, void *fh, | ||
| 234 | struct v4l2_control *a); | ||
| 235 | int (*vidioc_g_ext_ctrls) (struct file *file, void *fh, | ||
| 236 | struct v4l2_ext_controls *a); | ||
| 237 | int (*vidioc_s_ext_ctrls) (struct file *file, void *fh, | ||
| 238 | struct v4l2_ext_controls *a); | ||
| 239 | int (*vidioc_try_ext_ctrls) (struct file *file, void *fh, | ||
| 240 | struct v4l2_ext_controls *a); | ||
| 241 | int (*vidioc_querymenu) (struct file *file, void *fh, | ||
| 242 | struct v4l2_querymenu *a); | ||
| 243 | |||
| 244 | /* Audio ioctls */ | ||
| 245 | int (*vidioc_enumaudio) (struct file *file, void *fh, | ||
| 246 | struct v4l2_audio *a); | ||
| 247 | int (*vidioc_g_audio) (struct file *file, void *fh, | ||
| 248 | struct v4l2_audio *a); | ||
| 249 | int (*vidioc_s_audio) (struct file *file, void *fh, | ||
| 250 | struct v4l2_audio *a); | ||
| 251 | |||
| 252 | /* Audio out ioctls */ | ||
| 253 | int (*vidioc_enumaudout) (struct file *file, void *fh, | ||
| 254 | struct v4l2_audioout *a); | ||
| 255 | int (*vidioc_g_audout) (struct file *file, void *fh, | ||
| 256 | struct v4l2_audioout *a); | ||
| 257 | int (*vidioc_s_audout) (struct file *file, void *fh, | ||
| 258 | struct v4l2_audioout *a); | ||
| 259 | int (*vidioc_g_modulator) (struct file *file, void *fh, | ||
| 260 | struct v4l2_modulator *a); | ||
| 261 | int (*vidioc_s_modulator) (struct file *file, void *fh, | ||
| 262 | struct v4l2_modulator *a); | ||
| 263 | /* Crop ioctls */ | ||
| 264 | int (*vidioc_cropcap) (struct file *file, void *fh, | ||
| 265 | struct v4l2_cropcap *a); | ||
| 266 | int (*vidioc_g_crop) (struct file *file, void *fh, | ||
| 267 | struct v4l2_crop *a); | ||
| 268 | int (*vidioc_s_crop) (struct file *file, void *fh, | ||
| 269 | struct v4l2_crop *a); | ||
| 270 | /* Compression ioctls */ | ||
| 271 | int (*vidioc_g_mpegcomp) (struct file *file, void *fh, | ||
| 272 | struct v4l2_mpeg_compression *a); | ||
| 273 | int (*vidioc_s_mpegcomp) (struct file *file, void *fh, | ||
| 274 | struct v4l2_mpeg_compression *a); | ||
| 275 | int (*vidioc_g_jpegcomp) (struct file *file, void *fh, | ||
| 276 | struct v4l2_jpegcompression *a); | ||
| 277 | int (*vidioc_s_jpegcomp) (struct file *file, void *fh, | ||
| 278 | struct v4l2_jpegcompression *a); | ||
| 279 | |||
| 280 | /* Stream type-dependent parameter ioctls */ | ||
| 281 | int (*vidioc_g_parm) (struct file *file, void *fh, | ||
| 282 | struct v4l2_streamparm *a); | ||
| 283 | int (*vidioc_s_parm) (struct file *file, void *fh, | ||
| 284 | struct v4l2_streamparm *a); | ||
| 285 | |||
| 286 | /* Tuner ioctls */ | ||
| 287 | int (*vidioc_g_tuner) (struct file *file, void *fh, | ||
| 288 | struct v4l2_tuner *a); | ||
| 289 | int (*vidioc_s_tuner) (struct file *file, void *fh, | ||
| 290 | struct v4l2_tuner *a); | ||
| 291 | int (*vidioc_g_frequency) (struct file *file, void *fh, | ||
| 292 | struct v4l2_frequency *a); | ||
| 293 | int (*vidioc_s_frequency) (struct file *file, void *fh, | ||
| 294 | struct v4l2_frequency *a); | ||
| 295 | |||
| 296 | /* Sliced VBI cap */ | ||
| 297 | int (*vidioc_g_sliced_vbi_cap) (struct file *file, void *fh, | ||
| 298 | struct v4l2_sliced_vbi_cap *a); | ||
| 299 | |||
| 300 | /* Log status ioctl */ | ||
| 301 | int (*vidioc_log_status) (struct file *file, void *fh); | ||
| 302 | |||
| 303 | |||
| 304 | #ifdef OBSOLETE_OWNER /* to be removed soon */ | ||
| 305 | /* obsolete -- fops->owner is used instead */ | ||
| 306 | struct module *owner; | ||
| 307 | /* dev->driver_data will be used instead some day. | ||
| 308 | * Use the video_{get|set}_drvdata() helper functions, | ||
| 309 | * so the switch over will be transparent for you. | ||
| 310 | * Or use {pci|usb}_{get|set}_drvdata() directly. */ | ||
| 311 | void *priv; | ||
| 312 | #endif | ||
| 313 | |||
| 314 | /* for videodev.c intenal usage -- please don't touch */ | ||
| 315 | int users; /* video_exclusive_{open|close} ... */ | ||
| 316 | struct mutex lock; /* ... helper function uses these */ | ||
| 317 | struct class_device class_dev; /* sysfs */ | ||
| 318 | }; | ||
| 319 | |||
| 320 | /* Version 2 functions */ | ||
| 321 | extern int video_register_device(struct video_device *vfd, int type, int nr); | ||
| 322 | void video_unregister_device(struct video_device *); | ||
| 323 | extern int video_ioctl2(struct inode *inode, struct file *file, | ||
| 324 | unsigned int cmd, unsigned long arg); | ||
| 325 | |||
| 326 | /* helper functions to alloc / release struct video_device, the | ||
| 327 | later can be used for video_device->release() */ | ||
| 328 | struct video_device *video_device_alloc(void); | ||
| 329 | void video_device_release(struct video_device *vfd); | ||
| 330 | |||
| 331 | /* Include support for obsoleted stuff */ | ||
| 332 | extern int video_usercopy(struct inode *inode, struct file *file, | ||
| 333 | unsigned int cmd, unsigned long arg, | ||
| 334 | int (*func)(struct inode *inode, struct file *file, | ||
| 335 | unsigned int cmd, void *arg)); | ||
| 336 | |||
| 337 | |||
| 338 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
| 339 | #include <linux/mm.h> | ||
| 340 | |||
| 341 | extern struct video_device* video_devdata(struct file*); | ||
| 342 | |||
| 343 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) | ||
| 344 | static inline int __must_check | ||
| 345 | video_device_create_file(struct video_device *vfd, | ||
| 346 | struct class_device_attribute *attr) | ||
| 347 | { | ||
| 348 | int ret = class_device_create_file(&vfd->class_dev, attr); | ||
| 349 | if (ret < 0) | ||
| 350 | printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret); | ||
| 351 | return ret; | ||
| 352 | } | ||
| 353 | static inline void | ||
| 354 | video_device_remove_file(struct video_device *vfd, | ||
| 355 | struct class_device_attribute *attr) | ||
| 356 | { | ||
| 357 | class_device_remove_file(&vfd->class_dev, attr); | ||
| 358 | } | ||
| 359 | |||
| 360 | #endif /* CONFIG_VIDEO_V4L1_COMPAT */ | ||
| 361 | |||
| 362 | #ifdef OBSOLETE_OWNER /* to be removed soon */ | ||
| 363 | /* helper functions to access driver private data. */ | ||
| 364 | static inline void *video_get_drvdata(struct video_device *dev) | ||
| 365 | { | ||
| 366 | return dev->priv; | ||
| 367 | } | ||
| 368 | |||
| 369 | static inline void video_set_drvdata(struct video_device *dev, void *data) | ||
| 370 | { | ||
| 371 | dev->priv = data; | ||
| 372 | } | ||
| 373 | #endif | ||
| 374 | |||
| 375 | extern int video_exclusive_open(struct inode *inode, struct file *file); | ||
| 376 | extern int video_exclusive_release(struct inode *inode, struct file *file); | ||
| 377 | |||
| 378 | #endif /* _V4L2_DEV_H */ | ||
diff --git a/include/media/video-buf-dvb.h b/include/media/video-buf-dvb.h index b78d90fe629f..8233cafdeef6 100644 --- a/include/media/video-buf-dvb.h +++ b/include/media/video-buf-dvb.h | |||
| @@ -26,7 +26,8 @@ struct videobuf_dvb { | |||
| 26 | 26 | ||
| 27 | int videobuf_dvb_register(struct videobuf_dvb *dvb, | 27 | int videobuf_dvb_register(struct videobuf_dvb *dvb, |
| 28 | struct module *module, | 28 | struct module *module, |
| 29 | void *adapter_priv); | 29 | void *adapter_priv, |
| 30 | struct device *device); | ||
| 30 | void videobuf_dvb_unregister(struct videobuf_dvb *dvb); | 31 | void videobuf_dvb_unregister(struct videobuf_dvb *dvb); |
| 31 | 32 | ||
| 32 | /* | 33 | /* |
diff --git a/include/media/video-buf.h b/include/media/video-buf.h index fff3fd0fbf94..1115a256969f 100644 --- a/include/media/video-buf.h +++ b/include/media/video-buf.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| 25 | #include <linux/videodev2.h> | 25 | #include <linux/videodev2.h> |
| 26 | #include <linux/poll.h> | ||
| 26 | 27 | ||
| 27 | #define UNSET (-1U) | 28 | #define UNSET (-1U) |
| 28 | 29 | ||
