From 3b33f60d2ff3a87927e46e287f41182f435a3cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Mon, 1 Sep 2025 17:39:08 +0200 Subject: [PATCH] treewide: map `SPA_PROP_exposure` to `V4L2_CID_EXPOSURE_ABSOLUTE` Currently the v4l2 and libcamera plugins map `SPA_PROP_exposure` in incompatible ways. So change the v4l2 mapping to `V4L2_CID_EXPOSURE_ABSOLUTE` because at least that is in units of time (a step closer to addressing #4697), and because that is more relevant for UVC cameras. Also change the pipewire-v4l2 translation layer. --- pipewire-v4l2/src/pipewire-v4l2.c | 2 +- spa/plugins/v4l2/v4l2-utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pipewire-v4l2/src/pipewire-v4l2.c b/pipewire-v4l2/src/pipewire-v4l2.c index a3397ef64..c85bfd813 100644 --- a/pipewire-v4l2/src/pipewire-v4l2.c +++ b/pipewire-v4l2/src/pipewire-v4l2.c @@ -2115,7 +2115,7 @@ static struct { { V4L2_CID_SATURATION, SPA_PROP_saturation }, { V4L2_CID_HUE, SPA_PROP_hue }, { V4L2_CID_GAMMA, SPA_PROP_gamma }, - { V4L2_CID_EXPOSURE, SPA_PROP_exposure }, + { V4L2_CID_EXPOSURE_ABSOLUTE, SPA_PROP_exposure }, { V4L2_CID_GAIN, SPA_PROP_gain }, { V4L2_CID_SHARPNESS, SPA_PROP_sharpness }, }; diff --git a/spa/plugins/v4l2/v4l2-utils.c b/spa/plugins/v4l2/v4l2-utils.c index e5f153f4a..9cfd0afae 100644 --- a/spa/plugins/v4l2/v4l2-utils.c +++ b/spa/plugins/v4l2/v4l2-utils.c @@ -1347,7 +1347,7 @@ static struct { { V4L2_CID_SATURATION, SPA_PROP_saturation }, { V4L2_CID_HUE, SPA_PROP_hue }, { V4L2_CID_GAMMA, SPA_PROP_gamma }, - { V4L2_CID_EXPOSURE, SPA_PROP_exposure }, + { V4L2_CID_EXPOSURE_ABSOLUTE, SPA_PROP_exposure }, { V4L2_CID_GAIN, SPA_PROP_gain }, { V4L2_CID_SHARPNESS, SPA_PROP_sharpness }, };