return 0;
}
+int v4l2_subdev_get_dv_timings_caps(struct media_entity *entity,
+ struct v4l2_dv_timings_cap *caps)
+{
+ unsigned int pad = caps->pad;
+ int ret;
+
+ ret = v4l2_subdev_open(entity);
+ if (ret < 0)
+ return ret;
+
+ memset(caps, 0, sizeof(*caps));
+ caps->pad = pad;
+
+ ret = ioctl(entity->fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, caps);
+ if (ret < 0)
+ return -errno;
+
+ return 0;
+}
+
+int v4l2_subdev_query_dv_timings(struct media_entity *entity,
+ struct v4l2_dv_timings *timings)
+{
+ int ret;
+
+ ret = v4l2_subdev_open(entity);
+ if (ret < 0)
+ return ret;
+
+ memset(timings, 0, sizeof(*timings));
+
+ ret = ioctl(entity->fd, VIDIOC_SUBDEV_QUERY_DV_TIMINGS, timings);
+ if (ret < 0)
+ return -errno;
+
+ return 0;
+}
+
+int v4l2_subdev_get_dv_timings(struct media_entity *entity,
+ struct v4l2_dv_timings *timings)
+{
+ int ret;
+
+ ret = v4l2_subdev_open(entity);
+ if (ret < 0)
+ return ret;
+
+ memset(timings, 0, sizeof(*timings));
+
+ ret = ioctl(entity->fd, VIDIOC_SUBDEV_G_DV_TIMINGS, timings);
+ if (ret < 0)
+ return -errno;
+
+ return 0;
+}
+
+int v4l2_subdev_set_dv_timings(struct media_entity *entity,
+ struct v4l2_dv_timings *timings)
+{
+ int ret;
+
+ ret = v4l2_subdev_open(entity);
+ if (ret < 0)
+ return ret;
+
+ ret = ioctl(entity->fd, VIDIOC_SUBDEV_S_DV_TIMINGS, timings);
+ if (ret < 0)
+ return -errno;
+
+ return 0;
+}
+
int v4l2_subdev_get_frame_interval(struct media_entity *entity,
struct v4l2_fract *interval)
{
enum v4l2_subdev_format_whence which);
/**
+ * @brief Query the digital video capabilities of a pad.
+ * @param entity - subdev-device media entity.
+ * @param cap - capabilities to be filled.
+ *
+ * Retrieve the digital video capabilities of the @a entity pad specified by
+ * @a cap.pad and store it in the @a cap structure.
+ *
+ * @return 0 on success, or a negative error code on failure.
+ */
+int v4l2_subdev_get_dv_timings_caps(struct media_entity *entity,
+ struct v4l2_dv_timings_cap *caps);
+
+/**
+ * @brief Query the digital video timings of a sub-device
+ * @param entity - subdev-device media entity.
+ * @param timings timings to be filled.
+ *
+ * Retrieve the detected digital video timings for the currently selected input
+ * of @a entity and store them in the @a timings structure.
+ *
+ * @return 0 on success, or a negative error code on failure.
+ */
+int v4l2_subdev_query_dv_timings(struct media_entity *entity,
+ struct v4l2_dv_timings *timings);
+
+/**
+ * @brief Get the current digital video timings of a sub-device
+ * @param entity - subdev-device media entity.
+ * @param timings timings to be filled.
+ *
+ * Retrieve the current digital video timings for the currently selected input
+ * of @a entity and store them in the @a timings structure.
+ *
+ * @return 0 on success, or a negative error code on failure.
+ */
+int v4l2_subdev_get_dv_timings(struct media_entity *entity,
+ struct v4l2_dv_timings *timings);
+
+/**
+ * @brief Set the digital video timings of a sub-device
+ * @param entity - subdev-device media entity.
+ * @param timings timings to be set.
+ *
+ * Set the digital video timings of @a entity to @a timings. The driver is
+ * allowed to modify the requested format, in which case @a timings is updated
+ * with the modifications.
+ *
+ * @return 0 on success, or a negative error code on failure.
+ */
+int v4l2_subdev_set_dv_timings(struct media_entity *entity,
+ struct v4l2_dv_timings *timings);
+
+/**
* @brief Retrieve the frame interval on a sub-device.
* @param entity - subdev-device media entity.
* @param interval - frame interval to be filled.