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