Support client usage notification via V4l2 Event API
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HWE Next |
Fix Released
|
Undecided
|
Unassigned | ||
OEM Priority Project |
Fix Released
|
High
|
Shih-Yuan Lee | ||
v4l2loopback (Ubuntu) |
Fix Released
|
High
|
You-Sheng Yang | ||
Focal |
Won't Fix
|
High
|
You-Sheng Yang | ||
Hirsute |
Fix Released
|
High
|
You-Sheng Yang |
Bug Description
[SRU Justification]
[Impact]
On a MIPI camera through Intel IPU6 platform that its raw V4L2 loopback interface is preserved for Intel Camera HAL libraries, a relay daemon + v4l2loopback is used to allow the usage of legacy V4L2 based apps.
By design, the relayd will open v4l2sink to v4l2loopback OUTPUT deivce, and it will only open libcamhal based GStreamer source element, and therefore underlying camera hardware, until received new client notifications via V4L2 Event API that is introduced in this SRU.
Besides, frame sizes/intervals enumeration is also fixed to meet better compliance with user apps.
[Test Plan]
v4l2loopback doesn't support V4L2 Event API until recently, so requests for the usage will always fail:
struct v4l2_event_
int fd;
memset (&sub, 0, sizeof (sub));
sub.type = ...;
if (ioctl (fd, VIDIOC_
With this fix, it shall support Event API operations, e.g. VIDIOC_
[Where problems could occur]
While a custom type of V4L2 event is now registered for OEM projects, software expected same ID (numerically equivalent to V4L2_EVENT_
For generic Ubuntu, programs may begin to take advantage of this new capability to update its UI, or to take other actions after receiving desired events. There might be behavior changes, but should be under the original design if was done carefully.
[Other Info]
For Focal backports, 0.12.5-1 is equivalent to 0.12.3-1ubuntu0.3 plus micro version updates, so there should be little risk backport a new release, and we can drop additional patches carried. This implies bug 1905613.
This focal backport includes changes for bug 1921474, bug 1930208, and bug 1936250, so it will then become synced with Impish and newer again. The 0007-compliance
========= original bug report ==========
In addition to kernel/firmware proposed in bug 1921345, several user space daemons/libraries, as well as fixes/features in v4l2loopback-dkms, are also required to have seamless support for legacy/existing Linux kernel V4L2 API based applications to adopt libcamera or Intel libcamhal provided camera interfaces.
The idea is to add a v4l2 streaming relay daemon (currently developed in [1] and packaged in [2]) that helps redirecting V4L2 buffer streams into v4l2loopback output device, and then legacy apps open v4l2loopback capture device in the ordinary way.
hw -> libcamera/libcamhal -> v4l2-relayd -> v4l2loopback -> v4l2-based apps
To achieve this, we'd like v4l2-relayd to only open GStreamer icamerasrc pipeline (provided by [3],[4]) when there is actual usage request from v4l2-based apps for privacy and power consumption's concerns. However, current (0.12.5 and therefore Ubuntu/Debian 0.12.5-1) doesn't have any available mechanism for this, therefore a V4L2 Event API based proposal has been sent and accepted by upstream[5][6].
This is needed for Ubuntu OEM projects with MIPI cameras through Intel IPU6 (Imaging Processing Unit version 6).
[1]: https:/
[2]: https:/
[3]: https:/
[4]: https:/
[5]: https:/
[6]: https:/
tags: | added: oem-priority originate-from-1917691 somerville |
description: | updated |
Changed in hwe-next: | |
status: | New → Fix Released |
status: | Fix Released → In Progress |
tags: | added: originate-from-1949435 |
Changed in oem-priority: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Shih-Yuan Lee (fourdollars) |
tags: | added: originate-from-1961382 sutton |
Changed in oem-priority: | |
status: | In Progress → Fix Released |
Changed in hwe-next: | |
status: | In Progress → Fix Released |
Changed in v4l2loopback (Ubuntu Focal): | |
status: | In Progress → Won't Fix |
Attach debdiff built from https:/ /code.launchpad .net/~vicamo/ ubuntu/ +source/ v4l2loopback/ +git/v4l2loopba ck/+ref/ bug-1921474/ support- client- usage-v4l2- event-api/ hirsute.