diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-06-27 10:12:53 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-06-27 10:12:53 +0000 |
commit | 65b3023576c2c0ecb60982f7bb19087d9f02c779 (patch) | |
tree | a0305e0485d507892cf4a575b18627405d0fb74c | |
parent | 2f8aef00f0c6df8db09ee12e2ca2b6370f6155ad (diff) | |
parent | 03bee649bd326acb31ea509f95d28b09e6f44402 (diff) |
Snap for 10384627 from 03bee649bd326acb31ea509f95d28b09e6f44402 to t-keystone-qcom-release
Change-Id: Ibf89d82f8e53d1ecdb12e2adf34803d3a7de06a0
-rw-r--r-- | services/audioflinger/Threads.cpp | 7 |
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; |