summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2023-07-13 11:56:04 -0700
committerLinux Build Service Account <lnxbuild@localhost>2023-07-13 11:56:04 -0700
commit464995df83c3d5d627add9a92625ec4ee50eb81d (patch)
treea0305e0485d507892cf4a575b18627405d0fb74c
parent03b93016c7d21778d865f895091485eb2d56e909 (diff)
parent65b3023576c2c0ecb60982f7bb19087d9f02c779 (diff)
Merge 65b3023576c2c0ecb60982f7bb19087d9f02c779 on remote branch
Change-Id: I8fe96b0404ef887811a05a8a5ce6da164c492245
-rw-r--r--services/audioflinger/Threads.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index a52b766712..bdfa39d3fe 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -2968,6 +2968,7 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l()
{
// unfortunately we have no way of recovering from errors here, hence the LOG_ALWAYS_FATAL
const audio_config_base_t audioConfig = mOutput->getAudioProperties();
+ bool isDup = false;
mSampleRate = audioConfig.sample_rate;
mChannelMask = audioConfig.channel_mask;
if (!audio_is_output_channel(mChannelMask)) {
@@ -3050,10 +3051,14 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l()
// This may need to be updated as MixerThread/OutputTracks are added and not here.
}
+ if (property_get_bool("vendor.audio.gaming.enabled", false /* default_value */) &&
+ mType == DUPLICATING) {
+ isDup = true;
+ }
// Calculate size of normal sink buffer relative to the HAL output buffer size
double multiplier = 1.0;
// Note: mType == SPATIALIZER does not support FastMixer.
- if (mType == MIXER && (kUseFastMixer == FastMixer_Static ||
+ if ((mType == MIXER || isDup) && (kUseFastMixer == FastMixer_Static ||
kUseFastMixer == FastMixer_Dynamic)) {
size_t minNormalFrameCount = (kMinNormalSinkBufferSizeMs * mSampleRate) / 1000;
size_t maxNormalFrameCount = (kMaxNormalSinkBufferSizeMs * mSampleRate) / 1000;