• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/media/video/

Lines Matching refs:hdl

1246 	return container_of(ctrl->handler, struct cx2341x_handler, hdl);
1249 static int cx2341x_hdl_api(struct cx2341x_handler *hdl,
1261 return hdl->func(hdl->priv, cmd, args, 0, data);
1272 struct cx2341x_handler *hdl = to_cxhdl(ctrl);
1279 int gop = hdl->video_gop_size->val;
1286 hdl->video_gop_size->val = gop;
1292 hdl->video_encoding->val =
1293 (hdl->stream_type->val == V4L2_MPEG_STREAM_TYPE_MPEG1_SS ||
1294 hdl->stream_type->val == V4L2_MPEG_STREAM_TYPE_MPEG1_VCD) ?
1297 if (hdl->video_encoding->val == V4L2_MPEG_VIDEO_ENCODING_MPEG_1)
1299 hdl->video_bitrate_mode->val =
1302 if (hdl->video_bitrate_mode->val == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR &&
1303 hdl->video_bitrate_peak->val < hdl->video_bitrate->val)
1304 hdl->video_bitrate_peak->val = hdl->video_bitrate->val;
1320 struct cx2341x_handler *hdl = to_cxhdl(ctrl);
1327 if (hdl->ops && hdl->ops->s_stream_vbi_fmt)
1328 return hdl->ops->s_stream_vbi_fmt(hdl, val);
1332 return cx2341x_hdl_api(hdl,
1336 return cx2341x_hdl_api(hdl, CX2341X_ENC_SET_GOP_CLOSURE, 1, val);
1339 return cx2341x_hdl_api(hdl, CX2341X_ENC_MUTE_AUDIO, 1, val);
1342 return cx2341x_hdl_api(hdl,
1346 return cx2341x_hdl_api(hdl, CX2341X_ENC_MISC, 2, 7, val);
1350 props = (hdl->audio_sampling_freq->val << 0) |
1351 (hdl->audio_mode->val << 8) |
1352 (hdl->audio_mode_extension->val << 10) |
1353 (hdl->audio_crc->val << 14);
1354 if (hdl->audio_emphasis->val == V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17)
1357 props |= hdl->audio_emphasis->val << 12;
1359 if (hdl->audio_encoding->val == V4L2_MPEG_AUDIO_ENCODING_AC3) {
1363 (hdl->audio_ac3_bitrate->val << 4) |
1368 ((3 - hdl->audio_encoding->val) << 2) |
1369 ((1 + hdl->audio_l2_bitrate->val) << 4);
1371 err = cx2341x_hdl_api(hdl,
1376 hdl->audio_properties = props;
1377 if (hdl->audio_ac3_bitrate) {
1378 int is_ac3 = hdl->audio_encoding->val ==
1381 v4l2_ctrl_activate(hdl->audio_ac3_bitrate, is_ac3);
1382 v4l2_ctrl_activate(hdl->audio_l2_bitrate, !is_ac3);
1384 v4l2_ctrl_activate(hdl->audio_mode_extension,
1385 hdl->audio_mode->val == V4L2_MPEG_AUDIO_MODE_JOINT_STEREO);
1386 if (cx2341x_neq(hdl->audio_sampling_freq) &&
1387 hdl->ops && hdl->ops->s_audio_sampling_freq)
1388 return hdl->ops->s_audio_sampling_freq(hdl, hdl->audio_sampling_freq->val);
1389 if (cx2341x_neq(hdl->audio_mode) &&
1390 hdl->ops && hdl->ops->s_audio_mode)
1391 return hdl->ops->s_audio_mode(hdl, hdl->audio_mode->val);
1396 return cx2341x_hdl_api(hdl, CX2341X_ENC_SET_GOP_PROPERTIES, 2,
1397 hdl->video_gop_size->val,
1398 hdl->video_b_frames->val + 1);
1402 err = cx2341x_hdl_api(hdl,
1407 err = cx2341x_hdl_api(hdl, CX2341X_ENC_SET_BIT_RATE, 5,
1408 hdl->video_bitrate_mode->val,
1409 hdl->video_bitrate->val,
1410 hdl->video_bitrate_peak->val / 400, 0, 0);
1414 v4l2_ctrl_activate(hdl->video_bitrate_mode,
1415 hdl->video_encoding->val != V4L2_MPEG_VIDEO_ENCODING_MPEG_1);
1416 v4l2_ctrl_activate(hdl->video_bitrate_peak,
1417 hdl->video_bitrate_mode->val != V4L2_MPEG_VIDEO_BITRATE_MODE_CBR);
1418 if (cx2341x_neq(hdl->video_encoding) &&
1419 hdl->ops && hdl->ops->s_video_encoding)
1420 return hdl->ops->s_video_encoding(hdl, hdl->video_encoding->val);
1425 return cx2341x_hdl_api(hdl, CX2341X_ENC_MUTE_VIDEO, 1,
1426 hdl->video_mute->val |
1427 (hdl->video_mute_yuv->val << 8));
1433 err = cx2341x_hdl_api(hdl, CX2341X_ENC_SET_DNR_FILTER_MODE, 2,
1434 hdl->video_spatial_filter_mode->val |
1435 (hdl->video_temporal_filter_mode->val << 1),
1436 hdl->video_median_filter_type->val);
1440 active_filter = hdl->video_spatial_filter_mode->val !=
1442 v4l2_ctrl_activate(hdl->video_spatial_filter, active_filter);
1443 v4l2_ctrl_activate(hdl->video_luma_spatial_filter_type, active_filter);
1444 v4l2_ctrl_activate(hdl->video_chroma_spatial_filter_type, active_filter);
1445 active_filter = hdl->video_temporal_filter_mode->val !=
1447 v4l2_ctrl_activate(hdl->video_temporal_filter, active_filter);
1448 active_filter = hdl->video_median_filter_type->val !=
1450 v4l2_ctrl_activate(hdl->video_luma_median_filter_bottom, active_filter);
1451 v4l2_ctrl_activate(hdl->video_luma_median_filter_top, active_filter);
1452 v4l2_ctrl_activate(hdl->video_chroma_median_filter_bottom, active_filter);
1453 v4l2_ctrl_activate(hdl->video_chroma_median_filter_top, active_filter);
1459 return cx2341x_hdl_api(hdl,
1461 hdl->video_luma_spatial_filter_type->val,
1462 hdl->video_chroma_spatial_filter_type->val);
1466 return cx2341x_hdl_api(hdl, CX2341X_ENC_SET_DNR_FILTER_PROPS, 2,
1467 hdl->video_spatial_filter->val,
1468 hdl->video_temporal_filter->val);
1472 return cx2341x_hdl_api(hdl, CX2341X_ENC_SET_CORING_LEVELS, 4,
1473 hdl->video_luma_median_filter_bottom->val,
1474 hdl->video_luma_median_filter_top->val,
1475 hdl->video_chroma_median_filter_bottom->val,
1476 hdl->video_chroma_median_filter_top->val);
1486 static struct v4l2_ctrl *cx2341x_ctrl_new_custom(struct v4l2_ctrl_handler *hdl,
1505 return v4l2_ctrl_new_custom(hdl, &cfg, NULL);
1508 static struct v4l2_ctrl *cx2341x_ctrl_new_std(struct v4l2_ctrl_handler *hdl,
1511 return v4l2_ctrl_new_std(hdl, &cx2341x_ops, id, min, max, step, def);
1514 static struct v4l2_ctrl *cx2341x_ctrl_new_menu(struct v4l2_ctrl_handler *hdl,
1517 return v4l2_ctrl_new_std_menu(hdl, &cx2341x_ops, id, max, mask, def);
1523 struct v4l2_ctrl_handler *hdl = &cxhdl->hdl;
1532 v4l2_ctrl_handler_init(hdl, nr_of_controls_hint);
1536 cxhdl->stream_type = cx2341x_ctrl_new_menu(hdl,
1540 cxhdl->stream_vbi_fmt = cx2341x_ctrl_new_menu(hdl,
1544 cxhdl->audio_sampling_freq = cx2341x_ctrl_new_menu(hdl,
1548 cxhdl->audio_encoding = cx2341x_ctrl_new_menu(hdl,
1552 cxhdl->audio_l2_bitrate = cx2341x_ctrl_new_menu(hdl,
1556 cxhdl->audio_mode = cx2341x_ctrl_new_menu(hdl,
1560 cxhdl->audio_mode_extension = cx2341x_ctrl_new_menu(hdl,
1564 cxhdl->audio_emphasis = cx2341x_ctrl_new_menu(hdl,
1568 cxhdl->audio_crc = cx2341x_ctrl_new_menu(hdl,
1573 cx2341x_ctrl_new_std(hdl, V4L2_CID_MPEG_AUDIO_MUTE, 0, 1, 1, 0);
1575 cxhdl->audio_ac3_bitrate = cx2341x_ctrl_new_menu(hdl,
1579 cxhdl->video_encoding = cx2341x_ctrl_new_menu(hdl,
1583 cx2341x_ctrl_new_menu(hdl,
1587 cxhdl->video_b_frames = cx2341x_ctrl_new_std(hdl,
1589 cxhdl->video_gop_size = cx2341x_ctrl_new_std(hdl,
1592 cx2341x_ctrl_new_std(hdl, V4L2_CID_MPEG_VIDEO_GOP_CLOSURE, 0, 1, 1, 1);
1593 cxhdl->video_bitrate_mode = cx2341x_ctrl_new_menu(hdl,
1597 cxhdl->video_bitrate = cx2341x_ctrl_new_std(hdl,
1600 cxhdl->video_bitrate_peak = cx2341x_ctrl_new_std(hdl,
1603 cx2341x_ctrl_new_std(hdl,
1605 cxhdl->video_mute = cx2341x_ctrl_new_std(hdl,
1607 cxhdl->video_mute_yuv = cx2341x_ctrl_new_std(hdl,
1611 cxhdl->video_spatial_filter_mode = cx2341x_ctrl_new_custom(hdl,
1616 cxhdl->video_spatial_filter = cx2341x_ctrl_new_custom(hdl,
1619 cxhdl->video_luma_spatial_filter_type = cx2341x_ctrl_new_custom(hdl,
1625 cxhdl->video_chroma_spatial_filter_type = cx2341x_ctrl_new_custom(hdl,
1631 cxhdl->video_temporal_filter_mode = cx2341x_ctrl_new_custom(hdl,
1637 cxhdl->video_temporal_filter = cx2341x_ctrl_new_custom(hdl,
1640 cxhdl->video_median_filter_type = cx2341x_ctrl_new_custom(hdl,
1646 cxhdl->video_luma_median_filter_bottom = cx2341x_ctrl_new_custom(hdl,
1649 cxhdl->video_luma_median_filter_top = cx2341x_ctrl_new_custom(hdl,
1652 cxhdl->video_chroma_median_filter_bottom = cx2341x_ctrl_new_custom(hdl,
1655 cxhdl->video_chroma_median_filter_top = cx2341x_ctrl_new_custom(hdl,
1658 cx2341x_ctrl_new_custom(hdl, V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS,
1661 if (hdl->error) {
1662 int err = hdl->error;
1664 v4l2_ctrl_handler_free(hdl);
1708 return v4l2_ctrl_handler_setup(&cxhdl->hdl);