summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>2021-03-09 07:38:27 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-03-11 02:13:27 +0200
commit3b338aa5e759609210079b8883e5a289fb0c1bc0 (patch)
treea26cee37d022ae5e7d9219fd3a38e13be0d13972 /src
parentd3cf0fed3e3139a8ae4b93fe661d4603e1b1115f (diff)
libcamera: media_device: Add hwRevision method
Add a method 'hwRevision' to return the info.hw_version reported by the driver. Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/media_device.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp
index 8987de12..9ec84e56 100644
--- a/src/libcamera/media_device.cpp
+++ b/src/libcamera/media_device.cpp
@@ -231,6 +231,7 @@ int MediaDevice::populate()
driver_ = info.driver;
model_ = info.model;
version_ = info.media_version;
+ hwRevision_ = info.hw_revision;
/*
* Keep calling G_TOPOLOGY until the version number stays stable.
@@ -324,6 +325,15 @@ done:
*/
/**
+ * \fn MediaDevice::hwRevision()
+ * \brief Retrieve the media device hardware revision
+ *
+ * The hardware revision is in a driver-specific format.
+ *
+ * \return The MediaDevice hardware revision
+ */
+
+/**
* \fn MediaDevice::entities()
* \brief Retrieve the list of entities in the media graph
* \return The list of MediaEntities registered in the MediaDevice