Sync up to v219
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
From a280506c41623f2c2e0f96651189ec4b5e19bad1 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 14 May 2020 19:54:55 +0200
|
||||
Subject: [PATCH] Add persist.sys.phh.samsung.camera_ids property to access
|
||||
hidden Samsung cameras
|
||||
|
||||
---
|
||||
services/camera/libcameraservice/Android.bp | 1 +
|
||||
.../common/CameraProviderManager.cpp | 13 +++++++++++--
|
||||
2 files changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/Android.bp b/services/camera/libcameraservice/Android.bp
|
||||
index c4bc0f1a9..d6a4d6132 100644
|
||||
--- a/services/camera/libcameraservice/Android.bp
|
||||
+++ b/services/camera/libcameraservice/Android.bp
|
||||
@@ -108,6 +108,7 @@ cc_library_shared {
|
||||
"android.hardware.camera.device@3.4",
|
||||
"android.hardware.camera.device@3.5",
|
||||
"vendor.lineage.camera.motor@1.0",
|
||||
+ "vendor.samsung.hardware.camera.provider@3.0",
|
||||
],
|
||||
|
||||
export_shared_lib_headers: [
|
||||
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
index fdb565750..9c1c70c84 100644
|
||||
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "CameraProviderManager.h"
|
||||
|
||||
#include <android/hardware/camera/device/3.5/ICameraDevice.h>
|
||||
+#include <vendor/samsung/hardware/camera/provider/3.0/ISehCameraProvider.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <chrono>
|
||||
@@ -1225,6 +1226,9 @@ status_t CameraProviderManager::ProviderInfo::initialize(
|
||||
mMinorVersion = 4;
|
||||
}
|
||||
|
||||
+ auto samsungCast = vendor::samsung::hardware::camera::provider::V3_0::ISehCameraProvider::castFrom(interface);
|
||||
+ auto samsungProvider = samsungCast.isOk() ? static_cast<sp<vendor::samsung::hardware::camera::provider::V3_0::ISehCameraProvider>>(samsungCast) : nullptr;
|
||||
+
|
||||
// cameraDeviceStatusChange callbacks may be called (and causing new devices added)
|
||||
// before setCallback returns
|
||||
hardware::Return<Status> status = interface->setCallback(this);
|
||||
@@ -1269,7 +1273,7 @@ status_t CameraProviderManager::ProviderInfo::initialize(
|
||||
|
||||
// Get initial list of camera devices, if any
|
||||
std::vector<std::string> devices;
|
||||
- hardware::Return<void> ret = interface->getCameraIdList([&status, this, &devices](
|
||||
+ auto cb = [&status, this, &devices](
|
||||
Status idStatus,
|
||||
const hardware::hidl_vec<hardware::hidl_string>& cameraDeviceNames) {
|
||||
status = idStatus;
|
||||
@@ -1286,7 +1290,12 @@ status_t CameraProviderManager::ProviderInfo::initialize(
|
||||
mProviderPublicCameraIds.push_back(id);
|
||||
}
|
||||
}
|
||||
- } });
|
||||
+ } };
|
||||
+ hardware::Return<void> ret;
|
||||
+ if(samsungProvider != nullptr && property_get_bool("persist.sys.phh.samsung.camera_ids", false))
|
||||
+ ret = samsungProvider->sehGetCameraIdList(cb);
|
||||
+ else
|
||||
+ ret = interface->getCameraIdList(cb);
|
||||
if (!ret.isOk()) {
|
||||
ALOGE("%s: Transaction error in getting camera ID list from provider '%s': %s",
|
||||
__FUNCTION__, mProviderName.c_str(), linked.description().c_str());
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From 51622b87d04e709067335e38ae2257c21dde00a5 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 19 May 2020 14:01:14 +0200
|
||||
Subject: [PATCH 23/24] Add a property to force camera timestamp source
|
||||
|
||||
Some devices wrongly report their timesource
|
||||
Camera's timesource can either be CLOCK_MONOTONIC, or CLOCK_BOOTTIME
|
||||
The former doesn't increment in sleep, while the later does.
|
||||
There is a camera HAL property for that, though some devices don't
|
||||
report it properly.
|
||||
|
||||
This issue happens on Xiaomi Redmi 7A, it needs to force the value to 1
|
||||
|
||||
Add a property persist.sys.phh.camera.force_timestampsource to force
|
||||
timestamp source.
|
||||
---
|
||||
.../libcameraservice/device3/Camera3Device.cpp | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp
|
||||
index 93e18cfee3..9cc44f1ec9 100644
|
||||
--- a/services/camera/libcameraservice/device3/Camera3Device.cpp
|
||||
+++ b/services/camera/libcameraservice/device3/Camera3Device.cpp
|
||||
@@ -299,8 +299,16 @@ status_t Camera3Device::initializeCommonLocked() {
|
||||
// Measure the clock domain offset between camera and video/hw_composer
|
||||
camera_metadata_entry timestampSource =
|
||||
mDeviceInfo.find(ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE);
|
||||
- if (timestampSource.count > 0 && timestampSource.data.u8[0] ==
|
||||
- ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME) {
|
||||
+ int timestampSourceValue = 0;
|
||||
+ if ((timestampSource.count > 0 && timestampSource.data.u8[0] ==
|
||||
+ ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME)) {
|
||||
+ timestampSourceValue = 1;
|
||||
+ }
|
||||
+ int forceTimestampSource = property_get_int32("persist.sys.phh.camera.force_timestampsource", -1);
|
||||
+ //Don't override if it's -1, default value
|
||||
+ if(forceTimestampSource == 0) timestampSourceValue = 0;
|
||||
+ if(forceTimestampSource == 1) timestampSourceValue = 1;
|
||||
+ if (timestampSourceValue == 1) {
|
||||
mTimestampOffset = getMonoToBoottimeOffset();
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,325 @@
|
||||
From 637819ddb60b3a5c16e21b68e448f21e621699b1 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 25 May 2020 21:26:54 +0200
|
||||
Subject: [PATCH 24/24] Add persist.sys.phh.disable_a2dp_offload property to
|
||||
force a2dp offload
|
||||
|
||||
---
|
||||
media/libstagefright/ACodec.cpp | 20 +-
|
||||
.../managerdefinitions/src/Serializer.cpp | 180 +++++++++++++++++-
|
||||
.../managerdefault/AudioPolicyManager.cpp | 3 +
|
||||
3 files changed, 197 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
|
||||
index 0271ecef34..7824b590a6 100644
|
||||
--- a/media/libstagefright/ACodec.cpp
|
||||
+++ b/media/libstagefright/ACodec.cpp
|
||||
@@ -1166,6 +1166,9 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
|
||||
return err;
|
||||
}
|
||||
|
||||
+ ALOGE("Window undequeued buffers is %d\n", *minUndequeuedBuffers);
|
||||
+ ALOGE("Consumerrequested %d\n", def.nBufferCountMin);
|
||||
+
|
||||
// FIXME: assume that surface is controlled by app (native window
|
||||
// returns the number for the case when surface is not controlled by app)
|
||||
// FIXME2: This means that minUndeqeueudBufs can be 1 larger than reported
|
||||
@@ -1178,22 +1181,29 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
|
||||
// 2. try to allocate two (2) additional buffers to reduce starvation from
|
||||
// the consumer
|
||||
// plus an extra buffer to account for incorrect minUndequeuedBufs
|
||||
- for (OMX_U32 extraBuffers = 2 + 1; /* condition inside loop */; extraBuffers--) {
|
||||
- OMX_U32 newBufferCount =
|
||||
- def.nBufferCountMin + *minUndequeuedBuffers + extraBuffers;
|
||||
+ for (int extraBuffers = 2 + 1; /* condition inside loop */; extraBuffers--) {
|
||||
+ int a = def.nBufferCountMin;
|
||||
+ int b = *minUndequeuedBuffers;
|
||||
+ int c = extraBuffers;
|
||||
+ int newBufferCount = a+b+c;
|
||||
def.nBufferCountActual = newBufferCount;
|
||||
err = mOMXNode->setParameter(
|
||||
OMX_IndexParamPortDefinition, &def, sizeof(def));
|
||||
|
||||
if (err == OK) {
|
||||
- *minUndequeuedBuffers += extraBuffers;
|
||||
+ ALOGE("Managed to allocate %d buffers (%d extra)\n", newBufferCount, extraBuffers);
|
||||
+ if(extraBuffers > 0) {
|
||||
+ *minUndequeuedBuffers += extraBuffers;
|
||||
+ } else {
|
||||
+ *minUndequeuedBuffers -= -extraBuffers;
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
|
||||
ALOGW("[%s] setting nBufferCountActual to %u failed: %d",
|
||||
mComponentName.c_str(), newBufferCount, err);
|
||||
/* exit condition */
|
||||
- if (extraBuffers == 0) {
|
||||
+ if (extraBuffers == -2 || newBufferCount == 1) {
|
||||
return err;
|
||||
}
|
||||
}
|
||||
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
index 4bdb082ba1..d144f8991d 100644
|
||||
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <utils/StrongPointer.h>
|
||||
#include <utils/Errors.h>
|
||||
#include <utils/RefBase.h>
|
||||
+#include <cutils/properties.h>
|
||||
#include "Serializer.h"
|
||||
#include "TypeConverter.h"
|
||||
|
||||
@@ -36,6 +37,8 @@ namespace android {
|
||||
|
||||
namespace {
|
||||
|
||||
+static bool forceDisableA2dpOffload = false;
|
||||
+
|
||||
// TODO(mnaganov): Consider finding an alternative for using HIDL code.
|
||||
using hardware::Return;
|
||||
using hardware::Status;
|
||||
@@ -316,7 +319,7 @@ status_t deserializeCollection(const xmlNode *cur,
|
||||
return status;
|
||||
}
|
||||
} else {
|
||||
- return BAD_VALUE;
|
||||
+ ALOGE("Ignoring...");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -732,12 +735,34 @@ Return<ModuleTraits::Element> ModuleTraits::deserialize(const xmlNode *cur, PtrS
|
||||
|
||||
Element module = new HwModule(name.c_str(), versionMajor, versionMinor);
|
||||
|
||||
+ bool isA2dpModule = strcmp(name.c_str(), "a2dp") == 0;
|
||||
+ bool isPrimaryModule = strcmp(name.c_str(), "primary") == 0;
|
||||
+
|
||||
// Deserialize childrens: Audio Mix Port, Audio Device Ports (Source/Sink), Audio Routes
|
||||
MixPortTraits::Collection mixPorts;
|
||||
status_t status = deserializeCollection<MixPortTraits>(cur, &mixPorts, NULL);
|
||||
if (status != NO_ERROR) {
|
||||
return Status::fromStatusT(status);
|
||||
}
|
||||
+ if(forceDisableA2dpOffload && isA2dpModule) {
|
||||
+ for(const auto& mixPort: mixPorts) {
|
||||
+ ALOGE("Disable a2dp offload...? %s", mixPort->getTagName().c_str());
|
||||
+ //"a2dp" sw module already has a2dp out
|
||||
+ if(mixPort->getTagName() == String8("a2dp output")) {
|
||||
+ forceDisableA2dpOffload = false;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if(forceDisableA2dpOffload && isA2dpModule) {
|
||||
+ //Add
|
||||
+ //<mixPort name="a2dp output" role="source"/>
|
||||
+ auto mixPort = new IOProfile(String8("a2dp output"), AUDIO_PORT_ROLE_SOURCE);
|
||||
+ AudioProfileTraits::Collection profiles;
|
||||
+ profiles.add(AudioProfile::createFullDynamic());
|
||||
+ mixPort->setAudioProfiles(profiles);
|
||||
+ mixPorts.push_back(mixPort);
|
||||
+ }
|
||||
module->setProfiles(mixPorts);
|
||||
|
||||
DevicePortTraits::Collection devicePorts;
|
||||
@@ -745,6 +770,89 @@ Return<ModuleTraits::Element> ModuleTraits::deserialize(const xmlNode *cur, PtrS
|
||||
if (status != NO_ERROR) {
|
||||
return Status::fromStatusT(status);
|
||||
}
|
||||
+ Vector<String8> a2dpOuts;
|
||||
+ a2dpOuts.push_back(String8("BT A2DP Out"));
|
||||
+ a2dpOuts.push_back(String8("BT A2DP Headphones"));
|
||||
+ a2dpOuts.push_back(String8("BT A2DP Speaker"));
|
||||
+ if(forceDisableA2dpOffload) {
|
||||
+ if(isA2dpModule) {
|
||||
+ //<devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink" address="lhdc_a2dp">
|
||||
+ // <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
+ // samplingRates="44100,48000,96000"
|
||||
+ // channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
+ //</devicePort>
|
||||
+ if(true) {
|
||||
+ FormatVector formats;
|
||||
+ auto devicePortOut = new DeviceDescriptor(AUDIO_DEVICE_OUT_BLUETOOTH_A2DP, formats, String8(strdup("BT A2DP Out")));
|
||||
+ AudioProfileTraits::Collection profiles;
|
||||
+ ChannelsVector channels;
|
||||
+ SampleRateVector sampleRates;
|
||||
+ channels.add(AUDIO_CHANNEL_OUT_STEREO);
|
||||
+ sampleRates.add(44100);
|
||||
+ sampleRates.add(48000);
|
||||
+ sampleRates.add(96000);
|
||||
+ auto profile = new AudioProfile(AUDIO_FORMAT_PCM_16_BIT, channels, sampleRates);
|
||||
+ profiles.add(profile);
|
||||
+ devicePortOut->setAudioProfiles(profiles);
|
||||
+ devicePortOut->setAddress(String8("lhdc_a2dp"));
|
||||
+ devicePorts.add(devicePortOut);
|
||||
+ }
|
||||
+ //<devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink" address="lhdc_a2dp">
|
||||
+ // <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
+ // samplingRates="44100,48000,96000"
|
||||
+ // channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
+ //</devicePort>
|
||||
+ if(true) {
|
||||
+ FormatVector formats;
|
||||
+ auto devicePortOut = new DeviceDescriptor(AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, formats, String8(strdup("BT A2DP Headphones")));
|
||||
+ AudioProfileTraits::Collection profiles;
|
||||
+ ChannelsVector channels;
|
||||
+ SampleRateVector sampleRates;
|
||||
+ channels.add(AUDIO_CHANNEL_OUT_STEREO);
|
||||
+ sampleRates.add(44100);
|
||||
+ sampleRates.add(48000);
|
||||
+ sampleRates.add(96000);
|
||||
+ auto profile = new AudioProfile(AUDIO_FORMAT_PCM_16_BIT, channels, sampleRates);
|
||||
+ profiles.add(profile);
|
||||
+ devicePortOut->setAudioProfiles(profiles);
|
||||
+ devicePortOut->setAddress(String8("lhdc_a2dp"));
|
||||
+ devicePorts.add(devicePortOut);
|
||||
+ }
|
||||
+ //<devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink" address="lhdc_a2dp">
|
||||
+ // <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
+ // samplingRates="44100,48000,96000"
|
||||
+ // channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
+ //</devicePort>
|
||||
+ if(true) {
|
||||
+ FormatVector formats;
|
||||
+ auto devicePortOut = new DeviceDescriptor(AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER, formats, String8(strdup("BT A2DP Speaker")));
|
||||
+ AudioProfileTraits::Collection profiles;
|
||||
+ ChannelsVector channels;
|
||||
+ SampleRateVector sampleRates;
|
||||
+ channels.add(AUDIO_CHANNEL_OUT_STEREO);
|
||||
+ sampleRates.add(44100);
|
||||
+ sampleRates.add(48000);
|
||||
+ sampleRates.add(96000);
|
||||
+ auto profile = new AudioProfile(AUDIO_FORMAT_PCM_16_BIT, channels, sampleRates);
|
||||
+ profiles.add(profile);
|
||||
+ devicePortOut->setAudioProfiles(profiles);
|
||||
+ devicePortOut->setAddress(String8("lhdc_a2dp"));
|
||||
+ devicePorts.add(devicePortOut);
|
||||
+
|
||||
+ }
|
||||
+ } else if(isPrimaryModule) {
|
||||
+ for(const auto& out: a2dpOuts) {
|
||||
+ auto iterA = std::find_if(devicePorts.begin(), devicePorts.end(), [out](const auto port) {
|
||||
+ if(port->getTagName() == out) return true;
|
||||
+ return false;
|
||||
+ });
|
||||
+ if(iterA != devicePorts.end()) {
|
||||
+ ALOGE("Erasing device port %s", (*iterA)->getTagName().c_str());
|
||||
+ devicePorts.erase(iterA);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
module->setDeclaredDevices(devicePorts);
|
||||
|
||||
RouteTraits::Collection routes;
|
||||
@@ -752,7 +860,76 @@ Return<ModuleTraits::Element> ModuleTraits::deserialize(const xmlNode *cur, PtrS
|
||||
if (status != NO_ERROR) {
|
||||
return Status::fromStatusT(status);
|
||||
}
|
||||
+ if(forceDisableA2dpOffload) {
|
||||
+ if(strcmp(name.c_str(), "primary") == 0) {
|
||||
+ for(const auto& out: a2dpOuts) {
|
||||
+ auto iterA = std::find_if(routes.begin(), routes.end(), [out](const auto route) {
|
||||
+ if(route->getType() != AUDIO_ROUTE_MIX)
|
||||
+ return false;
|
||||
+ auto sink = route->getSink();
|
||||
+ if(sink->getTagName() == out) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ });
|
||||
+ if(iterA != routes.end()) {
|
||||
+ auto sink = (*iterA)->getSink()->getTagName();
|
||||
+ ALOGE("Erasing route %s", sink.c_str());
|
||||
+ routes.erase(iterA);
|
||||
+ }
|
||||
+ }
|
||||
+ } else if(isA2dpModule) {
|
||||
+ //<route type="mix" sink="BT A2DP Out"
|
||||
+ // sources="a2dp output"/>
|
||||
+ if(true) {
|
||||
+ auto newRoute = new AudioRoute(AUDIO_ROUTE_MIX);
|
||||
+ auto sink = module->findPortByTagName(String8("BT A2DP Out"));
|
||||
+ auto source = module->findPortByTagName(String8("a2dp output"));
|
||||
+ newRoute->setSink(sink);
|
||||
+ AudioPortVector sources;
|
||||
+ sources.add(source);
|
||||
+
|
||||
+ sink->addRoute(newRoute);
|
||||
+ source->addRoute(newRoute);
|
||||
+ newRoute->setSources(sources);
|
||||
+
|
||||
+ routes.add(newRoute);
|
||||
+ }
|
||||
+ //<route type="mix" sink="BT A2DP Headphones"
|
||||
+ // sources="a2dp output"/>
|
||||
+ if(true) {
|
||||
+ auto newRoute = new AudioRoute(AUDIO_ROUTE_MIX);
|
||||
+ auto sink = module->findPortByTagName(String8("BT A2DP Headphones"));
|
||||
+ auto source = module->findPortByTagName(String8("a2dp output"));
|
||||
+ newRoute->setSink(sink);
|
||||
+ AudioPortVector sources;
|
||||
+ sources.add(source);
|
||||
+
|
||||
+ sink->addRoute(newRoute);
|
||||
+ source->addRoute(newRoute);
|
||||
+ newRoute->setSources(sources);
|
||||
+ routes.add(newRoute);
|
||||
+ }
|
||||
+ //<route type="mix" sink="BT A2DP Speaker"
|
||||
+ // sources="a2dp output"/>
|
||||
+ if(true) {
|
||||
+ auto newRoute = new AudioRoute(AUDIO_ROUTE_MIX);
|
||||
+ auto sink = module->findPortByTagName(String8("BT A2DP Speaker"));
|
||||
+ auto source = module->findPortByTagName(String8("a2dp output"));
|
||||
+ newRoute->setSink(sink);
|
||||
+ AudioPortVector sources;
|
||||
+ sources.add(source);
|
||||
+
|
||||
+ sink->addRoute(newRoute);
|
||||
+ source->addRoute(newRoute);
|
||||
+ newRoute->setSources(sources);
|
||||
+ routes.add(newRoute);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ ALOGE("Good morning");
|
||||
fixupQualcommBtScoRoute(routes, devicePorts, module.get());
|
||||
+ ALOGE("Good morning2");
|
||||
module->setRoutes(routes);
|
||||
|
||||
for (const xmlNode *children = cur->xmlChildrenNode; children != NULL;
|
||||
@@ -922,6 +1099,7 @@ status_t PolicySerializer::deserialize(const char *configFile, AudioPolicyConfig
|
||||
status_t deserializeAudioPolicyFile(const char *fileName, AudioPolicyConfig *config)
|
||||
{
|
||||
PolicySerializer serializer;
|
||||
+ forceDisableA2dpOffload = property_get_bool("persist.sys.phh.disable_a2dp_offload", false);
|
||||
return serializer.deserialize(fileName, config);
|
||||
}
|
||||
|
||||
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
|
||||
index a984b10c03..5b7750b437 100644
|
||||
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
|
||||
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
|
||||
@@ -76,6 +76,8 @@ static const std::vector<audio_channel_mask_t> surroundChannelMasksOrder = {{
|
||||
AUDIO_CHANNEL_OUT_2POINT1POINT2, AUDIO_CHANNEL_OUT_2POINT0POINT2,
|
||||
AUDIO_CHANNEL_OUT_5POINT1, AUDIO_CHANNEL_OUT_STEREO }};
|
||||
|
||||
+static bool forceDisableA2dpOffload = false;
|
||||
+
|
||||
// ----------------------------------------------------------------------------
|
||||
// AudioPolicyInterface implementation
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -4256,6 +4258,7 @@ static status_t deserializeAudioPolicyXmlConfig(AudioPolicyConfig &config) {
|
||||
} else if (property_get_bool("persist.bluetooth.bluetooth_audio_hal.disabled", false)) {
|
||||
fileNames.push_back(AUDIO_POLICY_BLUETOOTH_LEGACY_HAL_XML_CONFIG_FILE_NAME);
|
||||
}
|
||||
+ forceDisableA2dpOffload = property_get_bool("persist.sys.phh.disable_a2dp_offload", false);
|
||||
fileNames.push_back(AUDIO_POLICY_XML_CONFIG_FILE_NAME);
|
||||
|
||||
for (const char* fileName : fileNames) {
|
||||
--
|
||||
2.17.1
|
||||
|
||||
Reference in New Issue
Block a user