Skip to content

libcamhal: Fix V4L2 stride calculation and handle EBUSY during format setting - #84

Open
123456987789 wants to merge 2 commits into
intel:mainfrom
123456987789:fix/v4l2-format-stride
Open

123456987789 wants to merge 2 commits into
intel:mainfrom
123456987789:fix/v4l2-format-stride

Conversation

@123456987789

Copy link
Copy Markdown

Summary

  • Calculate bytesperline using CameraUtils::getStride() instead of pixel width when configuring video nodes and creating buffer pools.
  • Treat EBUSY from VIDIOC_S_FMT and VIDIOC_SUBDEV_S_FMT as non-fatal, allowing preview to continue when independent processes request the same format.
  • Log format-setting failures at warning level while preserving ioctl failures other than EBUSY.

Motivation

Ensure format-aware stride calculation and avoid aborting preview on EBUSY during format configuration.

Signed-off-by: Pengpeng He <pengpengx.he@intel.com>
Independent preview processes may request the same V4L2 format.
After one process sets it, another may receive EBUSY on the same
request. This does not prevent preview from continuing.

Treat EBUSY from video-node and subdevice format-setting ioctls as
non-fatal, log it at warning level, and return success. Preserve the
original ioctl error for all other failures.

Signed-off-by: Pengpeng He <pengpengx.he@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant