Spreadtrum/Unisoc twrp porter for android 10
Spreadtrum/Unisoc twrp porter for android 10
(21-06-2021, 06:22 AM)SPDfan Any plans for the TWRP porter to be updated for android 10 on the spd/unisoc devices?
Some of these devices have great hardware for what they are, and it would be cool if we can put custom roms on them.
diff --git a/services/audiopolicy/engine/common/src/EngineBase.cpp b/services/audiopolicy/engine/common/src/EngineBase.cpp
index 150a9a8e4f..9d5dff6d9f 100644
--- a/services/audiopolicy/engine/common/src/EngineBase.cpp
+++ b/services/audiopolicy/engine/common/src/EngineBase.cpp
@@ -165,16 +165,7 @@ engineConfig::ParsingResult EngineBase::loadAudioPolicyEngineConfig()
android::status_t ret = engineConfig::parseLegacyVolumes(config.volumeGroups);
result = {std::make_unique<engineConfig::Config>(config),
static_cast<size_t>(ret == NO_ERROR ? 0 : 1)};
- } else {
- // Append for internal use only volume groups (e.g. rerouting/patch)
- result.parsedConfig->volumeGroups.insert(
- std::end(result.parsedConfig->volumeGroups),
- std::begin(gSystemVolumeGroups), std::end(gSystemVolumeGroups));
}
- // Append for internal use only strategies (e.g. rerouting/patch)
- result.parsedConfig->productStrategies.insert(
- std::end(result.parsedConfig->productStrategies),
- std::begin(gOrderedSystemStrategies), std::end(gOrderedSystemStrategies));
ALOGE_IF(result.nbSkippedElement != 0, "skipped %zu elements", result.nbSkippedElement);
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 5a18762967..f3f50f513c 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -5349,15 +5349,7 @@ status_t AudioPolicyManager::checkOutputsForDevice(const sp<DeviceDescriptor>& d
}
if (state == AUDIO_POLICY_DEVICE_STATE_AVAILABLE) {
- // first call getAudioPort to get the supported attributes from the HAL
- struct audio_port_v7 port = {};
- device->toAudioPort(&port);
- status_t status = mpClientInterface->getAudioPort(&port);
- if (status == NO_ERROR) {
- device->importAudioPort(port);
- }
-
- // then list already open outputs that can be routed to this device
+ // first list already open outputs that can be routed to this device
for (size_t i = 0; i < mOutputs.size(); i++) {
desc = mOutputs.valueAt(i);
if (!desc->isDuplicated() && desc->supportsDevice(device)
(14-05-2023, 06:23 AM)Gargoyle But you can try it for tablet or phone
[For_Phone]_PixelExperience_Plus_treble_arm64_bgN-12.1-20230514-0225-UNOFFICIAL
[For_Tablet]_PixelExperience_Plus_treble_arm64_bgN-12.1-20230514-01002-UNOFFICIAL
1. change PRODUCT_SHIPPING_API_LEVEL from 30 to 29
2. change PRODUCT_CHARACTERISTICS tablet / phone
3. change EngineBase.cpp, so that fix audioserver crash during startup.
Code:diff --git a/services/audiopolicy/engine/common/src/EngineBase.cpp b/services/audiopolicy/engine/common/src/EngineBase.cpp
index 150a9a8e4f..9d5dff6d9f 100644
--- a/services/audiopolicy/engine/common/src/EngineBase.cpp
+++ b/services/audiopolicy/engine/common/src/EngineBase.cpp
@@ -165,16 +165,7 @@ engineConfig::ParsingResult EngineBase::loadAudioPolicyEngineConfig()
android::status_t ret = engineConfig::parseLegacyVolumes(config.volumeGroups);
result = {std::make_unique<engineConfig::Config>(config),
static_cast<size_t>(ret == NO_ERROR ? 0 : 1)};
- } else {
- // Append for internal use only volume groups (e.g. rerouting/patch)
- result.parsedConfig->volumeGroups.insert(
- std::end(result.parsedConfig->volumeGroups),
- std::begin(gSystemVolumeGroups), std::end(gSystemVolumeGroups));
}
- // Append for internal use only strategies (e.g. rerouting/patch)
- result.parsedConfig->productStrategies.insert(
- std::end(result.parsedConfig->productStrategies),
- std::begin(gOrderedSystemStrategies), std::end(gOrderedSystemStrategies));
ALOGE_IF(result.nbSkippedElement != 0, "skipped %zu elements", result.nbSkippedElement);
4. change AudioPolicyManager.cpp, so that fix audioserver crash when headset plugs in.
Code:diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 5a18762967..f3f50f513c 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -5349,15 +5349,7 @@ status_t AudioPolicyManager::checkOutputsForDevice(const sp<DeviceDescriptor>& d
}
if (state == AUDIO_POLICY_DEVICE_STATE_AVAILABLE) {
- // first call getAudioPort to get the supported attributes from the HAL
- struct audio_port_v7 port = {};
- device->toAudioPort(&port);
- status_t status = mpClientInterface->getAudioPort(&port);
- if (status == NO_ERROR) {
- device->importAudioPort(port);
- }
-
- // then list already open outputs that can be routed to this device
+ // first list already open outputs that can be routed to this device
for (size_t i = 0; i < mOutputs.size(); i++) {
desc = mOutputs.valueAt(i);
if (!desc->isDuplicated() && desc->supportsDevice(device)
(14-05-2023, 02:42 PM)Gargoyle I made the build for my tablet, unfortunately I don't have the "a" variant, but I also don't like the bigger one if the super.img partition was larger than 4.1G.