Add patch for qcom voip_rx pitch issue
This commit is contained in:
parent
ccca70ec25
commit
4b704639a2
|
@ -1,7 +1,7 @@
|
|||
From f8b9cb1d3cdf0274414bb7d100844d2707999558 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/2] APM: Optionally force-load audio policy for system-side
|
||||
Subject: [PATCH 1/3] APM: Optionally force-load audio policy for system-side
|
||||
bt audio HAL
|
||||
|
||||
Required to support our system-side bt audio implementation, i.e.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From d60a1b5fc58a7cc84b48c554cb2cffaeff14d86e 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/2] APM: Remove A2DP audio ports from the primary HAL
|
||||
Subject: [PATCH 2/3] 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
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
From aa1f3595b06e6d3d7027a5dd40ae183d71d032f0 Mon Sep 17 00:00:00 2001
|
||||
From: ponces <ponces26@gmail.com>
|
||||
Date: Mon, 24 Oct 2022 09:38:34 +0100
|
||||
Subject: [PATCH 3/3] voip: Fix high pitched voice on Qualcomm devices
|
||||
|
||||
Change-Id: I6d314912169776b76d07d8c0301ec5249c1870a2
|
||||
---
|
||||
.../common/managerdefinitions/src/Serializer.cpp | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
index 8519cfdc04..d23d55677d 100644
|
||||
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
@@ -252,6 +252,7 @@ private:
|
||||
std::string mChannelMasksSeparator = ",";
|
||||
std::string mSamplingRatesSeparator = ",";
|
||||
std::string mFlagsSeparator = "|";
|
||||
+ std::string mMixPortName = "";
|
||||
|
||||
// Children: ModulesTraits, VolumeTraits, SurroundSoundTraits (optional)
|
||||
};
|
||||
@@ -426,13 +427,21 @@ PolicySerializer::deserialize<AudioProfileTraits>(
|
||||
std::string samplingRates = getXmlAttribute(cur, Attributes::samplingRates);
|
||||
std::string format = getXmlAttribute(cur, Attributes::format);
|
||||
std::string channels = getXmlAttribute(cur, Attributes::channelMasks);
|
||||
+ ChannelTraits::Collection channelsMask = channelMasksFromString(channels, mChannelMasksSeparator.c_str());
|
||||
+
|
||||
+ // This breaks in-game voice chat and audio in some messaging apps causing it to play with a higher pitch and speed
|
||||
+ bool disableStereoVoip = property_get_bool("persist.sys.phh.disable_stereo_voip", false);
|
||||
+ if (disableStereoVoip && mMixPortName == "voip_rx") {
|
||||
+ ALOGI("%s: disabling stereo support on voip_rx", __func__);
|
||||
+ channelsMask = channelMasksFromString("AUDIO_CHANNEL_OUT_MONO", ",");
|
||||
+ }
|
||||
|
||||
if (mIgnoreVendorExtensions && maybeVendorExtension(format)) {
|
||||
ALOGI("%s: vendor extension format \"%s\" skipped", __func__, format.c_str());
|
||||
return NO_INIT;
|
||||
}
|
||||
AudioProfileTraits::Element profile = new AudioProfile(formatFromString(format, gDynamicFormat),
|
||||
- channelMasksFromString(channels, mChannelMasksSeparator.c_str()),
|
||||
+ channelsMask,
|
||||
samplingRatesFromString(samplingRates, mSamplingRatesSeparator.c_str()));
|
||||
|
||||
profile->setDynamicFormat(profile->getFormat() == gDynamicFormat);
|
||||
@@ -449,6 +458,7 @@ std::variant<status_t, MixPortTraits::Element> PolicySerializer::deserialize<Mix
|
||||
using Attributes = MixPortTraits::Attributes;
|
||||
|
||||
std::string name = getXmlAttribute(child, Attributes::name);
|
||||
+ mMixPortName = name;
|
||||
if (name.empty()) {
|
||||
ALOGE("%s: No %s found", __func__, Attributes::name);
|
||||
return BAD_VALUE;
|
||||
--
|
||||
2.41.0
|
||||
|
Loading…
Reference in a new issue