f/a: Add Lineage patch for camera service

This commit is contained in:
Peter Cai 2024-03-27 20:13:12 -04:00
parent bc7032fc54
commit 23d4cb289c
6 changed files with 58 additions and 10 deletions

View file

@ -1,7 +1,7 @@
From ea475bf0af44eaaa124ce6113f9aa05d6d6daa1a Mon Sep 17 00:00:00 2001
From 8ce083670ba59e4ddd33895d491a050744dcc134 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Wed, 24 Aug 2022 15:42:39 -0400
Subject: [PATCH 1/5] APM: Optionally force-load audio policy for system-side
Subject: [PATCH 1/6] APM: Optionally force-load audio policy for system-side
bt audio HAL
Required to support our system-side bt audio implementation, i.e.

View file

@ -1,7 +1,7 @@
From bb39db1a329a76edb2f936fbec305dc561638177 Mon Sep 17 00:00:00 2001
From 54dd7999a1345914fed398daf604522f0e177227 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Thu, 25 Aug 2022 13:30:29 -0400
Subject: [PATCH 2/5] APM: Remove A2DP audio ports from the primary HAL
Subject: [PATCH 2/6] APM: Remove A2DP audio ports from the primary HAL
These ports defined in the primary HAL are intended for A2DP offloading,
however they do not work in general on GSIs, and will interfere with

View file

@ -1,7 +1,7 @@
From b0898400ce6154291505edb284a63f2991cac382 Mon Sep 17 00:00:00 2001
From fc5eda105a6c5bdc57a75d6fc459c7041dc87dde Mon Sep 17 00:00:00 2001
From: ponces <ponces26@gmail.com>
Date: Mon, 24 Oct 2022 09:38:34 +0100
Subject: [PATCH 3/5] voip: Fix high pitched voice on Qualcomm devices
Subject: [PATCH 3/6] voip: Fix high pitched voice on Qualcomm devices
Change-Id: I6d314912169776b76d07d8c0301ec5249c1870a2
---

View file

@ -1,7 +1,7 @@
From ecc5b31e7fbc1875deee1befd4d1b29e98db8836 Mon Sep 17 00:00:00 2001
From a7b1332761ec195370f701ec38d81d37c7fb082c Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Thu, 18 Aug 2022 15:44:46 -0400
Subject: [PATCH 4/5] APM: Restore S, R and Q behavior respectively for
Subject: [PATCH 4/6] APM: Restore S, R and Q behavior respectively for
telephony audio
This conditionally reverts part of b2e5cb (T), 51c9cc (S) and afd4ce (R)

View file

@ -1,7 +1,7 @@
From 91ae0a3a9df1e37856cf0065bb24b7c27bb40ba4 Mon Sep 17 00:00:00 2001
From d118ce30ea1536f2883e23636d74b90973e3ebf5 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 5 Aug 2019 18:09:50 +0200
Subject: [PATCH 5/5] Fix BT in-call on CAF devices
Subject: [PATCH 5/6] Fix BT in-call on CAF devices
See https://github.com/phhusson/treble_experimentations/issues/374

View file

@ -0,0 +1,48 @@
From ab96b0bbaa4bd636121f8015cf9b0406625513d2 Mon Sep 17 00:00:00 2001
From: danielml <daniel@danielml.dev>
Date: Tue, 26 Mar 2024 11:49:00 +0100
Subject: [PATCH 6/6] libcameraservice: Use the correct vendor tag id type on
filterParameters
This fixes an overflow caused by using the `int` type, thus breaking
the camera on cases where the actual vendor tag id is bigger than the
maximum value `int` can hold.
Test: Open camera, make sure that preview shows correctly and that
there are no vendor tag errors in logs.
Change-Id: Ia00e9e3fcc737bfaf0a917f11690f15d686441ba
Signed-off-by: danielml <daniel@danielml.dev>
---
.../camera/libcameraservice/utils/SessionConfigurationUtils.cpp | 2 +-
.../camera/libcameraservice/utils/SessionConfigurationUtils.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp b/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp
index 3be8e15161..384f53e23d 100644
--- a/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp
+++ b/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp
@@ -1133,7 +1133,7 @@ status_t mapRequestTemplateToAidl(camera_request_template_t templateId,
}
void filterParameters(const CameraMetadata& src, const CameraMetadata& deviceInfo,
- int vendorTagId, CameraMetadata& dst) {
+ metadata_vendor_id_t vendorTagId, CameraMetadata& dst) {
const CameraMetadata params(src);
camera_metadata_ro_entry_t availableSessionKeys = deviceInfo.find(
ANDROID_REQUEST_AVAILABLE_SESSION_KEYS);
diff --git a/services/camera/libcameraservice/utils/SessionConfigurationUtils.h b/services/camera/libcameraservice/utils/SessionConfigurationUtils.h
index 29e3eca9af..5b2ea5c06f 100644
--- a/services/camera/libcameraservice/utils/SessionConfigurationUtils.h
+++ b/services/camera/libcameraservice/utils/SessionConfigurationUtils.h
@@ -177,7 +177,7 @@ status_t mapRequestTemplateToAidl(camera_request_template_t templateId,
aidl::android::hardware::camera::device::RequestTemplate* tempId /*out*/);
void filterParameters(const CameraMetadata& src, const CameraMetadata& deviceInfo,
- int vendorTagId, CameraMetadata& dst);
+ metadata_vendor_id_t vendorTagId, CameraMetadata& dst);
constexpr int32_t MAX_SURFACES_PER_STREAM = 4;
--
2.43.1