Lines Matching refs:vfd

40 #define is_valid_ioctl(vfd, cmd) test_bit(_IOC_NR(cmd), (vfd)->valid_ioctls)  argument
918 struct video_device *vfd = video_devdata(file); in check_fmt() local
919 const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops; in check_fmt()
920 bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER; in check_fmt()
921 bool is_vbi = vfd->vfl_type == VFL_TYPE_VBI; in check_fmt()
922 bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR; in check_fmt()
923 bool is_rx = vfd->vfl_dir != VFL_DIR_TX; in check_fmt()
924 bool is_tx = vfd->vfl_dir != VFL_DIR_RX; in check_fmt()
1048 struct video_device *vfd; in v4l_g_priority() local
1051 vfd = video_devdata(file); in v4l_g_priority()
1052 *p = v4l2_prio_max(vfd->prio); in v4l_g_priority()
1059 struct video_device *vfd; in v4l_s_priority() local
1063 vfd = video_devdata(file); in v4l_s_priority()
1064 if (!test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags)) in v4l_s_priority()
1067 return v4l2_prio_change(vfd->prio, &vfh->prio, *p); in v4l_s_priority()
1073 struct video_device *vfd = video_devdata(file); in v4l_enuminput() local
1082 if (is_valid_ioctl(vfd, VIDIOC_S_STD)) in v4l_enuminput()
1091 struct video_device *vfd = video_devdata(file); in v4l_enumoutput() local
1100 if (is_valid_ioctl(vfd, VIDIOC_S_STD)) in v4l_enumoutput()
1110 struct video_device *vfd = video_devdata(file); in v4l_enum_fmt() local
1111 bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER; in v4l_enum_fmt()
1112 bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR; in v4l_enum_fmt()
1113 bool is_rx = vfd->vfl_dir != VFL_DIR_TX; in v4l_enum_fmt()
1114 bool is_tx = vfd->vfl_dir != VFL_DIR_RX; in v4l_enum_fmt()
1149 struct video_device *vfd = video_devdata(file); in v4l_g_fmt() local
1150 bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER; in v4l_g_fmt()
1151 bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR; in v4l_g_fmt()
1152 bool is_rx = vfd->vfl_dir != VFL_DIR_TX; in v4l_g_fmt()
1153 bool is_tx = vfd->vfl_dir != VFL_DIR_RX; in v4l_g_fmt()
1241 struct video_device *vfd = video_devdata(file); in v4l_s_fmt() local
1242 bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER; in v4l_s_fmt()
1243 bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR; in v4l_s_fmt()
1244 bool is_rx = vfd->vfl_dir != VFL_DIR_TX; in v4l_s_fmt()
1245 bool is_tx = vfd->vfl_dir != VFL_DIR_RX; in v4l_s_fmt()
1320 struct video_device *vfd = video_devdata(file); in v4l_try_fmt() local
1321 bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER; in v4l_try_fmt()
1322 bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR; in v4l_try_fmt()
1323 bool is_rx = vfd->vfl_dir != VFL_DIR_TX; in v4l_try_fmt()
1324 bool is_tx = vfd->vfl_dir != VFL_DIR_RX; in v4l_try_fmt()
1410 struct video_device *vfd = video_devdata(file); in v4l_g_tuner() local
1414 p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_g_tuner()
1425 struct video_device *vfd = video_devdata(file); in v4l_s_tuner() local
1428 p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_s_tuner()
1448 struct video_device *vfd = video_devdata(file); in v4l_g_frequency() local
1451 if (vfd->vfl_type == VFL_TYPE_SDR) in v4l_g_frequency()
1454 p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_g_frequency()
1462 struct video_device *vfd = video_devdata(file); in v4l_s_frequency() local
1466 if (vfd->vfl_type == VFL_TYPE_SDR) { in v4l_s_frequency()
1470 type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_s_frequency()
1481 struct video_device *vfd = video_devdata(file); in v4l_enumstd() local
1483 v4l2_std_id id = vfd->tvnorms, curr_id = 0; in v4l_enumstd()
1518 struct video_device *vfd = video_devdata(file); in v4l_s_std() local
1521 norm = id & vfd->tvnorms; in v4l_s_std()
1522 if (vfd->tvnorms && !norm) /* Check if std is supported */ in v4l_s_std()
1532 struct video_device *vfd = video_devdata(file); in v4l_querystd() local
1543 *p = vfd->tvnorms; in v4l_querystd()
1550 struct video_device *vfd = video_devdata(file); in v4l_s_hw_freq_seek() local
1555 if (vfd->vfl_type == VFL_TYPE_SDR) in v4l_s_hw_freq_seek()
1558 type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_s_hw_freq_seek()
1674 struct video_device *vfd = video_devdata(file); in v4l_queryctrl() local
1677 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_queryctrl()
1681 if (vfd->ctrl_handler) in v4l_queryctrl()
1682 return v4l2_queryctrl(vfd->ctrl_handler, p); in v4l_queryctrl()
1691 struct video_device *vfd = video_devdata(file); in v4l_query_ext_ctrl() local
1694 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_query_ext_ctrl()
1698 if (vfd->ctrl_handler) in v4l_query_ext_ctrl()
1699 return v4l2_query_ext_ctrl(vfd->ctrl_handler, p); in v4l_query_ext_ctrl()
1708 struct video_device *vfd = video_devdata(file); in v4l_querymenu() local
1711 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_querymenu()
1715 if (vfd->ctrl_handler) in v4l_querymenu()
1716 return v4l2_querymenu(vfd->ctrl_handler, p); in v4l_querymenu()
1725 struct video_device *vfd = video_devdata(file); in v4l_g_ctrl() local
1728 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_g_ctrl()
1734 if (vfd->ctrl_handler) in v4l_g_ctrl()
1735 return v4l2_g_ctrl(vfd->ctrl_handler, p); in v4l_g_ctrl()
1759 struct video_device *vfd = video_devdata(file); in v4l_s_ctrl() local
1762 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_s_ctrl()
1768 if (vfd->ctrl_handler) in v4l_s_ctrl()
1769 return v4l2_s_ctrl(NULL, vfd->ctrl_handler, p); in v4l_s_ctrl()
1788 struct video_device *vfd = video_devdata(file); in v4l_g_ext_ctrls() local
1791 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_g_ext_ctrls()
1796 if (vfd->ctrl_handler) in v4l_g_ext_ctrls()
1797 return v4l2_g_ext_ctrls(vfd->ctrl_handler, p); in v4l_g_ext_ctrls()
1807 struct video_device *vfd = video_devdata(file); in v4l_s_ext_ctrls() local
1810 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_s_ext_ctrls()
1815 if (vfd->ctrl_handler) in v4l_s_ext_ctrls()
1816 return v4l2_s_ext_ctrls(NULL, vfd->ctrl_handler, p); in v4l_s_ext_ctrls()
1826 struct video_device *vfd = video_devdata(file); in v4l_try_ext_ctrls() local
1829 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_try_ext_ctrls()
1834 if (vfd->ctrl_handler) in v4l_try_ext_ctrls()
1835 return v4l2_try_ext_ctrls(vfd->ctrl_handler, p); in v4l_try_ext_ctrls()
1936 struct video_device *vfd = video_devdata(file); in v4l_log_status() local
1939 if (vfd->v4l2_dev) in v4l_log_status()
1941 vfd->v4l2_dev->name); in v4l_log_status()
1943 if (vfd->v4l2_dev) in v4l_log_status()
1945 vfd->v4l2_dev->name); in v4l_log_status()
1954 struct video_device *vfd = video_devdata(file); in v4l_dbg_g_register() local
1961 if (vfd->v4l2_dev == NULL) in v4l_dbg_g_register()
1963 v4l2_device_for_each_subdev(sd, vfd->v4l2_dev) in v4l_dbg_g_register()
1982 struct video_device *vfd = video_devdata(file); in v4l_dbg_s_register() local
1989 if (vfd->v4l2_dev == NULL) in v4l_dbg_s_register()
1991 v4l2_device_for_each_subdev(sd, vfd->v4l2_dev) in v4l_dbg_s_register()
2009 struct video_device *vfd = video_devdata(file); in v4l_dbg_g_chip_info() local
2020 strlcpy(p->name, vfd->v4l2_dev->name, sizeof(p->name)); in v4l_dbg_g_chip_info()
2028 if (vfd->v4l2_dev == NULL) in v4l_dbg_g_chip_info()
2030 v4l2_device_for_each_subdev(sd, vfd->v4l2_dev) { in v4l_dbg_g_chip_info()
2084 struct video_device *vfd = video_devdata(file); in v4l_enum_freq_bands() local
2089 if (vfd->vfl_type == VFL_TYPE_SDR) { in v4l_enum_freq_bands()
2094 type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_enum_freq_bands()
2104 if (is_valid_ioctl(vfd, VIDIOC_G_TUNER)) { in v4l_enum_freq_bands()
2122 if (is_valid_ioctl(vfd, VIDIOC_G_MODULATOR)) { in v4l_enum_freq_bands()
2335 struct video_device *vfd = video_devdata(file); in __video_do_ioctl() local
2336 const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops; in __video_do_ioctl()
2342 int dev_debug = vfd->dev_debug; in __video_do_ioctl()
2347 video_device_node_name(vfd)); in __video_do_ioctl()
2351 if (test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags)) in __video_do_ioctl()
2357 if (!test_bit(_IOC_NR(cmd), vfd->valid_ioctls) && in __video_do_ioctl()
2362 ret = v4l2_prio_check(vfd->prio, vfh->prio); in __video_do_ioctl()
2376 const void *p = vfd->ioctl_ops; in __video_do_ioctl()
2386 vfh ? v4l2_prio_check(vfd->prio, vfh->prio) >= 0 : 0, in __video_do_ioctl()
2396 v4l_printk_ioctl(video_device_node_name(vfd), cmd); in __video_do_ioctl()