Lines Matching +full:poll +full:- +full:interval
10 * SPDX-License-Identifier: Apache-2.0
38 #define LINE_COUNT_HEIGHT (-1)
148 * Supported frame interval type of a video device.
151 /** discrete frame interval type */
153 /** stepwise frame interval type */
159 * @brief Video frame interval structure
161 * Used to describe a video frame interval.
164 /** numerator of the frame interval */
166 /** denominator of the frame interval */
172 * @brief Video frame interval stepwise structure
174 * Used to describe the video frame interval stepwise type.
177 /** minimum frame interval in seconds */
179 /** maximum frame interval in seconds */
181 /** frame interval step size in seconds */
187 * @brief Video frame interval enumeration structure
192 /** frame interval index during enumeration */
196 /** frame interval type the device supports */
198 /** the actual frame interval */
212 VIDEO_EP_NONE = -1,
214 VIDEO_EP_ALL = -2,
216 VIDEO_EP_IN = -3,
218 VIDEO_EP_OUT = -4,
252 * @brief Set video frame interval
261 * @brief Get current video frame interval
347 * @brief Register/Unregister poll signal for buffer events.
383 * @retval -EINVAL If parameters are invalid.
384 * @retval -ENOTSUP If format is not supported.
385 * @retval -EIO General input / output error.
390 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_set_format()
392 if (api->set_format == NULL) { in video_set_format()
393 return -ENOSYS; in video_set_format()
396 return api->set_format(dev, ep, fmt); in video_set_format()
413 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_get_format()
415 if (api->get_format == NULL) { in video_get_format()
416 return -ENOSYS; in video_get_format()
419 return api->get_format(dev, ep, fmt); in video_get_format()
423 * @brief Set video frame interval.
425 * Configure video device with a specific frame interval.
427 * Drivers must not return an error solely because the requested interval doesn’t match the device
428 * capabilities. They must instead modify the interval to match what the hardware can provide.
432 * @param frmival Pointer to a video frame interval struct.
435 * @retval -ENOSYS If API is not implemented.
436 * @retval -EINVAL If parameters are invalid.
437 * @retval -EIO General input / output error.
442 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_set_frmival()
444 if (api->set_frmival == NULL) { in video_set_frmival()
445 return -ENOSYS; in video_set_frmival()
448 return api->set_frmival(dev, ep, frmival); in video_set_frmival()
452 * @brief Get video frame interval.
454 * Get current frame interval of the video device.
458 * @param frmival Pointer to a video frame interval struct.
461 * @retval -ENOSYS If API is not implemented.
462 * @retval -EINVAL If parameters are invalid.
463 * @retval -EIO General input / output error.
468 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_get_frmival()
470 if (api->get_frmival == NULL) { in video_get_frmival()
471 return -ENOSYS; in video_get_frmival()
474 return api->get_frmival(dev, ep, frmival); in video_get_frmival()
488 * @param fie Pointer to a video frame interval enumeration struct.
491 * @retval -ENOSYS If API is not implemented.
492 * @retval -EINVAL If parameters are invalid.
493 * @retval -EIO General input / output error.
498 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_enum_frmival()
500 if (api->enum_frmival == NULL) { in video_enum_frmival()
501 return -ENOSYS; in video_enum_frmival()
504 return api->enum_frmival(dev, ep, fie); in video_enum_frmival()
518 * @retval -EINVAL If parameters are invalid.
519 * @retval -EIO General input / output error.
524 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_enqueue()
526 if (api->enqueue == NULL) { in video_enqueue()
527 return -ENOSYS; in video_enqueue()
530 return api->enqueue(dev, ep, buf); in video_enqueue()
545 * @retval -EINVAL If parameters are invalid.
546 * @retval -EIO General input / output error.
551 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_dequeue()
553 if (api->dequeue == NULL) { in video_dequeue()
554 return -ENOSYS; in video_dequeue()
557 return api->dequeue(dev, ep, buf, timeout); in video_dequeue()
572 * @retval 0 Is successful, -ERRNO code otherwise.
576 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_flush()
578 if (api->flush == NULL) { in video_flush()
579 return -ENOSYS; in video_flush()
582 return api->flush(dev, ep, cancel); in video_flush()
595 * @retval -EIO General input / output error.
599 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_stream_start()
601 if (api->stream_start == NULL) { in video_stream_start()
602 return -ENOSYS; in video_stream_start()
605 return api->stream_start(dev); in video_stream_start()
615 * @retval -EIO General input / output error.
619 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_stream_stop()
622 if (api->stream_stop == NULL) { in video_stream_stop()
623 return -ENOSYS; in video_stream_stop()
626 ret = api->stream_stop(dev); in video_stream_stop()
639 * @retval 0 Is successful, -ERRNO code otherwise.
644 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_get_caps()
646 if (api->get_caps == NULL) { in video_get_caps()
647 return -ENOSYS; in video_get_caps()
650 return api->get_caps(dev, ep, caps); in video_get_caps()
664 * @retval -EINVAL If parameters are invalid.
665 * @retval -ENOTSUP If format is not supported.
666 * @retval -EIO General input / output error.
670 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_set_ctrl()
672 if (api->set_ctrl == NULL) { in video_set_ctrl()
673 return -ENOSYS; in video_set_ctrl()
676 return api->set_ctrl(dev, cid, value); in video_set_ctrl()
690 * @retval -EINVAL If parameters are invalid.
691 * @retval -ENOTSUP If format is not supported.
692 * @retval -EIO General input / output error.
696 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_get_ctrl()
698 if (api->get_ctrl == NULL) { in video_get_ctrl()
699 return -ENOSYS; in video_get_ctrl()
702 return api->get_ctrl(dev, cid, value); in video_get_ctrl()
708 * Register a poll signal to the endpoint, which will be signaled on frame
709 * completion (done, aborted, error). Registering a NULL poll signal
716 * @retval 0 Is successful, -ERRNO code otherwise.
721 const struct video_driver_api *api = (const struct video_driver_api *)dev->api; in video_set_signal()
723 if (api->set_signal == NULL) { in video_set_signal()
724 return -ENOSYS; in video_set_signal()
727 return api->set_signal(dev, ep, signal); in video_set_signal()
766 * @return -ENOENT when no matching format is found.
774 * @param frmival Frame interval to turn into microseconds.
776 * @return The frame interval value in microseconds.
780 return (uint64_t)NSEC_PER_SEC * frmival->numerator / frmival->denominator; in video_frmival_nsec()
784 * @brief Find the closest match to a frame interval value within a stepwise frame interval.
786 * @param stepwise The stepwise frame interval range to search
787 * @param desired The frame interval for which find the closest match
788 * @param match The resulting frame interval closest to @p desired
795 * @brief Find the closest match to a frame interval value within a video device.
799 * - @c match->format to the @ref video_format of interest.
800 * - @c match->type to @ref VIDEO_FRMIVAL_TYPE_DISCRETE.
801 * - @c match->discrete to the desired frame interval.
805 * - @c match->discrete to the value of the closest frame interval.
806 * - @c match->index to the index of the closest frame interval.
810 * @param match Frame interval enumerator with the query, and loaded with the result.
815 /* fourcc - four-character-code */
848 #define VIDEO_PIX_FMT_RGB565 video_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */
851 #define VIDEO_PIX_FMT_XRGB32 video_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */
863 #define VIDEO_PIX_FMT_YUYV video_fourcc('Y', 'U', 'Y', 'V') /* 16 Y0-Cb0 Y1-Cr0 */
866 #define VIDEO_PIX_FMT_XYUV32 video_fourcc('X', 'Y', 'U', 'V') /* 32 XYUV-8-8-8-8 */