zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.94k stars 6.65k forks source link

`video_flush()` called with `VIDEO_EP_ALL`, unsupported by most drivers #78712

Open josuah opened 2 months ago

josuah commented 2 months ago

Describe the bug

The video API calls video_flush() from video_stream_stop() with ep=VIDEO_EP_ALL to flush all endpoints before stopping the stream.

Currently, most "data mover" drivers (not the sensors but MIPI/DVP ones) only filter VIDEO_EP_OUT https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/drivers/video.h#L456

Expected behavior

Calling video_stream_stop() succeeds on all video drivers supporting it.

Impact

The flush operation would fail upon calling video_stream_stop() for affected drivers.

Environment (please complete the following information):

Additional context

if (ep != VIDEO_EP_OUT) would need to be converted to if (ep != VIDEO_EP_OUT && ep != VIDEO_EP_ALL). A PR with macros integrating this will be opened.

github-actions[bot] commented 1 day ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.