mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
spa: v4l2: Fix v4l2 SPA not working on camera with relative controls
Some V4L2 controls like focus, pan or tilt can be relative (change the lens / angle relative to previous positions) these return EACCES when calling VIDIOC_G_CTRL on them. Fix the v4l2 SPA not working on cameras with relative controls, such as e.g. the Logitech QuickCam Orbit MP. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
ec5684302c
commit
0e63bd902f
1 changed files with 5 additions and 0 deletions
|
|
@ -1324,6 +1324,11 @@ spa_v4l2_update_controls(struct impl *this)
|
||||||
spa_zero(control);
|
spa_zero(control);
|
||||||
control.id = c->ctrl_id;
|
control.id = c->ctrl_id;
|
||||||
if (xioctl(dev->fd, VIDIOC_G_CTRL, &control) < 0) {
|
if (xioctl(dev->fd, VIDIOC_G_CTRL, &control) < 0) {
|
||||||
|
/* Write only controls like relative pan/tilt return EACCES */
|
||||||
|
if (errno == EACCES) {
|
||||||
|
c->value = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
res = -errno;
|
res = -errno;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue