diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/media/cx2341x.h | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h index 9ebe8558b9b6..8d08ebfe20b7 100644 --- a/include/media/cx2341x.h +++ b/include/media/cx2341x.h | |||
| @@ -19,6 +19,8 @@ | |||
| 19 | #ifndef CX2341X_H | 19 | #ifndef CX2341X_H |
| 20 | #define CX2341X_H | 20 | #define CX2341X_H |
| 21 | 21 | ||
| 22 | #include <media/v4l2-ctrls.h> | ||
| 23 | |||
| 22 | enum cx2341x_port { | 24 | enum cx2341x_port { |
| 23 | CX2341X_PORT_MEMORY = 0, | 25 | CX2341X_PORT_MEMORY = 0, |
| 24 | CX2341X_PORT_STREAMING = 1, | 26 | CX2341X_PORT_STREAMING = 1, |
| @@ -99,6 +101,101 @@ int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, int busy, | |||
| 99 | void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p); | 101 | void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p); |
| 100 | void cx2341x_log_status(const struct cx2341x_mpeg_params *p, const char *prefix); | 102 | void cx2341x_log_status(const struct cx2341x_mpeg_params *p, const char *prefix); |
| 101 | 103 | ||
| 104 | struct cx2341x_handler; | ||
| 105 | |||
| 106 | struct cx2341x_handler_ops { | ||
| 107 | /* needed for the video clock freq */ | ||
| 108 | int (*s_audio_sampling_freq)(struct cx2341x_handler *hdl, u32 val); | ||
| 109 | /* needed for dualwatch */ | ||
| 110 | int (*s_audio_mode)(struct cx2341x_handler *hdl, u32 val); | ||
| 111 | /* needed for setting up the video resolution */ | ||
| 112 | int (*s_video_encoding)(struct cx2341x_handler *hdl, u32 val); | ||
| 113 | /* needed for setting up the sliced vbi insertion data structures */ | ||
| 114 | int (*s_stream_vbi_fmt)(struct cx2341x_handler *hdl, u32 val); | ||
| 115 | }; | ||
| 116 | |||
| 117 | struct cx2341x_handler { | ||
| 118 | u32 capabilities; | ||
| 119 | enum cx2341x_port port; | ||
| 120 | u16 width; | ||
| 121 | u16 height; | ||
| 122 | u16 is_50hz; | ||
| 123 | u32 audio_properties; | ||
| 124 | |||
| 125 | struct v4l2_ctrl_handler hdl; | ||
| 126 | void *priv; | ||
| 127 | cx2341x_mbox_func func; | ||
| 128 | const struct cx2341x_handler_ops *ops; | ||
| 129 | |||
| 130 | struct v4l2_ctrl *stream_vbi_fmt; | ||
| 131 | |||
| 132 | struct { | ||
| 133 | /* audio cluster */ | ||
| 134 | struct v4l2_ctrl *audio_sampling_freq; | ||
| 135 | struct v4l2_ctrl *audio_encoding; | ||
| 136 | struct v4l2_ctrl *audio_l2_bitrate; | ||
| 137 | struct v4l2_ctrl *audio_mode; | ||
| 138 | struct v4l2_ctrl *audio_mode_extension; | ||
| 139 | struct v4l2_ctrl *audio_emphasis; | ||
| 140 | struct v4l2_ctrl *audio_crc; | ||
| 141 | struct v4l2_ctrl *audio_ac3_bitrate; | ||
| 142 | }; | ||
| 143 | |||
| 144 | struct { | ||
| 145 | /* video gop cluster */ | ||
| 146 | struct v4l2_ctrl *video_b_frames; | ||
| 147 | struct v4l2_ctrl *video_gop_size; | ||
| 148 | }; | ||
| 149 | |||
| 150 | struct { | ||
| 151 | /* stream type cluster */ | ||
| 152 | struct v4l2_ctrl *stream_type; | ||
| 153 | struct v4l2_ctrl *video_encoding; | ||
| 154 | struct v4l2_ctrl *video_bitrate_mode; | ||
| 155 | struct v4l2_ctrl *video_bitrate; | ||
| 156 | struct v4l2_ctrl *video_bitrate_peak; | ||
| 157 | }; | ||
| 158 | |||
| 159 | struct { | ||
| 160 | /* video mute cluster */ | ||
| 161 | struct v4l2_ctrl *video_mute; | ||
| 162 | struct v4l2_ctrl *video_mute_yuv; | ||
| 163 | }; | ||
| 164 | |||
| 165 | struct { | ||
| 166 | /* video filter mode cluster */ | ||
| 167 | struct v4l2_ctrl *video_spatial_filter_mode; | ||
| 168 | struct v4l2_ctrl *video_temporal_filter_mode; | ||
| 169 | struct v4l2_ctrl *video_median_filter_type; | ||
| 170 | }; | ||
| 171 | |||
| 172 | struct { | ||
| 173 | /* video filter type cluster */ | ||
| 174 | struct v4l2_ctrl *video_luma_spatial_filter_type; | ||
| 175 | struct v4l2_ctrl *video_chroma_spatial_filter_type; | ||
| 176 | }; | ||
| 177 | |||
| 178 | struct { | ||
| 179 | /* video filter cluster */ | ||
| 180 | struct v4l2_ctrl *video_spatial_filter; | ||
| 181 | struct v4l2_ctrl *video_temporal_filter; | ||
| 182 | }; | ||
| 183 | |||
| 184 | struct { | ||
| 185 | /* video median cluster */ | ||
| 186 | struct v4l2_ctrl *video_luma_median_filter_top; | ||
| 187 | struct v4l2_ctrl *video_luma_median_filter_bottom; | ||
| 188 | struct v4l2_ctrl *video_chroma_median_filter_top; | ||
| 189 | struct v4l2_ctrl *video_chroma_median_filter_bottom; | ||
| 190 | }; | ||
| 191 | }; | ||
| 192 | |||
| 193 | int cx2341x_handler_init(struct cx2341x_handler *cxhdl, | ||
| 194 | unsigned nr_of_controls_hint); | ||
| 195 | void cx2341x_handler_set_50hz(struct cx2341x_handler *cxhdl, int is_50hz); | ||
| 196 | int cx2341x_handler_setup(struct cx2341x_handler *cxhdl); | ||
| 197 | void cx2341x_handler_set_busy(struct cx2341x_handler *cxhdl, int busy); | ||
| 198 | |||
| 102 | /* Firmware names */ | 199 | /* Firmware names */ |
| 103 | #define CX2341X_FIRM_ENC_FILENAME "v4l-cx2341x-enc.fw" | 200 | #define CX2341X_FIRM_ENC_FILENAME "v4l-cx2341x-enc.fw" |
| 104 | /* Decoder firmware for the cx23415 only */ | 201 | /* Decoder firmware for the cx23415 only */ |
