From 46850e03418431679da337394a7d343701ff2485 Mon Sep 17 00:00:00 2001 From: Daniel Bonnevier Date: Fri, 6 Dec 2019 09:14:56 +0100 Subject: [PATCH] Use default sample rate for DIRECT Audio thread DIRECT and OFFLOAD Audio threads use the mixer when using SW effects. This requires them to use the default sample rate. Test: vendor specific, see bug Bug: 147209612 Merged-In: I553fe43695d64160dd64808e18299699a4047225 Change-Id: I553fe43695d64160dd64808e18299699a4047225 --- services/audioflinger/Effects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp index ee7a6d614b..70857a7d12 100644 --- a/services/audioflinger/Effects.cpp +++ b/services/audioflinger/Effects.cpp @@ -622,7 +622,7 @@ status_t AudioFlinger::EffectModule::configure() mConfig.outputCfg.format = EFFECT_BUFFER_FORMAT; // Don't use sample rate for thread if effect isn't offloadable. - if ((thread->type() == ThreadBase::OFFLOAD) && !isOffloaded()) { + if (isOffloadedOrDirect() && !isOffloaded()) { mConfig.inputCfg.samplingRate = DEFAULT_OUTPUT_SAMPLE_RATE; ALOGV("Overriding effect input as 48kHz"); } else {