Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp640451lqp; Wed, 12 Jun 2024 11:33:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWo/ZSQ/mNNWH+W2XFez4sqwSkuNqHcMwnaAv/NcdIrKKM7eQMw3cyZv9lxW+4J9yIcSSeHQ3Oe3dA8mXsdPAheYH8tLhd0y3F750USbg== X-Google-Smtp-Source: AGHT+IE4bh5Igmg2U6kVObeoZ6YNT6pVMy0AltDrRdDidRa0Z33dEIa10O8KrZOaBWSzE/vQbfKo X-Received: by 2002:a50:8e43:0:b0:57c:7826:1dc with SMTP id 4fb4d7f45d1cf-57ca978fab5mr2234257a12.8.1718217238324; Wed, 12 Jun 2024 11:33:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718217238; cv=pass; d=google.com; s=arc-20160816; b=WEjMP4hUeXIfYxxkGApeW7AZMzC7kQTsWpHCc6f2af0F4h25U2Sl3lRcTuKCzpGw0s OF0D+K6RW9EjjC/lmlaodq9As3pzEaC0HFCiT+bC5Po4+YoOAawIhRiD19Q+fGk/Jvj7 tCfuEgmz/ohuHQSS6QLefh+ESHsCxdA2cX9/Fp/FSkP1LYpl4jw9l+/f/6iA5NRs30KI 33gc+9cCVaSTdkPFRqLY1Z0NGcA9245/sXp7hUQ3RcIwEfcCbUL73RKYthzQx/iK84M2 aZ/3sMdOmAd0TOhvbbMKRtwC5AbbkTDm0cNV4JphBFxem6bWVxAmZYrELWzjCu4IMpXn TLAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=14UG9UyJhqFJoSfpe170ji3/yeaELGWruWx8Zn62VRk=; fh=6nb0w3qDgN3Pzg4UlELQK12h8GdLXv15ZM+/W3X0FD4=; b=ICdeZcSN0Kc7szQRcDwatZ+tKmNe7+TAzsW3V9MQY+oltV1mHyJd2tvbeJKLYax5vg q0g7UNYS37npTVIj4HTcJ7oXTbmXW/7316Vh+aooFJBN1HcVsyyamMgWLs75qlt2DWGm rPAcklF5bdAnLthzIXSbTC1WScL1t/m67StMLfM/qmb9MQnLkYIMtxlTZnmWxtjUzHNW 8kp+OkNK5OlkY6v2PJnOANeGphYH/Pm9mT41KF7ZUMHCjeKkM11ecDc4CWDjlMMC4oin M86qzUKuxTZu74BmhfH4nVro8pmDHWybtE5/AWBnynwGL7Hw+YfEXmzYUZPqp3x9V1RR kqwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=irl.hu dmarc=pass fromdomain=irl.hu); spf=pass (google.com: domain of linux-kernel+bounces-212082-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212082-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c7e110e3esi4153268a12.278.2024.06.12.11.33.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 11:33:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212082-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=irl.hu dmarc=pass fromdomain=irl.hu); spf=pass (google.com: domain of linux-kernel+bounces-212082-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212082-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DDFAD1F21A2F for ; Wed, 12 Jun 2024 18:33:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 87DC282C67; Wed, 12 Jun 2024 18:31:36 +0000 (UTC) Received: from irl.hu (irl.hu [95.85.9.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CEE18003F; Wed, 12 Jun 2024 18:31:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.85.9.111 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718217096; cv=none; b=e7iIsLgJxHFfers0YrZy8qaOG2vCsvwM7MJTZngJUy4wo3dOtfI27d3zE31hg4XoAUp3Y6fijnv3G/TMhGv5pTJrEGiCP4IobHI34TT87VWh1GbjeO0cYx7Tft7XZdg4Hm8Qiq8uVNgD/cq62YsevOTbIehW8LspHFi0FqjexKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718217096; c=relaxed/simple; bh=KJpri+IbVnAoZKMxYgYMeN+Mhz/Vw1rvPuNwlL7jfN4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Mime-Version:Content-Type; b=EqJs1Orl74d3AdKOwtCvwc3TGHW9boZ5lYNHKZ4xZXRl7tnVM0l/1vPjjm/o4KLAR8D9NW5M1NbF5uQFu1Q2kbyv/BcZWBHZ4PEvMlIyKTmpVxXBXme+Y74Ub8D/RIBlKt4cvoN21nmhxTgFZg5A6MEeeLO6LJnDNofeUQYjpE0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=irl.hu; spf=pass smtp.mailfrom=irl.hu; arc=none smtp.client-ip=95.85.9.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=irl.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=irl.hu Received: from fedori.lan (c3e47615.dsl.pool.telekom.hu [::ffff:195.228.118.21]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 0000000000070662.000000006669E981.0016B242; Wed, 12 Jun 2024 20:31:28 +0200 From: Gergo Koteles To: Mauro Carvalho Chehab , Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Gergo Koteles Subject: [PATCH 1/2] media: v4l2: ctrls: Add ROLL_ABSOLUTE control Date: Wed, 12 Jun 2024 20:31:13 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 Add V4L2_CID_ROLL_ABSOLUTE as an integer control to retrieve and set the camera roll in degrees, and its documentation. Signed-off-by: Gergo Koteles --- Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst | 5 +++++ drivers/media/v4l2-core/v4l2-ctrls-defs.c | 1 + include/uapi/linux/v4l2-controls.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst index cdc515c60468..81bc31a4bf79 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst @@ -672,3 +672,8 @@ enum v4l2_scene_mode - As modes differ for each sensor, menu items are not standardized by this control and are left to the programmer. + +``V4L2_CID_ROLL_ABSOLUTE (integer)`` + This control describes the camera rotation along the image viewing axis in + degrees. Values range from -180 to +180, the default is zero. Positive + values rotate the camera clockwise, negative values counter-clockwise. diff --git a/drivers/media/v4l2-core/v4l2-ctrls-defs.c b/drivers/media/v4l2-core/v4l2-ctrls-defs.c index 8696eb1cdd61..0e8af56cb2a2 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls-defs.c +++ b/drivers/media/v4l2-core/v4l2-ctrls-defs.c @@ -1086,6 +1086,7 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_CAMERA_ORIENTATION: return "Camera Orientation"; case V4L2_CID_CAMERA_SENSOR_ROTATION: return "Camera Sensor Rotation"; case V4L2_CID_HDR_SENSOR_MODE: return "HDR Sensor Mode"; + case V4L2_CID_ROLL_ABSOLUTE: return "Roll, Absolute"; /* FM Radio Modulator controls */ /* Keep the order of the 'case's the same as in v4l2-controls.h! */ diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 99c3f5e99da7..a6d28e54bbc0 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -1087,6 +1087,8 @@ enum v4l2_auto_focus_range { #define V4L2_CID_HDR_SENSOR_MODE (V4L2_CID_CAMERA_CLASS_BASE+36) +#define V4L2_CID_ROLL_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+37) + /* FM Modulator class control IDs */ #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) -- 2.45.2