Lines Matching refs:vfd
39 #define is_valid_ioctl(vfd, cmd) test_bit(_IOC_NR(cmd), (vfd)->valid_ioctls) argument
921 struct video_device *vfd = video_devdata(file); in check_fmt() local
922 const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops; in check_fmt()
923 bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER; in check_fmt()
924 bool is_vbi = vfd->vfl_type == VFL_TYPE_VBI; in check_fmt()
925 bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR; in check_fmt()
926 bool is_rx = vfd->vfl_dir != VFL_DIR_TX; in check_fmt()
927 bool is_tx = vfd->vfl_dir != VFL_DIR_RX; in check_fmt()
1056 struct video_device *vfd; in v4l_g_priority() local
1059 vfd = video_devdata(file); in v4l_g_priority()
1060 *p = v4l2_prio_max(vfd->prio); in v4l_g_priority()
1067 struct video_device *vfd; in v4l_s_priority() local
1071 vfd = video_devdata(file); in v4l_s_priority()
1072 if (!test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags)) in v4l_s_priority()
1075 return v4l2_prio_change(vfd->prio, &vfh->prio, *p); in v4l_s_priority()
1081 struct video_device *vfd = video_devdata(file); in v4l_enuminput() local
1090 if (is_valid_ioctl(vfd, VIDIOC_S_STD)) in v4l_enuminput()
1099 struct video_device *vfd = video_devdata(file); in v4l_enumoutput() local
1108 if (is_valid_ioctl(vfd, VIDIOC_S_STD)) in v4l_enumoutput()
1295 struct video_device *vfd = video_devdata(file); in v4l_enum_fmt() local
1296 bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER; in v4l_enum_fmt()
1297 bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR; in v4l_enum_fmt()
1298 bool is_rx = vfd->vfl_dir != VFL_DIR_TX; in v4l_enum_fmt()
1299 bool is_tx = vfd->vfl_dir != VFL_DIR_RX; in v4l_enum_fmt()
1348 struct video_device *vfd = video_devdata(file); in v4l_g_fmt() local
1349 bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER; in v4l_g_fmt()
1350 bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR; in v4l_g_fmt()
1351 bool is_rx = vfd->vfl_dir != VFL_DIR_TX; in v4l_g_fmt()
1352 bool is_tx = vfd->vfl_dir != VFL_DIR_RX; in v4l_g_fmt()
1444 struct video_device *vfd = video_devdata(file); in v4l_s_fmt() local
1445 bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER; in v4l_s_fmt()
1446 bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR; in v4l_s_fmt()
1447 bool is_rx = vfd->vfl_dir != VFL_DIR_TX; in v4l_s_fmt()
1448 bool is_tx = vfd->vfl_dir != VFL_DIR_RX; in v4l_s_fmt()
1528 struct video_device *vfd = video_devdata(file); in v4l_try_fmt() local
1529 bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER; in v4l_try_fmt()
1530 bool is_sdr = vfd->vfl_type == VFL_TYPE_SDR; in v4l_try_fmt()
1531 bool is_rx = vfd->vfl_dir != VFL_DIR_TX; in v4l_try_fmt()
1532 bool is_tx = vfd->vfl_dir != VFL_DIR_RX; in v4l_try_fmt()
1623 struct video_device *vfd = video_devdata(file); in v4l_g_tuner() local
1627 p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_g_tuner()
1638 struct video_device *vfd = video_devdata(file); in v4l_s_tuner() local
1641 p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_s_tuner()
1649 struct video_device *vfd = video_devdata(file); in v4l_g_modulator() local
1653 if (vfd->vfl_type == VFL_TYPE_RADIO) in v4l_g_modulator()
1665 struct video_device *vfd = video_devdata(file); in v4l_s_modulator() local
1668 if (vfd->vfl_type == VFL_TYPE_RADIO) in v4l_s_modulator()
1677 struct video_device *vfd = video_devdata(file); in v4l_g_frequency() local
1680 if (vfd->vfl_type == VFL_TYPE_SDR) in v4l_g_frequency()
1683 p->type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_g_frequency()
1691 struct video_device *vfd = video_devdata(file); in v4l_s_frequency() local
1695 if (vfd->vfl_type == VFL_TYPE_SDR) { in v4l_s_frequency()
1699 type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_s_frequency()
1710 struct video_device *vfd = video_devdata(file); in v4l_enumstd() local
1712 v4l2_std_id id = vfd->tvnorms, curr_id = 0; in v4l_enumstd()
1747 struct video_device *vfd = video_devdata(file); in v4l_s_std() local
1750 norm = id & vfd->tvnorms; in v4l_s_std()
1751 if (vfd->tvnorms && !norm) /* Check if std is supported */ in v4l_s_std()
1761 struct video_device *vfd = video_devdata(file); in v4l_querystd() local
1772 *p = vfd->tvnorms; in v4l_querystd()
1779 struct video_device *vfd = video_devdata(file); in v4l_s_hw_freq_seek() local
1784 if (vfd->vfl_type == VFL_TYPE_SDR) in v4l_s_hw_freq_seek()
1787 type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_s_hw_freq_seek()
1905 struct video_device *vfd = video_devdata(file); in v4l_queryctrl() local
1908 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_queryctrl()
1912 if (vfd->ctrl_handler) in v4l_queryctrl()
1913 return v4l2_queryctrl(vfd->ctrl_handler, p); in v4l_queryctrl()
1922 struct video_device *vfd = video_devdata(file); in v4l_query_ext_ctrl() local
1925 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_query_ext_ctrl()
1929 if (vfd->ctrl_handler) in v4l_query_ext_ctrl()
1930 return v4l2_query_ext_ctrl(vfd->ctrl_handler, p); in v4l_query_ext_ctrl()
1939 struct video_device *vfd = video_devdata(file); in v4l_querymenu() local
1942 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_querymenu()
1946 if (vfd->ctrl_handler) in v4l_querymenu()
1947 return v4l2_querymenu(vfd->ctrl_handler, p); in v4l_querymenu()
1956 struct video_device *vfd = video_devdata(file); in v4l_g_ctrl() local
1959 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_g_ctrl()
1965 if (vfd->ctrl_handler) in v4l_g_ctrl()
1966 return v4l2_g_ctrl(vfd->ctrl_handler, p); in v4l_g_ctrl()
1990 struct video_device *vfd = video_devdata(file); in v4l_s_ctrl() local
1993 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_s_ctrl()
1999 if (vfd->ctrl_handler) in v4l_s_ctrl()
2000 return v4l2_s_ctrl(NULL, vfd->ctrl_handler, p); in v4l_s_ctrl()
2019 struct video_device *vfd = video_devdata(file); in v4l_g_ext_ctrls() local
2022 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_g_ext_ctrls()
2027 if (vfd->ctrl_handler) in v4l_g_ext_ctrls()
2028 return v4l2_g_ext_ctrls(vfd->ctrl_handler, p); in v4l_g_ext_ctrls()
2038 struct video_device *vfd = video_devdata(file); in v4l_s_ext_ctrls() local
2041 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_s_ext_ctrls()
2046 if (vfd->ctrl_handler) in v4l_s_ext_ctrls()
2047 return v4l2_s_ext_ctrls(NULL, vfd->ctrl_handler, p); in v4l_s_ext_ctrls()
2057 struct video_device *vfd = video_devdata(file); in v4l_try_ext_ctrls() local
2060 test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; in v4l_try_ext_ctrls()
2065 if (vfd->ctrl_handler) in v4l_try_ext_ctrls()
2066 return v4l2_try_ext_ctrls(vfd->ctrl_handler, p); in v4l_try_ext_ctrls()
2167 struct video_device *vfd = video_devdata(file); in v4l_log_status() local
2170 if (vfd->v4l2_dev) in v4l_log_status()
2172 vfd->v4l2_dev->name); in v4l_log_status()
2174 if (vfd->v4l2_dev) in v4l_log_status()
2176 vfd->v4l2_dev->name); in v4l_log_status()
2185 struct video_device *vfd = video_devdata(file); in v4l_dbg_g_register() local
2192 if (vfd->v4l2_dev == NULL) in v4l_dbg_g_register()
2194 v4l2_device_for_each_subdev(sd, vfd->v4l2_dev) in v4l_dbg_g_register()
2213 struct video_device *vfd = video_devdata(file); in v4l_dbg_s_register() local
2220 if (vfd->v4l2_dev == NULL) in v4l_dbg_s_register()
2222 v4l2_device_for_each_subdev(sd, vfd->v4l2_dev) in v4l_dbg_s_register()
2240 struct video_device *vfd = video_devdata(file); in v4l_dbg_g_chip_info() local
2251 strlcpy(p->name, vfd->v4l2_dev->name, sizeof(p->name)); in v4l_dbg_g_chip_info()
2259 if (vfd->v4l2_dev == NULL) in v4l_dbg_g_chip_info()
2261 v4l2_device_for_each_subdev(sd, vfd->v4l2_dev) { in v4l_dbg_g_chip_info()
2315 struct video_device *vfd = video_devdata(file); in v4l_enum_freq_bands() local
2320 if (vfd->vfl_type == VFL_TYPE_SDR) { in v4l_enum_freq_bands()
2325 type = (vfd->vfl_type == VFL_TYPE_RADIO) ? in v4l_enum_freq_bands()
2335 if (is_valid_ioctl(vfd, VIDIOC_G_TUNER)) { in v4l_enum_freq_bands()
2353 if (is_valid_ioctl(vfd, VIDIOC_G_MODULATOR)) { in v4l_enum_freq_bands()
2566 struct video_device *vfd = video_devdata(file); in __video_do_ioctl() local
2567 const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops; in __video_do_ioctl()
2573 int dev_debug = vfd->dev_debug; in __video_do_ioctl()
2578 video_device_node_name(vfd)); in __video_do_ioctl()
2582 if (test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags)) in __video_do_ioctl()
2588 if (!test_bit(_IOC_NR(cmd), vfd->valid_ioctls) && in __video_do_ioctl()
2593 ret = v4l2_prio_check(vfd->prio, vfh->prio); in __video_do_ioctl()
2607 const void *p = vfd->ioctl_ops; in __video_do_ioctl()
2617 vfh ? v4l2_prio_check(vfd->prio, vfh->prio) >= 0 : 0, in __video_do_ioctl()
2627 v4l_printk_ioctl(video_device_node_name(vfd), cmd); in __video_do_ioctl()