Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2dc956c5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "No need to query the HAL for mmap information if it is older than 7.1."

parents e0288311 a4ff38fd
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@

namespace android {

#define MAX_AAUDIO_PROPERTY_DEVICE_HAL_VERSION 7.0
#define MAX_AAUDIO_PROPERTY_DEVICE_HAL_VERSION 7.1

using ::android::base::StringPrintf;
using media::IEffectClient;
@@ -2360,11 +2360,12 @@ audio_module_handle_t AudioFlinger::loadHwModule_l(const char *name)

    if (mDevicesFactoryHal->getHalVersion() > MAX_AAUDIO_PROPERTY_DEVICE_HAL_VERSION) {
        if (int32_t mixerBursts = dev->getAAudioMixerBurstCount();
            mixerBursts > mAAudioBurstsPerBuffer) {
            mixerBursts > 0 && mixerBursts > mAAudioBurstsPerBuffer) {
            mAAudioBurstsPerBuffer = mixerBursts;
        }
        if (int32_t hwBurstMinMicros = dev->getAAudioHardwareBurstMinUsec();
            hwBurstMinMicros < mAAudioHwBurstMinMicros || mAAudioHwBurstMinMicros == 0) {
            hwBurstMinMicros > 0
            && (hwBurstMinMicros < mAAudioHwBurstMinMicros || mAAudioHwBurstMinMicros == 0)) {
            mAAudioHwBurstMinMicros = hwBurstMinMicros;
        }
    }