Lines Matching refs:ctrl
266 struct v4l2_ext_control *ctrl)
268 switch (ctrl->id) {
270 ctrl->value = params->audio_sampling_freq;
273 ctrl->value = params->audio_encoding;
276 ctrl->value = params->audio_l2_bitrate;
279 ctrl->value = params->audio_ac3_bitrate;
282 ctrl->value = params->audio_mode;
285 ctrl->value = params->audio_mode_extension;
288 ctrl->value = params->audio_emphasis;
291 ctrl->value = params->audio_crc;
294 ctrl->value = params->audio_mute;
297 ctrl->value = params->video_encoding;
300 ctrl->value = params->video_aspect;
303 ctrl->value = params->video_b_frames;
306 ctrl->value = params->video_gop_size;
309 ctrl->value = params->video_gop_closure;
312 ctrl->value = params->video_bitrate_mode;
315 ctrl->value = params->video_bitrate;
318 ctrl->value = params->video_bitrate_peak;
321 ctrl->value = params->video_temporal_decimation;
324 ctrl->value = params->video_mute;
327 ctrl->value = params->video_mute_yuv;
330 ctrl->value = params->stream_type;
333 ctrl->value = params->stream_vbi_fmt;
336 ctrl->value = params->video_spatial_filter_mode;
339 ctrl->value = params->video_spatial_filter;
342 ctrl->value = params->video_luma_spatial_filter_type;
345 ctrl->value = params->video_chroma_spatial_filter_type;
348 ctrl->value = params->video_temporal_filter_mode;
351 ctrl->value = params->video_temporal_filter;
354 ctrl->value = params->video_median_filter_type;
357 ctrl->value = params->video_luma_median_filter_top;
360 ctrl->value = params->video_luma_median_filter_bottom;
363 ctrl->value = params->video_chroma_median_filter_top;
366 ctrl->value = params->video_chroma_median_filter_bottom;
369 ctrl->value = params->stream_insert_nav_packets;
380 struct v4l2_ext_control *ctrl)
382 switch (ctrl->id) {
386 params->audio_sampling_freq = ctrl->value;
392 if (ctrl->value != V4L2_MPEG_AUDIO_ENCODING_LAYER_2 &&
393 ctrl->value != V4L2_MPEG_AUDIO_ENCODING_AC3)
395 params->audio_encoding = ctrl->value;
400 params->audio_l2_bitrate = ctrl->value;
407 params->audio_ac3_bitrate = ctrl->value;
410 params->audio_mode = ctrl->value;
413 params->audio_mode_extension = ctrl->value;
416 params->audio_emphasis = ctrl->value;
419 params->audio_crc = ctrl->value;
422 params->audio_mute = ctrl->value;
425 params->video_aspect = ctrl->value;
428 int b = ctrl->value + 1;
430 params->video_b_frames = ctrl->value;
439 int gop = ctrl->value;
444 ctrl->value = params->video_gop_size;
448 params->video_gop_closure = ctrl->value;
455 ctrl->value != V4L2_MPEG_VIDEO_BITRATE_MODE_CBR)
457 params->video_bitrate_mode = ctrl->value;
462 params->video_bitrate = ctrl->value;
467 params->video_bitrate_peak = ctrl->value;
470 params->video_temporal_decimation = ctrl->value;
473 params->video_mute = (ctrl->value != 0);
476 params->video_mute_yuv = ctrl->value;
481 params->stream_type = ctrl->value;
493 params->stream_vbi_fmt = ctrl->value;
496 params->video_spatial_filter_mode = ctrl->value;
499 params->video_spatial_filter = ctrl->value;
502 params->video_luma_spatial_filter_type = ctrl->value;
505 params->video_chroma_spatial_filter_type = ctrl->value;
508 params->video_temporal_filter_mode = ctrl->value;
511 params->video_temporal_filter = ctrl->value;
514 params->video_median_filter_type = ctrl->value;
517 params->video_luma_median_filter_top = ctrl->value;
520 params->video_luma_median_filter_bottom = ctrl->value;
523 params->video_chroma_median_filter_top = ctrl->value;
526 params->video_chroma_median_filter_bottom = ctrl->value;
529 params->stream_insert_nav_packets = ctrl->value;
921 /* Check for correctness of the ctrl's value based on the data from
924 static int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl,
937 if (ctrl->value < qctrl->minimum || ctrl->value > qctrl->maximum)
940 if (menu_items[ctrl->value] == NULL ||
941 menu_items[ctrl->value][0] == '\0')
945 (ctrl->value & ~qctrl->maximum))
958 struct v4l2_ext_control *ctrl = ctrls->controls + i;
960 err = cx2341x_get_ctrl(params, ctrl);
969 struct v4l2_ext_control *ctrl = ctrls->controls + i;
973 qctrl.id = ctrl->id;
979 err = v4l2_ctrl_check(ctrl, &qctrl, menu_items);
982 err = cx2341x_set_ctrl(params, busy, ctrl);
1190 struct v4l2_ext_control ctrl;
1194 ctrl.id = id;
1195 if (cx2341x_get_ctrl(p, &ctrl))
1197 while (ctrl.value-- && *menu) menu++;
1295 static inline struct cx2341x_handler *to_cxhdl(struct v4l2_ctrl *ctrl)
1297 return container_of(ctrl->handler, struct cx2341x_handler, hdl);
1315 /* ctrl->handler->lock is held, so it is safe to access cur.val */
1316 static inline int cx2341x_neq(struct v4l2_ctrl *ctrl)
1318 return ctrl && ctrl->val != ctrl->cur.val;
1321 static int cx2341x_try_ctrl(struct v4l2_ctrl *ctrl)
1323 struct cx2341x_handler *hdl = to_cxhdl(ctrl);
1324 s32 val = ctrl->val;
1326 switch (ctrl->id) {
1361 static int cx2341x_s_ctrl(struct v4l2_ctrl *ctrl)
1371 struct cx2341x_handler *hdl = to_cxhdl(ctrl);
1372 s32 val = ctrl->val;
1376 switch (ctrl->id) {