Show a patch.

GET /api/1.1/patches/24496/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 24496,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/24496/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/24496/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20250930103207.626006-1-barnabas.pocze@ideasonboard.com>",
    "date": "2025-09-30T10:32:07",
    "name": "[RFC,v3] libcamera: controls: Remove common enum prefix",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1b860a8b4adb663a84b5840496484afd54a382b1",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/1.1/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/24496/mbox/",
    "series": [
        {
            "id": 5467,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5467/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5467",
            "date": "2025-09-30T10:32:07",
            "name": "[RFC,v3] libcamera: controls: Remove common enum prefix",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/5467/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/24496/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/24496/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 816B6C328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Sep 2025 10:32:14 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 807816B5FF;\n\tTue, 30 Sep 2025 12:32:13 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BBFFA6B5F0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Sep 2025 12:32:10 +0200 (CEST)",
            "from pb-laptop.local (185.221.142.146.nat.pool.zt.hu\n\t[185.221.142.146])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5A92F228;\n\tTue, 30 Sep 2025 12:30:42 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"gpkA2Olo\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1759228242;\n\tbh=B5N/212ViKrl5J+PrLtQ5px3fKpustuQI2N1oJ4Z/c4=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=gpkA2OlovMNBZYkzPbnOP1Fb5GD0fXa2x1TWpoTxWAoVi65vempNNFrsoFstjWf7N\n\tlGVJ/UTfyahMv+RHJ3cp/gV9NmRHetiFLrCOckEOBSVO7JrPAZN+aUlUC7Zb8cdz+F\n\tosxt6yW64S4cwJfP0BDTHryxW9DqVAJwMPY3i8KE=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Paul Elder <paul.elder@ideasonboard.com>",
        "Subject": "[RFC PATCH v3] libcamera: controls: Remove common enum prefix",
        "Date": "Tue, 30 Sep 2025 12:32:07 +0200",
        "Message-ID": "<20250930103207.626006-1-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.51.0",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "At the moment all enumerators have a common prefix, in many cases\nthe name of the control, but not always. This is reasonable for\nC++ because currently non-scoped enumerations are used, so some\nkind of prefix is needed to differentiate common names like `Auto`,\n`Manual`, `On`, `Off`, etc.\n\nHowever, for e.g. language bindings, it might be more desirable to\nhave access to the the unprefixed name. (This is even the case for\nC++ scoped enumerations.)\n\nCurrently, both the gstreamer and python bindings have extra code\nto strip the common prefix. So instead of doing that separately in\nevery binding, etc. store the unprefixed name in the source of truth,\nthe control/property definition yaml files. This affect all C++, python,\ngstreamer generated code.\n\nThis is an API break, but it only affects C++ because gst and py already\nstrip the common prefix (TODO: recheck again). And in case of C++ it is\nonly an API break for enum controls where the common prefix is not the\nsame as the control name:\n\n  * properties::Location\n  * properties::draft::ColorFilterArrangement\n  * controls::AwbMode\n  * controls::AeConstraintMode\n  * controls::AeFlickerMode\n  * controls::AeMeteringMode\n  * controls::AeExposureMode\n  * controls::draft::ColorCorrectionAberrationMode\n  * controls::WdrMode\n  * TODO: check again\n\nAdditionally, in some cases the corresponding `*NameValueMap` objects\nare used to parse configuration files, these are also affected:\n\n  * ipa::AgcMeanLuminance::parseConstraintModes\n  * ipa::AwbAlgorithm::parseModeConfigs\n  * ipa::rkisp1::algorithms::Agc::parseMeteringModes\n  * ConfigParser::parseLocation\n\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n---\nMore testing and review would be beneficial still.\n\nchanges in v3:\n  * rebase -> controls::WdrMode\n\nchanges in v2:\n  * rebase\n  * missed files:\n    * utils/tuning/libtuning/modules/agc/rkisp1.py\n    * utils/tuning/config-example.yaml\n    * comments in src/ipa/libipa/agc_mean_luminance.cpp\n    * comments in src/ipa/libipa/awb.cpp\n\nv2: https://patchwork.libcamera.org/patch/24258/\nv1: https://patchwork.libcamera.org/patch/23381/\n---\n include/libcamera/control_ids.h.in            |   2 +-\n src/android/camera_device.cpp                 |   6 +-\n src/android/camera_hal_manager.cpp            |   2 +-\n src/apps/cam/main.cpp                         |   6 +-\n src/apps/qcam/cam_select_dialog.cpp           |   6 +-\n src/gstreamer/gstlibcamera-controls.cpp.in    |   4 +-\n src/ipa/libipa/agc_mean_luminance.cpp         |  16 +-\n src/ipa/libipa/awb.cpp                        |   4 +-\n src/ipa/libipa/awb_bayes.cpp                  |   4 +-\n src/ipa/rkisp1/algorithms/agc.cpp             |   4 +-\n src/ipa/rkisp1/algorithms/wdr.cpp             |  16 +-\n src/ipa/rpi/common/ipa_base.cpp               |  54 ++--\n src/libcamera/control_ids.cpp.in              |   6 +-\n src/libcamera/control_ids_core.yaml           | 260 +++++++++---------\n src/libcamera/control_ids_draft.yaml          |  54 ++--\n src/libcamera/control_ids_rpi.yaml            |   6 +-\n src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |   4 +-\n src/libcamera/pipeline/virtual/README.md      |   2 +-\n .../pipeline/virtual/config_parser.cpp        |   4 +-\n .../pipeline/virtual/data/virtual.yaml        |   6 +-\n src/libcamera/property_ids_core.yaml          |   6 +-\n src/libcamera/sensor/camera_sensor_legacy.cpp |  18 +-\n src/libcamera/sensor/camera_sensor_raw.cpp    |  18 +-\n src/py/libcamera/gen-py-controls.py           |  28 --\n src/py/libcamera/py_controls_generated.cpp.in |   2 +-\n utils/codegen/controls.py                     |  19 +-\n utils/codegen/gen-gst-controls.py             |  17 --\n utils/tuning/config-example.yaml              |  16 +-\n utils/tuning/libtuning/modules/agc/rkisp1.py  |  10 +-\n 29 files changed, 286 insertions(+), 314 deletions(-)\n\n--\n2.51.0",
    "diff": "diff --git a/include/libcamera/control_ids.h.in b/include/libcamera/control_ids.h.in\nindex 6b5712339..87d6a09e3 100644\n--- a/include/libcamera/control_ids.h.in\n+++ b/include/libcamera/control_ids.h.in\n@@ -42,7 +42,7 @@ enum {\n {% if ctrl.is_enum -%}\n enum {{ctrl.name}}Enum {\n {%- for enum in ctrl.enum_values %}\n-\t{{enum.name}} = {{enum.value}},\n+\t{{enum.prefixed_name}} = {{enum.value}},\n {%- endfor %}\n };\n extern const std::array<const ControlValue, {{ctrl.enum_values_count}}> {{ctrl.name}}Values;\ndiff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 80ff248c2..74981af99 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -310,13 +310,13 @@ int CameraDevice::initialize(const CameraConfigData *cameraConfigData)\n \tconst auto &location = properties.get(properties::Location);\n \tif (location) {\n \t\tswitch (*location) {\n-\t\tcase properties::CameraLocationFront:\n+\t\tcase properties::LocationFront:\n \t\t\tfacing_ = CAMERA_FACING_FRONT;\n \t\t\tbreak;\n-\t\tcase properties::CameraLocationBack:\n+\t\tcase properties::LocationBack:\n \t\t\tfacing_ = CAMERA_FACING_BACK;\n \t\t\tbreak;\n-\t\tcase properties::CameraLocationExternal:\n+\t\tcase properties::LocationExternal:\n \t\t\t/*\n \t\t\t * If the camera is reported as external, but the\n \t\t\t * CameraHalManager has overriden it, use what is\ndiff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp\nindex 7500c749b..c44003309 100644\n--- a/src/android/camera_hal_manager.cpp\n+++ b/src/android/camera_hal_manager.cpp\n@@ -125,7 +125,7 @@ void CameraHalManager::cameraAdded(std::shared_ptr<Camera> cam)\n \t\t * Now check if this is an external camera and assign\n \t\t * its id accordingly.\n \t\t */\n-\t\tif (cameraLocation(cam.get()) == properties::CameraLocationExternal) {\n+\t\tif (cameraLocation(cam.get()) == properties::LocationExternal) {\n \t\t\tisCameraExternal = true;\n \t\t\tid = nextExternalCameraId_;\n \t\t} else {\ndiff --git a/src/apps/cam/main.cpp b/src/apps/cam/main.cpp\nindex a1788b7a9..062c475d0 100644\n--- a/src/apps/cam/main.cpp\n+++ b/src/apps/cam/main.cpp\n@@ -316,15 +316,15 @@ std::string CamApp::cameraName(const Camera *camera)\n \tconst auto &location = props.get(properties::Location);\n \tif (location) {\n \t\tswitch (*location) {\n-\t\tcase properties::CameraLocationFront:\n+\t\tcase properties::LocationFront:\n \t\t\taddModel = false;\n \t\t\tname = \"Internal front camera \";\n \t\t\tbreak;\n-\t\tcase properties::CameraLocationBack:\n+\t\tcase properties::LocationBack:\n \t\t\taddModel = false;\n \t\t\tname = \"Internal back camera \";\n \t\t\tbreak;\n-\t\tcase properties::CameraLocationExternal:\n+\t\tcase properties::LocationExternal:\n \t\t\tname = \"External camera \";\n \t\t\tbreak;\n \t\t}\ndiff --git a/src/apps/qcam/cam_select_dialog.cpp b/src/apps/qcam/cam_select_dialog.cpp\nindex 6b6d0713c..2f8417b34 100644\n--- a/src/apps/qcam/cam_select_dialog.cpp\n+++ b/src/apps/qcam/cam_select_dialog.cpp\n@@ -98,13 +98,13 @@ void CameraSelectorDialog::updateCameraInfo(QString cameraId)\n \tconst auto &location = properties.get(libcamera::properties::Location);\n \tif (location) {\n \t\tswitch (*location) {\n-\t\tcase libcamera::properties::CameraLocationFront:\n+\t\tcase libcamera::properties::LocationFront:\n \t\t\tcameraLocation_->setText(\"Internal front camera\");\n \t\t\tbreak;\n-\t\tcase libcamera::properties::CameraLocationBack:\n+\t\tcase libcamera::properties::LocationBack:\n \t\t\tcameraLocation_->setText(\"Internal back camera\");\n \t\t\tbreak;\n-\t\tcase libcamera::properties::CameraLocationExternal:\n+\t\tcase libcamera::properties::LocationExternal:\n \t\t\tcameraLocation_->setText(\"External camera\");\n \t\t\tbreak;\n \t\tdefault:\ndiff --git a/src/gstreamer/gstlibcamera-controls.cpp.in b/src/gstreamer/gstlibcamera-controls.cpp.in\nindex 6faf3ee7a..c57eb1764 100644\n--- a/src/gstreamer/gstlibcamera-controls.cpp.in\n+++ b/src/gstreamer/gstlibcamera-controls.cpp.in\n@@ -23,9 +23,9 @@ using namespace libcamera;\n static const GEnumValue {{ ctrl.name|snake_case }}_types[] = {\n {%- for enum in ctrl.enum_values %}\n \t{\n-\t\tcontrols::{{ ctrl.namespace }}{{ enum.name }},\n+\t\tcontrols::{{ ctrl.namespace }}{{ enum.prefixed_name }},\n \t\t{{ enum.description|format_description|indent_str('\\t\\t') }},\n-\t\t\"{{ enum.gst_name }}\"\n+\t\t\"{{ enum.name|kebab_case }}\"\n \t},\n {%- endfor %}\n \t{0, nullptr, nullptr}\ndiff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp\nindex 64f36bd75..422f14a2f 100644\n--- a/src/ipa/libipa/agc_mean_luminance.cpp\n+++ b/src/ipa/libipa/agc_mean_luminance.cpp\n@@ -226,10 +226,10 @@ int AgcMeanLuminance::parseConstraintModes(const YamlObject &tuningData)\n \t\t\t0.5\n \t\t};\n\n-\t\tconstraintModes_[controls::ConstraintNormal].insert(\n-\t\t\tconstraintModes_[controls::ConstraintNormal].begin(),\n+\t\tconstraintModes_[controls::AeConstraintModeNormal].insert(\n+\t\t\tconstraintModes_[controls::AeConstraintModeNormal].begin(),\n \t\t\tconstraint);\n-\t\tavailableConstraintModes.push_back(controls::ConstraintNormal);\n+\t\tavailableConstraintModes.push_back(controls::AeConstraintModeNormal);\n \t}\n\n \tcontrols_[&controls::AeConstraintMode] = ControlInfo(availableConstraintModes);\n@@ -297,7 +297,7 @@ int AgcMeanLuminance::parseExposureModes(const YamlObject &tuningData)\n \t * possible before touching gain.\n \t */\n \tif (availableExposureModes.empty()) {\n-\t\tint32_t exposureModeId = controls::ExposureNormal;\n+\t\tint32_t exposureModeId = controls::AeExposureModeNormal;\n \t\tstd::vector<std::pair<utils::Duration, double>> stages = { };\n\n \t\tstd::shared_ptr<ExposureModeHelper> helper =\n@@ -343,12 +343,12 @@ void AgcMeanLuminance::configure(utils::Duration lineDuration,\n  * algorithms:\n  *   - Agc:\n  *       AeConstraintMode:\n- *         ConstraintNormal:\n+ *         Normal:\n  *           lower:\n  *             qLo: 0.98\n  *             qHi: 1.0\n  *             yTarget: 0.5\n- *         ConstraintHighlight:\n+ *         Highlight:\n  *           lower:\n  *             qLo: 0.98\n  *             qHi: 1.0\n@@ -370,10 +370,10 @@ void AgcMeanLuminance::configure(utils::Duration lineDuration,\n  * algorithms:\n  *   - Agc:\n  *       AeExposureMode:\n- *         ExposureNormal:\n+ *         Normal:\n  *           exposureTime: [ 100, 10000, 30000, 60000, 120000 ]\n  *           gain: [ 2.0, 4.0, 6.0, 8.0, 10.0 ]\n- *         ExposureShort:\n+ *         Short:\n  *           exposureTime: [ 100, 10000, 30000, 60000, 120000 ]\n  *           gain: [ 2.0, 4.0, 6.0, 8.0, 10.0 ]\n  *\ndiff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp\nindex 214bac8b5..b410f25bf 100644\n--- a/src/ipa/libipa/awb.cpp\n+++ b/src/ipa/libipa/awb.cpp\n@@ -147,10 +147,10 @@ namespace ipa {\n  * algorithms:\n  *   - Awb:\n  *     AwbMode:\n- *       AwbAuto:\n+ *       Auto:\n  *         lo: 2500\n  *         hi: 8000\n- *       AwbIncandescent:\n+ *       Incandescent:\n  *         lo: 2500\n  *         hi: 3000\n  *       ...\ndiff --git a/src/ipa/libipa/awb_bayes.cpp b/src/ipa/libipa/awb_bayes.cpp\nindex d2bcbd83d..2a96de888 100644\n--- a/src/ipa/libipa/awb_bayes.cpp\n+++ b/src/ipa/libipa/awb_bayes.cpp\n@@ -170,13 +170,13 @@ int AwbBayes::init(const YamlObject &tuningData)\n \t\treturn ret;\n \t}\n\n-\tret = parseModeConfigs(tuningData, controls::AwbAuto);\n+\tret = parseModeConfigs(tuningData, controls::AwbModeAuto);\n \tif (ret) {\n \t\tLOG(Awb, Error)\n \t\t\t<< \"Failed to parse mode parameter from tuning file\";\n \t\treturn ret;\n \t}\n-\tcurrentMode_ = &modes_[controls::AwbAuto];\n+\tcurrentMode_ = &modes_[controls::AwbModeAuto];\n\n \ttransversePos_ = tuningData[\"transversePos\"].get<double>(0.01);\n \ttransverseNeg_ = tuningData[\"transverseNeg\"].get<double>(0.01);\ndiff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp\nindex f5a3c917c..7fdbbf5d9 100644\n--- a/src/ipa/rkisp1/algorithms/agc.cpp\n+++ b/src/ipa/rkisp1/algorithms/agc.cpp\n@@ -70,7 +70,7 @@ int Agc::parseMeteringModes(IPAContext &context, const YamlObject &tuningData)\n \t\t\t<< \"No metering modes read from tuning file; defaulting to matrix\";\n \t\tstd::vector<uint8_t> weights(context.hw.numHistogramWeights, 1);\n\n-\t\tmeteringModes_[controls::MeteringMatrix] = weights;\n+\t\tmeteringModes_[controls::AeMeteringModeMatrix] = weights;\n \t}\n\n \tstd::vector<ControlValue> meteringModes;\n@@ -595,7 +595,7 @@ void Agc::process(IPAContext &context, [[maybe_unused]] const uint32_t frame,\n \t}\n\n \tstd::vector<AgcMeanLuminance::AgcConstraint> additionalConstraints;\n-\tif (context.activeState.wdr.mode != controls::WdrOff)\n+\tif (context.activeState.wdr.mode != controls::WdrModeOff)\n \t\tadditionalConstraints.push_back(context.activeState.wdr.constraint);\n\n \tsetLimits(minExposureTime, maxExposureTime, minAnalogueGain, maxAnalogueGain,\ndiff --git a/src/ipa/rkisp1/algorithms/wdr.cpp b/src/ipa/rkisp1/algorithms/wdr.cpp\nindex 45144913d..2db017244 100644\n--- a/src/ipa/rkisp1/algorithms/wdr.cpp\n+++ b/src/ipa/rkisp1/algorithms/wdr.cpp\n@@ -151,7 +151,7 @@ int WideDynamicRange::init([[maybe_unused]] IPAContext &context,\n \t}\n\n \tcontext.ctrlMap[&controls::WdrMode] =\n-\t\tControlInfo(controls::WdrModeValues, controls::WdrOff);\n+\t\tControlInfo(controls::WdrModeValues, controls::WdrModeOff);\n \tcontext.ctrlMap[&controls::WdrStrength] =\n \t\tControlInfo(0.0f, 2.0f, 1.0f);\n \tcontext.ctrlMap[&controls::WdrMaxBrightPixels] =\n@@ -168,7 +168,7 @@ int WideDynamicRange::init([[maybe_unused]] IPAContext &context,\n int WideDynamicRange::configure(IPAContext &context,\n \t\t\t\t[[maybe_unused]] const IPACameraSensorInfo &configInfo)\n {\n-\tcontext.activeState.wdr.mode = controls::WdrOff;\n+\tcontext.activeState.wdr.mode = controls::WdrModeOff;\n \tcontext.activeState.wdr.gain = 1.0;\n \tcontext.activeState.wdr.strength = 1.0;\n \tauto &constraint = context.activeState.wdr.constraint;\n@@ -403,21 +403,21 @@ void WideDynamicRange::prepare(IPAContext &context,\n \tauto mode = frameContext.wdr.mode;\n\n \tauto config = params->block<BlockType::Wdr>();\n-\tconfig.setEnabled(mode != controls::WdrOff);\n+\tconfig.setEnabled(mode != controls::WdrModeOff);\n\n \t/* Calculate how much EV we need to compensate with the WDR curve. */\n \tdouble gain = context.activeState.wdr.gain;\n \tframeContext.wdr.gain = gain;\n\n-\tif (mode == controls::WdrOff) {\n+\tif (mode == controls::WdrModeOff) {\n \t\tapplyCompensationLinear(1.0, 0.0);\n-\t} else if (mode == controls::WdrLinear) {\n+\t} else if (mode == controls::WdrModeLinear) {\n \t\tapplyCompensationLinear(gain, frameContext.wdr.strength);\n-\t} else if (mode == controls::WdrPower) {\n+\t} else if (mode == controls::WdrModePower) {\n \t\tapplyCompensationPower(gain, frameContext.wdr.strength);\n-\t} else if (mode == controls::WdrExponential) {\n+\t} else if (mode == controls::WdrModeExponential) {\n \t\tapplyCompensationExponential(gain, frameContext.wdr.strength);\n-\t} else if (mode == controls::WdrHistogramEqualization) {\n+\t} else if (mode == controls::WdrModeHistogramEqualization) {\n \t\tapplyHistogramEqualization(frameContext.wdr.strength);\n \t}\n\ndiff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex 8dfe35cc3..f61faa564 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -73,9 +73,9 @@ const ControlInfoMap::Map ipaControls{\n \t{ &controls::AeExposureMode, ControlInfo(controls::AeExposureModeValues) },\n \t{ &controls::ExposureValue, ControlInfo(-8.0f, 8.0f, 0.0f) },\n \t{ &controls::AeFlickerMode,\n-\t  ControlInfo({ { ControlValue(controls::FlickerOff),\n-\t\t\t  ControlValue(controls::FlickerManual) } },\n-\t\t      ControlValue(controls::FlickerOff)) },\n+\t  ControlInfo({ { ControlValue(controls::AeFlickerModeOff),\n+\t\t\t  ControlValue(controls::AeFlickerModeManual) } },\n+\t\t      ControlValue(controls::AeFlickerModeOff)) },\n \t{ &controls::AeFlickerPeriod, ControlInfo(100, 1000000) },\n \t{ &controls::Brightness, ControlInfo(-1.0f, 1.0f, 0.0f) },\n \t{ &controls::Contrast, ControlInfo(0.0f, 32.0f, 1.0f) },\n@@ -176,7 +176,7 @@ int32_t IpaBase::init(const IPASettings &settings, const InitParams &params, Ini\n \tif (platformCtrlsIt != platformControls.end())\n \t\tctrlMap.merge(ControlInfoMap::Map(platformCtrlsIt->second));\n\n-\tmonoSensor_ = params.sensorInfo.cfaPattern == properties::draft::ColorFilterArrangementEnum::MONO;\n+\tmonoSensor_ = params.sensorInfo.cfaPattern == properties::draft::ColorFilterArrangementMONO;\n \tif (!monoSensor_)\n \t\tctrlMap.merge(ControlInfoMap::Map(ipaColourControls));\n\n@@ -701,35 +701,35 @@ bool IpaBase::validateLensControls()\n  * must be kept up-to-date by hand.\n  */\n static const std::map<int32_t, std::string> MeteringModeTable = {\n-\t{ controls::MeteringCentreWeighted, \"centre-weighted\" },\n-\t{ controls::MeteringSpot, \"spot\" },\n-\t{ controls::MeteringMatrix, \"matrix\" },\n-\t{ controls::MeteringCustom, \"custom\" },\n+\t{ controls::AeMeteringModeCentreWeighted, \"centre-weighted\" },\n+\t{ controls::AeMeteringModeSpot, \"spot\" },\n+\t{ controls::AeMeteringModeMatrix, \"matrix\" },\n+\t{ controls::AeMeteringModeCustom, \"custom\" },\n };\n\n static const std::map<int32_t, std::string> ConstraintModeTable = {\n-\t{ controls::ConstraintNormal, \"normal\" },\n-\t{ controls::ConstraintHighlight, \"highlight\" },\n-\t{ controls::ConstraintShadows, \"shadows\" },\n-\t{ controls::ConstraintCustom, \"custom\" },\n+\t{ controls::AeConstraintModeNormal, \"normal\" },\n+\t{ controls::AeConstraintModeHighlight, \"highlight\" },\n+\t{ controls::AeConstraintModeShadows, \"shadows\" },\n+\t{ controls::AeConstraintModeCustom, \"custom\" },\n };\n\n static const std::map<int32_t, std::string> ExposureModeTable = {\n-\t{ controls::ExposureNormal, \"normal\" },\n-\t{ controls::ExposureShort, \"short\" },\n-\t{ controls::ExposureLong, \"long\" },\n-\t{ controls::ExposureCustom, \"custom\" },\n+\t{ controls::AeExposureModeNormal, \"normal\" },\n+\t{ controls::AeExposureModeShort, \"short\" },\n+\t{ controls::AeExposureModeLong, \"long\" },\n+\t{ controls::AeExposureModeCustom, \"custom\" },\n };\n\n static const std::map<int32_t, std::string> AwbModeTable = {\n-\t{ controls::AwbAuto, \"auto\" },\n-\t{ controls::AwbIncandescent, \"incandescent\" },\n-\t{ controls::AwbTungsten, \"tungsten\" },\n-\t{ controls::AwbFluorescent, \"fluorescent\" },\n-\t{ controls::AwbIndoor, \"indoor\" },\n-\t{ controls::AwbDaylight, \"daylight\" },\n-\t{ controls::AwbCloudy, \"cloudy\" },\n-\t{ controls::AwbCustom, \"custom\" },\n+\t{ controls::AwbModeAuto, \"auto\" },\n+\t{ controls::AwbModeIncandescent, \"incandescent\" },\n+\t{ controls::AwbModeTungsten, \"tungsten\" },\n+\t{ controls::AwbModeFluorescent, \"fluorescent\" },\n+\t{ controls::AwbModeIndoor, \"indoor\" },\n+\t{ controls::AwbModeDaylight, \"daylight\" },\n+\t{ controls::AwbModeCloudy, \"cloudy\" },\n+\t{ controls::AwbModeCustom, \"custom\" },\n };\n\n static const std::map<int32_t, RPiController::AfAlgorithm::AfMode> AfModeTable = {\n@@ -1081,12 +1081,12 @@ void IpaBase::applyControls(const ControlList &controls)\n \t\t\tbool modeValid = true;\n\n \t\t\tswitch (mode) {\n-\t\t\tcase controls::FlickerOff:\n+\t\t\tcase controls::AeFlickerModeOff:\n \t\t\t\tagc->setFlickerPeriod(0us);\n\n \t\t\t\tbreak;\n\n-\t\t\tcase controls::FlickerManual:\n+\t\t\tcase controls::AeFlickerModeManual:\n \t\t\t\tagc->setFlickerPeriod(flickerState_.manualPeriod);\n\n \t\t\t\tbreak;\n@@ -1120,7 +1120,7 @@ void IpaBase::applyControls(const ControlList &controls)\n \t\t\t * We note that it makes no difference if the mode gets set to \"manual\"\n \t\t\t * first, and the period updated after, or vice versa.\n \t\t\t */\n-\t\t\tif (flickerState_.mode == controls::FlickerManual)\n+\t\t\tif (flickerState_.mode == controls::AeFlickerModeManual)\n \t\t\t\tagc->setFlickerPeriod(flickerState_.manualPeriod);\n\n \t\t\tbreak;\ndiff --git a/src/libcamera/control_ids.cpp.in b/src/libcamera/control_ids.cpp.in\nindex 65668d486..c80d12d01 100644\n--- a/src/libcamera/control_ids.cpp.in\n+++ b/src/libcamera/control_ids.cpp.in\n@@ -39,7 +39,7 @@ namespace {{vendor}} {\n  * \\brief Supported {{ctrl.name}} values\n {%- for enum in ctrl.enum_values %}\n  *\n- * \\var {{enum.name}}\n+ * \\var {{enum.prefixed_name}}\n  * \\brief {{enum.description|format_description}}\n {%- endfor %}\n  */\n@@ -81,12 +81,12 @@ namespace {{vendor}} {\n {% if ctrl.is_enum -%}\n extern const std::array<const ControlValue, {{ctrl.enum_values_count}}> {{ctrl.name}}Values = {\n {%- for enum in ctrl.enum_values %}\n-\tstatic_cast<{{ctrl.type}}>({{enum.name}}),\n+\tstatic_cast<{{ctrl.type}}>({{enum.prefixed_name}}),\n {%- endfor %}\n };\n extern const std::map<std::string, {{ctrl.type}}> {{ctrl.name}}NameValueMap = {\n {%- for enum in ctrl.enum_values %}\n-\t{ \"{{enum.name}}\", {{enum.name}} },\n+\t{ \"{{enum.name}}\", {{enum.prefixed_name}} },\n {%- endfor %}\n };\n extern const Control<{{ctrl.type}}> {{ctrl.name}}({{ctrl.name|snake_case|upper}}, \"{{ctrl.name}}\", \"{{vendor}}\", {{ctrl.direction}}, {{ctrl.name}}NameValueMap);\ndiff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\nindex f78186585..9ff6b1441 100644\n--- a/src/libcamera/control_ids_core.yaml\n+++ b/src/libcamera/control_ids_core.yaml\n@@ -42,7 +42,7 @@ controls:\n\n         When both the exposure time and analogue gain values are configured to\n         be in Manual mode, the AEGC algorithm is quiescent and does not actively\n-        compute any value and the AeState control will report AeStateIdle.\n+        compute any value and the AeState control will report AeState.Idle.\n\n         When at least the exposure time or analogue gain are configured to be\n         computed by the AEGC algorithm, the AeState control will report if the\n@@ -53,7 +53,7 @@ controls:\n         \\sa ExposureTimeMode\n\n       enum:\n-        - name: AeStateIdle\n+        - name: Idle\n           value: 0\n           description: |\n             The AEGC algorithm is inactive.\n@@ -61,7 +61,7 @@ controls:\n             This state is returned when both AnalogueGainMode and\n             ExposureTimeMode are set to Manual and the algorithm is not\n             actively computing any value.\n-        - name: AeStateSearching\n+        - name: Searching\n           value: 1\n           description: |\n             The AEGC algorithm is actively computing new values, for either the\n@@ -73,8 +73,8 @@ controls:\n\n             The AEGC algorithm converges once stable values are computed for\n             all of the controls set to be computed in Auto mode. Once the\n-            algorithm converges the state is moved to AeStateConverged.\n-        - name: AeStateConverged\n+            algorithm converges the state is moved to AeState.Converged.\n+        - name: Converged\n           value: 2\n           description: |\n             The AEGC algorithm has converged.\n@@ -85,7 +85,7 @@ controls:\n\n             If the measurements move too far away from the convergence point\n             then the AEGC algorithm might start adjusting again, in which case\n-            the state is moved to AeStateSearching.\n+            the state is moved to AeState.Searching.\n\n   # AeMeteringMode needs further attention:\n   # - Auto-generate max enum value.\n@@ -100,16 +100,16 @@ controls:\n         determine the scene brightness. Metering modes may be platform specific\n         and not all metering modes may be supported.\n       enum:\n-        - name: MeteringCentreWeighted\n+        - name: CentreWeighted\n           value: 0\n           description: Centre-weighted metering mode.\n-        - name: MeteringSpot\n+        - name: Spot\n           value: 1\n           description: Spot metering mode.\n-        - name: MeteringMatrix\n+        - name: Matrix\n           value: 2\n           description: Matrix metering mode.\n-        - name: MeteringCustom\n+        - name: Custom\n           value: 3\n           description: Custom metering mode.\n\n@@ -126,7 +126,7 @@ controls:\n         adjusted to reach the desired target exposure. Constraint modes may be\n         platform specific, and not all constraint modes may be supported.\n       enum:\n-        - name: ConstraintNormal\n+        - name: Normal\n           value: 0\n           description: |\n             Default constraint mode.\n@@ -135,7 +135,7 @@ controls:\n             image so as to reach a reasonable average level. However, highlights\n             in the image may appear over-exposed and lowlights may appear\n             under-exposed.\n-        - name: ConstraintHighlight\n+        - name: Highlight\n           value: 1\n           description: |\n             Highlight constraint mode.\n@@ -143,7 +143,7 @@ controls:\n             This mode adjusts the exposure levels in order to try and avoid\n             over-exposing the brightest parts (highlights) of an image.\n             Other non-highlight parts of the image may appear under-exposed.\n-        - name: ConstraintShadows\n+        - name: Shadows\n           value: 2\n           description: |\n             Shadows constraint mode.\n@@ -151,7 +151,7 @@ controls:\n             This mode adjusts the exposure levels in order to try and avoid\n             under-exposing the dark parts (shadows) of an image. Other normally\n             exposed parts of the image may appear over-exposed.\n-        - name: ConstraintCustom\n+        - name: Custom\n           value: 3\n           description: |\n             Custom constraint mode.\n@@ -176,16 +176,16 @@ controls:\n         \\sa ExposureTimeMode\n\n       enum:\n-        - name: ExposureNormal\n+        - name: Normal\n           value: 0\n           description: Default exposure mode.\n-        - name: ExposureShort\n+        - name: Short\n           value: 1\n           description: Exposure mode allowing only short exposure times.\n-        - name: ExposureLong\n+        - name: Long\n           value: 2\n           description: Exposure mode allowing long exposure times.\n-        - name: ExposureCustom\n+        - name: Custom\n           value: 3\n           description: Custom exposure mode.\n\n@@ -244,7 +244,7 @@ controls:\n         or Auto is not supported by the camera), the camera should use a\n         best-effort default value.\n\n-        If ExposureTimeModeManual is supported, the ExposureTime control must\n+        If ExposureTimeMode.Manual is supported, the ExposureTime control must\n         also be supported.\n\n         Cameras that support manual control of the sensor shall support manual\n@@ -258,7 +258,7 @@ controls:\n\n         \\par Flickerless exposure mode transitions\n\n-        Applications that wish to transition from ExposureTimeModeAuto to direct\n+        Applications that wish to transition from ExposureTimeMode.Auto to direct\n         control of the exposure time without causing extra flicker can do so by\n         selecting an ExposureTime value as close as possible to the last value\n         computed by the auto exposure algorithm in order to avoid any visible\n@@ -272,7 +272,7 @@ controls:\n         immediately specify an ExposureTime value in the same request where\n         ExposureTimeMode is set to Manual. They should instead wait for the\n         first Request where ExposureTimeMode is reported as\n-        ExposureTimeModeManual in the Request metadata, and use the reported\n+        ExposureTimeMode.Manual in the Request metadata, and use the reported\n         ExposureTime to populate the control value in the next Request to be\n         queued to the Camera.\n\n@@ -295,7 +295,7 @@ controls:\n\n         \\sa ExposureTime\n       enum:\n-        - name: ExposureTimeModeAuto\n+        - name: Auto\n           value: 0\n           description: |\n             The exposure time will be calculated automatically and set by the\n@@ -306,7 +306,7 @@ controls:\n\n             When transitioning from Manual to Auto mode, the AEGC should start\n             its adjustments based on the last set manual ExposureTime value.\n-        - name: ExposureTimeModeManual\n+        - name: Manual\n           value: 1\n           description: |\n             The exposure time will not be updated by the AE algorithm.\n@@ -356,7 +356,7 @@ controls:\n         or Auto is not supported by the camera), the camera should use a\n         best-effort default value.\n\n-        If AnalogueGainModeManual is supported, the AnalogueGain control must\n+        If AnalogueGainMode.Manual is supported, the AnalogueGain control must\n         also be supported.\n\n         For cameras where we have control over the ISP, both ExposureTimeMode\n@@ -376,7 +376,7 @@ controls:\n         \\sa ExposureTimeMode\n         \\sa AnalogueGain\n       enum:\n-        - name: AnalogueGainModeAuto\n+        - name: Auto\n           value: 0\n           description: |\n             The analogue gain will be calculated automatically and set by the\n@@ -387,7 +387,7 @@ controls:\n\n             When transitioning from Manual to Auto mode, the AEGC should start\n             its adjustments based on the last set manual AnalogueGain value.\n-        - name: AnalogueGainModeManual\n+        - name: Manual\n           value: 1\n           description: |\n             The analogue gain will not be updated by the AEGC algorithm.\n@@ -414,15 +414,15 @@ controls:\n\n         Implementations may not support all of the flicker modes listed below.\n\n-        By default the system will start in FlickerAuto mode if this is\n-        supported, otherwise the flicker mode will be set to FlickerOff.\n+        By default the system will start in AeFlickerMode.Auto mode if this is\n+        supported, otherwise the flicker mode will be set to AeFlickerMode.Off.\n\n       enum:\n-        - name: FlickerOff\n+        - name: \"Off\"\n           value: 0\n           description: |\n             No flicker avoidance is performed.\n-        - name: FlickerManual\n+        - name: Manual\n           value: 1\n           description: |\n             Manual flicker avoidance.\n@@ -430,7 +430,7 @@ controls:\n             Suppress flicker effects caused by lighting running with a period\n             specified by the AeFlickerPeriod control.\n             \\sa AeFlickerPeriod\n-        - name: FlickerAuto\n+        - name: Auto\n           value: 2\n           description: |\n             Automatic flicker period detection and avoidance.\n@@ -448,16 +448,16 @@ controls:\n         Manual flicker period in microseconds.\n\n         This value sets the current flicker period to avoid. It is used when\n-        AeFlickerMode is set to FlickerManual.\n+        AeFlickerMode is set to AeFlickerMode.Manual.\n\n         To cancel 50Hz mains flicker, this should be set to 10000 (corresponding\n         to 100Hz), or 8333 (120Hz) for 60Hz mains.\n\n-        Setting the mode to FlickerManual when no AeFlickerPeriod has ever been\n+        Setting the mode to AeFlickerMode.Manual when no AeFlickerPeriod has ever been\n         set means that no flicker cancellation occurs (until the value of this\n         control is updated).\n\n-        Switching to modes other than FlickerManual has no effect on the\n+        Switching to modes other than AeFlickerMode.Manual has no effect on the\n         value of the AeFlickerPeriod control.\n\n         \\sa AeFlickerMode\n@@ -543,28 +543,28 @@ controls:\n         The modes supported are platform specific, and not all modes may be\n         supported.\n       enum:\n-        - name: AwbAuto\n+        - name: Auto\n           value: 0\n           description: Search over the whole colour temperature range.\n-        - name: AwbIncandescent\n+        - name: Incandescent\n           value: 1\n           description: Incandescent AWB lamp mode.\n-        - name: AwbTungsten\n+        - name: Tungsten\n           value: 2\n           description: Tungsten AWB lamp mode.\n-        - name: AwbFluorescent\n+        - name: Fluorescent\n           value: 3\n           description: Fluorescent AWB lamp mode.\n-        - name: AwbIndoor\n+        - name: Indoor\n           value: 4\n           description: Indoor AWB lighting mode.\n-        - name: AwbDaylight\n+        - name: Daylight\n           value: 5\n           description: Daylight AWB lighting mode.\n-        - name: AwbCloudy\n+        - name: Cloudy\n           value: 6\n           description: Cloudy AWB lighting mode.\n-        - name: AwbCustom\n+        - name: Custom\n           value: 7\n           description: Custom AWB mode.\n\n@@ -801,7 +801,7 @@ controls:\n         An implementation may choose not to implement all the modes.\n\n       enum:\n-        - name: AfModeManual\n+        - name: Manual\n           value: 0\n           description: |\n             The AF algorithm is in manual mode.\n@@ -809,15 +809,15 @@ controls:\n             In this mode it will never perform any action nor move the lens of\n             its own accord, but an application can specify the desired lens\n             position using the LensPosition control. The AfState will always\n-            report AfStateIdle.\n+            report AfState.Idle.\n\n-            If the camera is started in AfModeManual, it will move the focus\n+            If the camera is started in AfMode.Manual, it will move the focus\n             lens to the position specified by the LensPosition control.\n\n             This mode is the recommended default value for the AfMode control.\n             External cameras (as reported by the Location property set to\n-            CameraLocationExternal) may use a different default value.\n-        - name: AfModeAuto\n+            Location.External) may use a different default value.\n+        - name: Auto\n           value: 1\n           description: |\n             The AF algorithm is in auto mode.\n@@ -827,18 +827,18 @@ controls:\n             used to initiate a focus scan, the results of which will be\n             reported by AfState.\n\n-            If the autofocus algorithm is moved from AfModeAuto to another mode\n+            If the autofocus algorithm is moved from AfMode.Auto to another mode\n             while a scan is in progress, the scan is cancelled immediately,\n             without waiting for the scan to finish.\n\n-            When first entering this mode the AfState will report AfStateIdle.\n-            When a trigger control is sent, AfState will report AfStateScanning\n-            for a period before spontaneously changing to AfStateFocused or\n-            AfStateFailed, depending on the outcome of the scan. It will remain\n+            When first entering this mode the AfState will report AfState.Idle.\n+            When a trigger control is sent, AfState will report AfState.Scanning\n+            for a period before spontaneously changing to AfState.Focused or\n+            AfState.Failed, depending on the outcome of the scan. It will remain\n             in this state until another scan is initiated by the AfTrigger\n             control. If a scan is cancelled (without changing to another mode),\n-            AfState will return to AfStateIdle.\n-        - name: AfModeContinuous\n+            AfState will return to AfState.Idle.\n+        - name: Continuous\n           value: 2\n           description: |\n             The AF algorithm is in continuous mode.\n@@ -853,9 +853,9 @@ controls:\n             scanning by using the AfPause control. This allows video or still\n             images to be captured whilst guaranteeing that the focus is fixed.\n\n-            When set to AfModeContinuous, the system will immediately initiate a\n-            scan so AfState will report AfStateScanning, and will settle on one\n-            of AfStateFocused or AfStateFailed, depending on the scan result.\n+            When set to AfMode.Continuous, the system will immediately initiate a\n+            scan so AfState will report AfState.Scanning, and will settle on one\n+            of AfState.Focused or AfState.Failed, depending on the scan result.\n\n   - AfRange:\n       type: int32_t\n@@ -865,7 +865,7 @@ controls:\n\n         An implementation may choose not to implement all the options here.\n       enum:\n-        - name: AfRangeNormal\n+        - name: Normal\n           value: 0\n           description: |\n             A wide range of focus distances is scanned.\n@@ -873,16 +873,16 @@ controls:\n             Scanned distances cover all the way from infinity down to close\n             distances, though depending on the implementation, possibly not\n             including the very closest macro positions.\n-        - name: AfRangeMacro\n+        - name: Macro\n           value: 1\n           description: |\n             Only close distances are scanned.\n-        - name: AfRangeFull\n+        - name: Full\n           value: 2\n           description: |\n             The full range of focus distances is scanned.\n\n-            This range is similar to AfRangeNormal but includes the very\n+            This range is similar to Normal but includes the very\n             closest macro positions.\n\n   - AfSpeed:\n@@ -897,10 +897,10 @@ controls:\n         capture) it may be helpful to move the lens as quickly as is reasonably\n         possible.\n       enum:\n-        - name: AfSpeedNormal\n+        - name: Normal\n           value: 0\n           description: Move the lens at its usual speed.\n-        - name: AfSpeedFast\n+        - name: Fast\n           value: 1\n           description: Move the lens more quickly.\n\n@@ -910,11 +910,11 @@ controls:\n       description: |\n         The parts of the image used by the AF algorithm to measure focus.\n       enum:\n-        - name: AfMeteringAuto\n+        - name: Auto\n           value: 0\n           description: |\n             Let the AF algorithm decide for itself where it will measure focus.\n-        - name: AfMeteringWindows\n+        - name: Windows\n           value: 1\n           description: |\n             Use the rectangles defined by the AfWindows control to measure focus.\n@@ -957,19 +957,19 @@ controls:\n       description: |\n         Start an autofocus scan.\n\n-        This control starts an autofocus scan when AfMode is set to AfModeAuto,\n-        and is ignored if AfMode is set to AfModeManual or AfModeContinuous. It\n+        This control starts an autofocus scan when AfMode is set to AfMode.Auto,\n+        and is ignored if AfMode is set to AfMode.Manual or AfMode.Continuous. It\n         can also be used to terminate a scan early.\n\n       enum:\n-        - name: AfTriggerStart\n+        - name: Start\n           value: 0\n           description: |\n             Start an AF scan.\n\n-            Setting the control to AfTriggerStart is ignored if a scan is in\n+            Setting the control to AfTrigger.Start is ignored if a scan is in\n             progress.\n-        - name: AfTriggerCancel\n+        - name: Cancel\n           value: 1\n           description: |\n             Cancel an AF scan.\n@@ -984,43 +984,43 @@ controls:\n         Pause lens movements when in continuous autofocus mode.\n\n         This control has no effect except when in continuous autofocus mode\n-        (AfModeContinuous). It can be used to pause any lens movements while\n+        (AfMode.Continuous). It can be used to pause any lens movements while\n         (for example) images are captured. The algorithm remains inactive\n         until it is instructed to resume.\n\n       enum:\n-        - name: AfPauseImmediate\n+        - name: Immediate\n           value: 0\n           description: |\n             Pause the continuous autofocus algorithm immediately.\n\n             The autofocus algorithm is paused whether or not any kind of scan\n             is underway. AfPauseState will subsequently report\n-            AfPauseStatePaused. AfState may report any of AfStateScanning,\n-            AfStateFocused or AfStateFailed, depending on the algorithm's state\n+            AfPauseState.Paused. AfState may report any of AfState.Scanning,\n+            AfState.Focused or AfState.Failed, depending on the algorithm's state\n             when it received this control.\n-        - name: AfPauseDeferred\n+        - name: Deferred\n           value: 1\n           description: |\n             Pause the continuous autofocus algorithm at the end of the scan.\n\n-            This is similar to AfPauseImmediate, and if the AfState is\n-            currently reporting AfStateFocused or AfStateFailed it will remain\n-            in that state and AfPauseState will report AfPauseStatePaused.\n+            This is similar to AfPause.Immediate, and if the AfState is\n+            currently reporting AfState.Focused or AfState.Failed it will remain\n+            in that state and AfPauseState will report AfPauseState.Paused.\n\n-            However, if the algorithm is scanning (AfStateScanning),\n-            AfPauseState will report AfPauseStatePausing until the scan is\n-            finished, at which point AfState will report one of AfStateFocused\n-            or AfStateFailed, and AfPauseState will change to\n-            AfPauseStatePaused.\n+            However, if the algorithm is scanning (AfState.Scanning),\n+            AfPauseState will report AfPauseState.Pausing until the scan is\n+            finished, at which point AfState will report one of AfState.Focused\n+            or AfState.Failed, and AfPauseState will change to\n+            AfPauseState.Paused.\n\n-        - name: AfPauseResume\n+        - name: Resume\n           value: 2\n           description: |\n             Resume continuous autofocus operation.\n\n             The algorithm starts again from exactly where it left off, and\n-            AfPauseState will report AfPauseStateRunning.\n+            AfPauseState will report AfPauseState.Running.\n\n   - LensPosition:\n       type: float\n@@ -1032,7 +1032,7 @@ controls:\n         also reports back the position of the lens for each frame.\n\n         The LensPosition control is ignored unless the AfMode is set to\n-        AfModeManual, though the value is reported back unconditionally in all\n+        AfMode.Manual, though the value is reported back unconditionally in all\n         modes.\n\n         This value, which is generally a non-integer, is the reciprocal of the\n@@ -1069,50 +1069,50 @@ controls:\n         though we note the following state transitions that occur when the\n         AfMode is changed.\n\n-        If the AfMode is set to AfModeManual, then the AfState will always\n-        report AfStateIdle (even if the lens is subsequently moved). Changing\n-        to the AfModeManual state does not initiate any lens movement.\n+        If the AfMode is set to AfMode.Manual, then the AfState will always\n+        report AfState.Idle (even if the lens is subsequently moved). Changing\n+        to the AfMode.Manual state does not initiate any lens movement.\n\n-        If the AfMode is set to AfModeAuto then the AfState will report\n-        AfStateIdle. However, if AfModeAuto and AfTriggerStart are sent\n-        together then AfState will omit AfStateIdle and move straight to\n-        AfStateScanning (and start a scan).\n+        If the AfMode is set to AfMode.Auto then the AfState will report\n+        AfState.Idle. However, if AfMode.Auto and AfTrigger.Start are sent\n+        together then AfState will omit AfState.Idle and move straight to\n+        AfState.Scanning (and start a scan).\n\n-        If the AfMode is set to AfModeContinuous then the AfState will\n-        initially report AfStateScanning.\n+        If the AfMode is set to AfMode.Continuous then the AfState will\n+        initially report AfState.Scanning.\n\n       enum:\n-        - name: AfStateIdle\n+        - name: Idle\n           value: 0\n           description: |\n-            The AF algorithm is in manual mode (AfModeManual) or in auto mode\n-            (AfModeAuto) and a scan has not yet been triggered, or an\n+            The AF algorithm is in manual mode (AfMode.Manual) or in auto mode\n+            (AfMode.Auto) and a scan has not yet been triggered, or an\n             in-progress scan was cancelled.\n-        - name: AfStateScanning\n+        - name: Scanning\n           value: 1\n           description: |\n-            The AF algorithm is in auto mode (AfModeAuto), and a scan has been\n+            The AF algorithm is in auto mode (AfMode.Auto), and a scan has been\n             started using the AfTrigger control.\n\n-            The scan can be cancelled by sending AfTriggerCancel at which point\n-            the algorithm will either move back to AfStateIdle or, if the scan\n+            The scan can be cancelled by sending AfTrigger.Cancel at which point\n+            the algorithm will either move back to AfState.Idle or, if the scan\n             actually completes before the cancel request is processed, to one\n-            of AfStateFocused or AfStateFailed.\n+            of AfState.Focused or AfState.Failed.\n\n             Alternatively the AF algorithm could be in continuous mode\n-            (AfModeContinuous) at which point it may enter this state\n+            (AfMode.Continuous) at which point it may enter this state\n             spontaneously whenever it determines that a rescan is needed.\n-        - name: AfStateFocused\n+        - name: Focused\n           value: 2\n           description: |\n-            The AF algorithm is in auto (AfModeAuto) or continuous\n-            (AfModeContinuous) mode and a scan has completed with the result\n+            The AF algorithm is in auto (AfMode.Auto) or continuous\n+            (AfMode.Continuous) mode and a scan has completed with the result\n             that the algorithm believes the image is now in focus.\n-        - name: AfStateFailed\n+        - name: Failed\n           value: 3\n           description: |\n-            The AF algorithm is in auto (AfModeAuto) or continuous\n-            (AfModeContinuous) mode and a scan has completed with the result\n+            The AF algorithm is in auto (AfMode.Auto) or continuous\n+            (AfMode.Continuous) mode and a scan has completed with the result\n             that the algorithm did not find a good focus position.\n\n   - AfPauseState:\n@@ -1121,29 +1121,29 @@ controls:\n       description: |\n         Report whether the autofocus is currently running, paused or pausing.\n\n-        This control is only applicable in continuous (AfModeContinuous) mode,\n+        This control is only applicable in continuous (AfMode.Continuous) mode,\n         and reports whether the algorithm is currently running, paused or\n         pausing (that is, will pause as soon as any in-progress scan\n         completes).\n\n-        Any change to AfMode will cause AfPauseStateRunning to be reported.\n+        Any change to AfMode will cause AfPauseState.Running to be reported.\n\n       enum:\n-        - name: AfPauseStateRunning\n+        - name: Running\n           value: 0\n           description: |\n             Continuous AF is running and the algorithm may restart a scan\n             spontaneously.\n-        - name: AfPauseStatePausing\n+        - name: Pausing\n           value: 1\n           description: |\n             Continuous AF has been sent an AfPauseDeferred control, and will\n             pause as soon as any in-progress scan completes.\n\n             When the scan completes, the AfPauseState control will report\n-            AfPauseStatePaused. No new scans will be start spontaneously until\n+            AfPauseState.Paused. No new scans will be start spontaneously until\n             the AfPauseResume control is sent.\n-        - name: AfPauseStatePaused\n+        - name: Paused\n           value: 2\n           description: |\n             Continuous AF is paused.\n@@ -1170,13 +1170,13 @@ controls:\n         \\sa HdrChannel\n\n       enum:\n-        - name: HdrModeOff\n+        - name: \"Off\"\n           value: 0\n           description: |\n             HDR is disabled.\n\n             Metadata for this frame will not include the HdrChannel control.\n-        - name: HdrModeMultiExposureUnmerged\n+        - name: MultiExposureUnmerged\n           value: 1\n           description: |\n             Multiple exposures will be generated in an alternating fashion.\n@@ -1188,7 +1188,7 @@ controls:\n\n             The expectation is that an application using this mode would merge\n             the frames to create HDR images for itself if it requires them.\n-        - name: HdrModeMultiExposure\n+        - name: MultiExposure\n           value: 2\n           description: |\n             Multiple exposures will be generated and merged to create HDR\n@@ -1201,7 +1201,7 @@ controls:\n             alternately as the short and long channel. Systems that use three\n             channels for HDR will cycle through the short, medium and long\n             channel before repeating.\n-        - name: HdrModeSingleExposure\n+        - name: SingleExposure\n           value: 3\n           description: |\n             Multiple frames all at a single exposure will be used to create HDR\n@@ -1209,7 +1209,7 @@ controls:\n\n             These images should be reported as all corresponding to the HDR\n             short channel.\n-        - name: HdrModeNight\n+        - name: Night\n           value: 4\n           description: |\n             Multiple frames will be combined to produce \"night mode\" images.\n@@ -1235,20 +1235,20 @@ controls:\n         \\sa HdrMode\n\n       enum:\n-        - name: HdrChannelNone\n+        - name: None\n           value: 0\n           description: |\n             This image does not correspond to any of the captures used to create\n             an HDR image.\n-        - name: HdrChannelShort\n+        - name: Short\n           value: 1\n           description: |\n             This is a short exposure image.\n-        - name: HdrChannelMedium\n+        - name: Medium\n           value: 2\n           description: |\n             This is a medium exposure image.\n-        - name: HdrChannelLong\n+        - name: Long\n           value: 3\n           description: |\n             This is a long exposure image.\n@@ -1295,17 +1295,17 @@ controls:\n         The algorithm then compensates for the loss of brightness by applying a\n         global tone mapping curve to the image.\n       enum:\n-        - name: WdrOff\n+        - name: \"Off\"\n           value: 0\n           description: Wdr is disabled.\n-        - name: WdrLinear\n+        - name: Linear\n           value: 1\n           description:\n             Apply a linear global tone mapping curve.\n\n             A curve with two linear sections is applied. This produces good\n             results at the expense of a slightly artificial look.\n-        - name: WdrPower\n+        - name: Power\n           value: 2\n           description: |\n             Apply a power global tone mapping curve.\n@@ -1313,7 +1313,7 @@ controls:\n             This curve has high gain values on the dark areas of an image and\n             high compression values on the bright area. It therefore tends to\n             produce noticeable noise artifacts.\n-        - name: WdrExponential\n+        - name: Exponential\n           value: 3\n           description: |\n             Apply an exponential global tone mapping curve.\n@@ -1321,7 +1321,7 @@ controls:\n             This curve has lower gain values in dark areas compared to the power\n             curve but produces a more natural look compared to the linear curve.\n             It is therefore the best choice for most scenes.\n-        - name: WdrHistogramEqualization\n+        - name: HistogramEqualization\n           value: 4\n           description: |\n             Apply histogram equalization.\ndiff --git a/src/libcamera/control_ids_draft.yaml b/src/libcamera/control_ids_draft.yaml\nindex 03309eeac..c72675909 100644\n--- a/src/libcamera/control_ids_draft.yaml\n+++ b/src/libcamera/control_ids_draft.yaml\n@@ -18,13 +18,13 @@ controls:\n         Whether the camera device will trigger a precapture metering sequence\n         when it processes this request.\n       enum:\n-        - name: AePrecaptureTriggerIdle\n+        - name: Idle\n           value: 0\n           description: The trigger is idle.\n-        - name: AePrecaptureTriggerStart\n+        - name: Start\n           value: 1\n           description: The pre-capture AE metering is started by the camera.\n-        - name: AePrecaptureTriggerCancel\n+        - name: Cancel\n           value: 2\n           description: |\n             The camera will cancel any active or completed metering sequence.\n@@ -39,22 +39,22 @@ controls:\n\n         Mode of operation for the noise reduction algorithm.\n       enum:\n-        - name: NoiseReductionModeOff\n+        - name: \"Off\"\n           value: 0\n           description: No noise reduction is applied\n-        - name: NoiseReductionModeFast\n+        - name: Fast\n           value: 1\n           description: |\n             Noise reduction is applied without reducing the frame rate.\n-        - name: NoiseReductionModeHighQuality\n+        - name: HighQuality\n           value: 2\n           description: |\n             High quality noise reduction at the expense of frame rate.\n-        - name: NoiseReductionModeMinimal\n+        - name: Minimal\n           value: 3\n           description: |\n             Minimal noise reduction is applied without reducing the frame rate.\n-        - name: NoiseReductionModeZSL\n+        - name: ZSL\n           value: 4\n           description: |\n             Noise reduction is applied at different levels to different streams.\n@@ -68,13 +68,13 @@ controls:\n\n         Mode of operation for the chromatic aberration correction algorithm.\n       enum:\n-        - name: ColorCorrectionAberrationOff\n+        - name: \"Off\"\n           value: 0\n           description: No aberration correction is applied.\n-        - name: ColorCorrectionAberrationFast\n+        - name: Fast\n           value: 1\n           description: Aberration correction will not slow down the frame rate.\n-        - name: ColorCorrectionAberrationHighQuality\n+        - name: HighQuality\n           value: 2\n           description: |\n             High quality aberration correction which might reduce the frame\n@@ -89,16 +89,16 @@ controls:\n\n         Current state of the AWB algorithm.\n       enum:\n-        - name: AwbStateInactive\n+        - name: Inactive\n           value: 0\n           description: The AWB algorithm is inactive.\n-        - name: AwbStateSearching\n+        - name: Searching\n           value: 1\n           description: The AWB algorithm has not converged yet.\n-        - name: AwbConverged\n+        - name: Converged\n           value: 2\n           description: The AWB algorithm has converged.\n-        - name: AwbLocked\n+        - name: Locked\n           value: 3\n           description: The AWB algorithm is locked.\n\n@@ -117,10 +117,10 @@ controls:\n        Control to report if the lens shading map is available. Currently\n        identical to ANDROID_STATISTICS_LENS_SHADING_MAP_MODE.\n       enum:\n-        - name: LensShadingMapModeOff\n+        - name: \"Off\"\n           value: 0\n           description: No lens shading map mode is available.\n-        - name: LensShadingMapModeOn\n+        - name: \"On\"\n           value: 1\n           description: The lens shading map mode is available.\n\n@@ -156,18 +156,18 @@ controls:\n         Control to select the test pattern mode. Currently identical to\n         ANDROID_SENSOR_TEST_PATTERN_MODE.\n       enum:\n-        - name: TestPatternModeOff\n+        - name: \"Off\"\n           value: 0\n           description: |\n             No test pattern mode is used. The camera device returns frames from\n             the image sensor.\n-        - name: TestPatternModeSolidColor\n+        - name: SolidColor\n           value: 1\n           description: |\n             Each pixel in [R, G_even, G_odd, B] is replaced by its respective\n             color channel provided in test pattern data.\n             \\todo Add control for test pattern data.\n-        - name: TestPatternModeColorBars\n+        - name: ColorBars\n           value: 2\n           description: |\n             All pixel data is replaced with an 8-bar color pattern. The vertical\n@@ -177,10 +177,10 @@ controls:\n             should be rounded down to the nearest integer and the pattern can\n             repeat on the right side. Each bar's height must always take up the\n             full sensor pixel array height.\n-        - name: TestPatternModeColorBarsFadeToGray\n+        - name: ColorBarsFadeToGray\n           value: 3\n           description: |\n-            The test pattern is similar to TestPatternModeColorBars,\n+            The test pattern is similar to TestPatternMode.ColorBars,\n             except that each bar should start at its specified color at the top\n             and fade to gray at the bottom. Furthermore each bar is further\n             subdevided into a left and right half. The left half should have a\n@@ -191,7 +191,7 @@ controls:\n             from the most significant bits of the smooth gradient. The height of\n             each bar should always be a multiple of 128. When this is not the\n             case, the pattern should repeat at the bottom of the image.\n-        - name: TestPatternModePn9\n+        - name: Pn9\n           value: 4\n           description: |\n             All pixel data is replaced by a pseudo-random sequence generated\n@@ -199,7 +199,7 @@ controls:\n             a linear feedback shift register). The generator should be reset at\n             the beginning of each frame, and thus each subsequent raw frame with\n             this test pattern should be exactly the same as the last.\n-        - name: TestPatternModeCustom1\n+        - name: Custom1\n           value: 256\n           description: |\n             The first custom test pattern. All custom patterns that are\n@@ -221,19 +221,19 @@ controls:\n         \\sa FaceDetectFaceIds\n\n       enum:\n-        - name: FaceDetectModeOff\n+        - name: \"Off\"\n           value: 0\n           description: |\n             Pipeline doesn't perform face detection and doesn't report any\n             control related to face detection.\n-        - name: FaceDetectModeSimple\n+        - name: Simple\n           value: 1\n           description: |\n             Pipeline performs face detection and reports the\n             FaceDetectFaceRectangles and FaceDetectFaceScores controls for each\n             detected face. FaceDetectFaceLandmarks and FaceDetectFaceIds are\n             optional.\n-        - name: FaceDetectModeFull\n+        - name: Full\n           value: 2\n           description: |\n             Pipeline performs face detection and reports all the controls\ndiff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml\nindex a86151123..09f3fc6af 100644\n--- a/src/libcamera/control_ids_rpi.yaml\n+++ b/src/libcamera/control_ids_rpi.yaml\n@@ -94,16 +94,16 @@ controls:\n         \\sa SyncFrames\n\n       enum:\n-        - name: SyncModeOff\n+        - name: \"Off\"\n           value: 0\n           description: Disable sync mode.\n-        - name: SyncModeServer\n+        - name: Server\n           value: 1\n           description: |\n             Enable sync mode, act as server. The server broadcasts timing\n             messages to any clients that are listening, so that the clients can\n             synchronise their camera frames with the server's.\n-        - name: SyncModeClient\n+        - name: Client\n           value: 2\n           description: |\n             Enable sync mode, act as client. A client listens for any server\ndiff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\nindex 4b5816dfd..b6deb0091 100644\n--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n@@ -581,7 +581,7 @@ int UVCCameraData::init(MediaDevice *media)\n \t * come from the ACPI _PLD, but that may be even more unreliable than\n \t * the _UPC.\n \t */\n-\tproperties::LocationEnum location = properties::CameraLocationExternal;\n+\tproperties::LocationEnum location = properties::LocationExternal;\n \tstd::ifstream file(video_->devicePath() + \"/../removable\");\n \tif (file.is_open()) {\n \t\tstd::string value;\n@@ -589,7 +589,7 @@ int UVCCameraData::init(MediaDevice *media)\n \t\tfile.close();\n\n \t\tif (value == \"fixed\")\n-\t\t\tlocation = properties::CameraLocationFront;\n+\t\t\tlocation = properties::LocationFront;\n \t}\n\n \tproperties_.set(properties::Location, location);\ndiff --git a/src/libcamera/pipeline/virtual/README.md b/src/libcamera/pipeline/virtual/README.md\nindex a9f39c151..c14d3b6da 100644\n--- a/src/libcamera/pipeline/virtual/README.md\n+++ b/src/libcamera/pipeline/virtual/README.md\n@@ -36,7 +36,7 @@ Each camera block is a dictionary, containing the following keys:\n     - The path to a directory ends with \"/\". The name of the images in the\n       directory are \"{n}.jpg\" with {n} is the sequence of images starting with 0.\n - `location` (`string`, default=\"front\"): The location of the camera. Support\n-  \"CameraLocationFront\", \"CameraLocationBack\", and \"CameraLocationExternal\".\n+  \"Front\", \"Back\", and \"External\".\n - `model` (`string`, default=\"Unknown\"): The model name of the camera.\n\n Check `data/virtual.yaml` as the sample config file.\ndiff --git a/src/libcamera/pipeline/virtual/config_parser.cpp b/src/libcamera/pipeline/virtual/config_parser.cpp\nindex 1d3d9ba87..93c15e9b3 100644\n--- a/src/libcamera/pipeline/virtual/config_parser.cpp\n+++ b/src/libcamera/pipeline/virtual/config_parser.cpp\n@@ -233,8 +233,8 @@ int ConfigParser::parseFrameGenerator(const YamlObject &cameraConfigData, Virtua\n\n int ConfigParser::parseLocation(const YamlObject &cameraConfigData, VirtualCameraData *data)\n {\n-\t/* Default value is properties::CameraLocationFront */\n-\tint32_t location = properties::CameraLocationFront;\n+\t/* Default value is properties::LocationFront */\n+\tint32_t location = properties::LocationFront;\n\n \tif (auto l = cameraConfigData[\"location\"].get<std::string>()) {\n \t\tauto it = properties::LocationNameValueMap.find(*l);\ndiff --git a/src/libcamera/pipeline/virtual/data/virtual.yaml b/src/libcamera/pipeline/virtual/data/virtual.yaml\nindex 20471bb94..767107bbe 100644\n--- a/src/libcamera/pipeline/virtual/data/virtual.yaml\n+++ b/src/libcamera/pipeline/virtual/data/virtual.yaml\n@@ -14,7 +14,7 @@\n     - 70\n     - 80\n   test_pattern: \"lines\"\n-  location: \"CameraLocationFront\"\n+  location: \"Front\"\n   model: \"Virtual Video Device\"\n \"Virtual1\":\n   supported_formats:\n@@ -23,14 +23,14 @@\n     frame_rates:\n     - 60\n   test_pattern: \"bars\"\n-  location: \"CameraLocationBack\"\n+  location: \"Back\"\n   model: \"Virtual Video Device1\"\n \"Virtual2\":\n   supported_formats:\n   - width: 400\n     height: 300\n   test_pattern: \"lines\"\n-  location: \"CameraLocationFront\"\n+  location: \"Front\"\n   model: \"Virtual Video Device2\"\n \"Virtual3\":\n   test_pattern: \"bars\"\ndiff --git a/src/libcamera/property_ids_core.yaml b/src/libcamera/property_ids_core.yaml\nindex 834454a4e..f1da19ca3 100644\n--- a/src/libcamera/property_ids_core.yaml\n+++ b/src/libcamera/property_ids_core.yaml\n@@ -11,17 +11,17 @@ controls:\n       description: |\n         Camera mounting location\n       enum:\n-        - name: CameraLocationFront\n+        - name: Front\n           value: 0\n           description: |\n             The camera is mounted on the front side of the device, facing the\n             user\n-        - name: CameraLocationBack\n+        - name: Back\n           value: 1\n           description: |\n             The camera is mounted on the back side of the device, facing away\n             from the user\n-        - name: CameraLocationExternal\n+        - name: External\n           value: 2\n           description: |\n             The camera is attached to the device in a way that allows it to\ndiff --git a/src/libcamera/sensor/camera_sensor_legacy.cpp b/src/libcamera/sensor/camera_sensor_legacy.cpp\nindex f9e685a9a..0eaa46793 100644\n--- a/src/libcamera/sensor/camera_sensor_legacy.cpp\n+++ b/src/libcamera/sensor/camera_sensor_legacy.cpp\n@@ -580,13 +580,13 @@ int CameraSensorLegacy::initProperties()\n \t\t\t\t<< v4l2Orientation << \", setting to External\";\n \t\t\t[[fallthrough]];\n \t\tcase V4L2_CAMERA_ORIENTATION_EXTERNAL:\n-\t\t\tpropertyValue = properties::CameraLocationExternal;\n+\t\t\tpropertyValue = properties::LocationExternal;\n \t\t\tbreak;\n \t\tcase V4L2_CAMERA_ORIENTATION_FRONT:\n-\t\t\tpropertyValue = properties::CameraLocationFront;\n+\t\t\tpropertyValue = properties::LocationFront;\n \t\t\tbreak;\n \t\tcase V4L2_CAMERA_ORIENTATION_BACK:\n-\t\t\tpropertyValue = properties::CameraLocationBack;\n+\t\t\tpropertyValue = properties::LocationBack;\n \t\t\tbreak;\n \t\t}\n \t\tproperties_.set(properties::Location, propertyValue);\n@@ -627,19 +627,19 @@ int CameraSensorLegacy::initProperties()\n \t\tint32_t cfa;\n \t\tswitch (bayerFormat_->order) {\n \t\tcase BayerFormat::BGGR:\n-\t\t\tcfa = properties::draft::BGGR;\n+\t\t\tcfa = properties::draft::ColorFilterArrangementBGGR;\n \t\t\tbreak;\n \t\tcase BayerFormat::GBRG:\n-\t\t\tcfa = properties::draft::GBRG;\n+\t\t\tcfa = properties::draft::ColorFilterArrangementGBRG;\n \t\t\tbreak;\n \t\tcase BayerFormat::GRBG:\n-\t\t\tcfa = properties::draft::GRBG;\n+\t\t\tcfa = properties::draft::ColorFilterArrangementGRBG;\n \t\t\tbreak;\n \t\tcase BayerFormat::RGGB:\n-\t\t\tcfa = properties::draft::RGGB;\n+\t\t\tcfa = properties::draft::ColorFilterArrangementRGGB;\n \t\t\tbreak;\n \t\tcase BayerFormat::MONO:\n-\t\t\tcfa = properties::draft::MONO;\n+\t\t\tcfa = properties::draft::ColorFilterArrangementMONO;\n \t\t\tbreak;\n \t\t}\n\n@@ -900,7 +900,7 @@ int CameraSensorLegacy::sensorInfo(IPACameraSensorInfo *info) const\n \tinfo->outputSize = format.size;\n\n \tstd::optional<int32_t> cfa = properties_.get(properties::draft::ColorFilterArrangement);\n-\tinfo->cfaPattern = cfa ? *cfa : properties::draft::RGB;\n+\tinfo->cfaPattern = cfa ? *cfa : properties::draft::ColorFilterArrangementRGB;\n\n \t/*\n \t * Retrieve the pixel rate, line length and minimum/maximum frame\ndiff --git a/src/libcamera/sensor/camera_sensor_raw.cpp b/src/libcamera/sensor/camera_sensor_raw.cpp\nindex 8ea442369..dd862c2cc 100644\n--- a/src/libcamera/sensor/camera_sensor_raw.cpp\n+++ b/src/libcamera/sensor/camera_sensor_raw.cpp\n@@ -585,13 +585,13 @@ int CameraSensorRaw::initProperties()\n \t\t\t\t<< v4l2Orientation << \", setting to External\";\n \t\t\t[[fallthrough]];\n \t\tcase V4L2_CAMERA_ORIENTATION_EXTERNAL:\n-\t\t\tpropertyValue = properties::CameraLocationExternal;\n+\t\t\tpropertyValue = properties::LocationExternal;\n \t\t\tbreak;\n \t\tcase V4L2_CAMERA_ORIENTATION_FRONT:\n-\t\t\tpropertyValue = properties::CameraLocationFront;\n+\t\t\tpropertyValue = properties::LocationFront;\n \t\t\tbreak;\n \t\tcase V4L2_CAMERA_ORIENTATION_BACK:\n-\t\t\tpropertyValue = properties::CameraLocationBack;\n+\t\t\tpropertyValue = properties::LocationBack;\n \t\t\tbreak;\n \t\t}\n \t\tproperties_.set(properties::Location, propertyValue);\n@@ -632,20 +632,20 @@ int CameraSensorRaw::initProperties()\n\n \tswitch (cfaPattern_) {\n \tcase BayerFormat::BGGR:\n-\t\tcfa = properties::draft::BGGR;\n+\t\tcfa = properties::draft::ColorFilterArrangementBGGR;\n \t\tbreak;\n \tcase BayerFormat::GBRG:\n-\t\tcfa = properties::draft::GBRG;\n+\t\tcfa = properties::draft::ColorFilterArrangementGBRG;\n \t\tbreak;\n \tcase BayerFormat::GRBG:\n-\t\tcfa = properties::draft::GRBG;\n+\t\tcfa = properties::draft::ColorFilterArrangementGRBG;\n \t\tbreak;\n \tcase BayerFormat::RGGB:\n-\t\tcfa = properties::draft::RGGB;\n+\t\tcfa = properties::draft::ColorFilterArrangementRGGB;\n \t\tbreak;\n \tcase BayerFormat::MONO:\n \tdefault:\n-\t\tcfa = properties::draft::MONO;\n+\t\tcfa = properties::draft::ColorFilterArrangementMONO;\n \t\tbreak;\n \t}\n\n@@ -1015,7 +1015,7 @@ int CameraSensorRaw::sensorInfo(IPACameraSensorInfo *info) const\n \tinfo->outputSize = format.size;\n\n \tstd::optional<int32_t> cfa = properties_.get(properties::draft::ColorFilterArrangement);\n-\tinfo->cfaPattern = cfa ? *cfa : properties::draft::RGB;\n+\tinfo->cfaPattern = cfa ? *cfa : properties::draft::ColorFilterArrangementRGB;\n\n \t/*\n \t * Retrieve the pixel rate, line length and minimum/maximum frame\ndiff --git a/src/py/libcamera/gen-py-controls.py b/src/py/libcamera/gen-py-controls.py\nindex d43a7c1c7..a72521d62 100755\n--- a/src/py/libcamera/gen-py-controls.py\n+++ b/src/py/libcamera/gen-py-controls.py\n@@ -11,18 +11,6 @@ import yaml\n from controls import Control\n\n\n-def find_common_prefix(strings):\n-    prefix = strings[0]\n-\n-    for string in strings[1:]:\n-        while string[:len(prefix)] != prefix and prefix:\n-            prefix = prefix[:len(prefix) - 1]\n-        if not prefix:\n-            break\n-\n-    return prefix\n-\n-\n def extend_control(ctrl, mode):\n     if ctrl.vendor != 'libcamera':\n         ctrl.klass = ctrl.vendor\n@@ -31,22 +19,6 @@ def extend_control(ctrl, mode):\n         ctrl.klass = mode\n         ctrl.namespace = ''\n\n-    if not ctrl.is_enum:\n-        return ctrl\n-\n-    if mode == 'controls':\n-        # Adjustments for controls\n-        if ctrl.name == 'LensShadingMapMode':\n-            prefix = 'LensShadingMapMode'\n-        else:\n-            prefix = find_common_prefix([e.name for e in ctrl.enum_values])\n-    else:\n-        # Adjustments for properties\n-        prefix = find_common_prefix([e.name for e in ctrl.enum_values])\n-\n-    for enum in ctrl.enum_values:\n-        enum.py_name = enum.name[len(prefix):]\n-\n     return ctrl\n\n\ndiff --git a/src/py/libcamera/py_controls_generated.cpp.in b/src/py/libcamera/py_controls_generated.cpp.in\nindex 22a132d19..b1a2817a5 100644\n--- a/src/py/libcamera/py_controls_generated.cpp.in\n+++ b/src/py/libcamera/py_controls_generated.cpp.in\n@@ -39,7 +39,7 @@ void init_py_{{mode}}_generated(py::module& m)\n\n         py::enum_<libcamera::{{mode}}::{{ctrl.namespace}}{{ctrl.name}}Enum>({{ctrl.klass}}, \"{{ctrl.name}}Enum\")\n {%- for enum in ctrl.enum_values %}\n-                .value(\"{{enum.py_name}}\", libcamera::{{mode}}::{{ctrl.namespace}}{{enum.name}})\n+                .value(\"{{enum.name}}\", libcamera::{{mode}}::{{ctrl.namespace}}{{enum.prefixed_name}})\n {%- endfor %}\n         ;\n {%- endif %}\ndiff --git a/utils/codegen/controls.py b/utils/codegen/controls.py\nindex e51610481..ff39f988e 100644\n--- a/utils/codegen/controls.py\n+++ b/utils/codegen/controls.py\n@@ -21,6 +21,11 @@ class ControlEnum(object):\n         \"\"\"The enum name\"\"\"\n         return self.__data.get('name')\n\n+    @property\n+    def prefixed_name(self):\n+        \"\"\"The prefixed enum name\"\"\"\n+        return self.__data.get('prefixed_name')\n+\n     @property\n     def value(self):\n         \"\"\"The enum value\"\"\"\n@@ -37,7 +42,19 @@ class Control(object):\n\n         enum_values = data.get('enum')\n         if enum_values is not None:\n-            self.__enum_values = [ControlEnum(enum) for enum in enum_values]\n+            for enum in enum_values:\n+                ename = enum['name']\n+                if type(ename) is not str:\n+                    raise ValueError(f'Control `{self.__name}` enumerator `{ename}` has a non-string name.')\n+                if not ename[0].isupper():\n+                    raise ValueError(f'Control `{self.__name}` enumerator `{ename}` must start with an uppercase letter.')\n+                if ename.lower().startswith(name.lower()):\n+                    raise ValueError(f'Control `{self.__name}` enumerator `{ename}` must not be prefixed with the control name.')\n+\n+            self.__enum_values = [ControlEnum({\n+                **enum,\n+                'prefixed_name': name + enum['name'],\n+            }) for enum in enum_values]\n\n         size = self.__data.get('size')\n         if size is not None:\ndiff --git a/utils/codegen/gen-gst-controls.py b/utils/codegen/gen-gst-controls.py\nindex 4ca76049e..43e869c07 100755\n--- a/utils/codegen/gen-gst-controls.py\n+++ b/utils/codegen/gen-gst-controls.py\n@@ -29,18 +29,6 @@ exposed_controls = [\n ]\n\n\n-def find_common_prefix(strings):\n-    prefix = strings[0]\n-\n-    for string in strings[1:]:\n-        while string[:len(prefix)] != prefix and prefix:\n-            prefix = prefix[:len(prefix) - 1]\n-        if not prefix:\n-            break\n-\n-    return prefix\n-\n-\n def format_description(description):\n     # Substitute doxygen keywords \\sa (see also) and \\todo\n     description = re.sub(r'\\\\sa((?: \\w+)+)',\n@@ -94,11 +82,6 @@ def extend_control(ctrl):\n     ctrl.is_array = ctrl.size is not None\n\n     if ctrl.is_enum:\n-        # Remove common prefix from enum variant names\n-        prefix = find_common_prefix([enum.name for enum in ctrl.enum_values])\n-        for enum in ctrl.enum_values:\n-            enum.gst_name = kebab_case(enum.name.removeprefix(prefix))\n-\n         ctrl.gtype = 'enum'\n         ctrl.default = '0'\n     elif ctrl.element_type == 'bool':\ndiff --git a/utils/tuning/config-example.yaml b/utils/tuning/config-example.yaml\nindex 5593eaef8..845332324 100644\n--- a/utils/tuning/config-example.yaml\n+++ b/utils/tuning/config-example.yaml\n@@ -23,29 +23,29 @@ general:\n         ct: [ 2000, 13000 ]\n         probability: [ 1.0, 1.0 ]\n     AwbMode:\n-      AwbAuto:\n+      Auto:\n         lo: 2500\n         hi: 8000\n-      AwbIncandescent:\n+      Incandescent:\n         lo: 2500\n         hi: 3000\n-      AwbTungsten:\n+      Tungsten:\n         lo: 3000\n         hi: 3500\n-      AwbFluorescent:\n+      Fluorescent:\n         lo: 4000\n         hi: 4700\n-      AwbIndoor:\n+      Indoor:\n         lo: 3000\n         hi: 5000\n-      AwbDaylight:\n+      Daylight:\n         lo: 5500\n         hi: 6500\n-      AwbCloudy:\n+      Cloudy:\n         lo: 6500\n         hi: 8000\n       # One custom mode can be defined if needed\n-      #AwbCustom:\n+      #Custom:\n       #  lo: 2000\n       #  hi: 1300\n   macbeth:\ndiff --git a/utils/tuning/libtuning/modules/agc/rkisp1.py b/utils/tuning/libtuning/modules/agc/rkisp1.py\nindex 2dad3a09c..8a0aa5341 100644\n--- a/utils/tuning/libtuning/modules/agc/rkisp1.py\n+++ b/utils/tuning/libtuning/modules/agc/rkisp1.py\n@@ -41,9 +41,9 @@ class AGCRkISP1(AGC):\n         matrix = [1 for i in range(0, 25)]\n\n         return {\n-            'MeteringCentreWeighted': centre_weighted,\n-            'MeteringSpot': spot,\n-            'MeteringMatrix': matrix\n+            'CentreWeighted': centre_weighted,\n+            'Spot': spot,\n+            'Matrix': matrix\n         }\n\n     def _generate_exposure_modes(self) -> dict:\n@@ -52,7 +52,7 @@ class AGCRkISP1(AGC):\n         short = {'exposureTime': [100, 5000, 10000, 20000, 120000],\n                  'gain': [2.0, 4.0, 6.0, 6.0, 6.0]}\n\n-        return {'ExposureNormal': normal, 'ExposureShort': short}\n+        return {'Normal': normal, 'Short': short}\n\n     def _generate_constraint_modes(self) -> dict:\n         normal = {'lower': {'qLo': 0.98, 'qHi': 1.0, 'yTarget': 0.5}}\n@@ -61,7 +61,7 @@ class AGCRkISP1(AGC):\n             'upper': {'qLo': 0.98, 'qHi': 1.0, 'yTarget': 0.8}\n         }\n\n-        return {'ConstraintNormal': normal, 'ConstraintHighlight': highlight}\n+        return {'Normal': normal, 'Highlight': highlight}\n\n     def _generate_y_target(self) -> list:\n         return 0.5\n",
    "prefixes": [
        "RFC",
        "v3"
    ]
}