Pixel Experience 编译期间的音频策略错误

Audio Policies error during Pixel Experience compilation

Pixel Experience编译过程中(我用的是brunch,但是用lunch也是一样的错误)出现异常错误,跟Audio Polices有关

我已尝试重新安装 Ubuntu(我使用的是 18.04.3)并从头开始执行所有操作,但错误仍然存​​在。

设备树应该没问题,因为我之前用相同的设备树、内核和供应商编译过相同的ROM。

kirk@kirk-dev:~/android/system$ brunch aosp_clover-userdebug
including vendor/aosp/vendorsetup.sh
Trying dependencies-only mode on a non-existing device tree?

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
CUSTOM_VERSION=PixelExperience_clover-9.0-20190812-0627-UNOFFICIAL
TARGET_PRODUCT=aosp_clover
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=kryo
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.0.0-23-generic-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190705.003
OUT_DIR=/home/kirk/android/system/out
PRODUCT_SOONG_NAMESPACES= hardware/qcom/audio-caf/msm8998 hardware/qcom/display-caf/msm8998 hardware/qcom/media-caf/msm8998
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
CUSTOM_VERSION=PixelExperience_clover-9.0-20190812-0627-UNOFFICIAL
TARGET_PRODUCT=aosp_clover
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=kryo
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.0.0-23-generic-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190705.003
OUT_DIR=/home/kirk/android/system/out
PRODUCT_SOONG_NAMESPACES= hardware/qcom/audio-caf/msm8998 hardware/qcom/display-caf/msm8998 hardware/qcom/media-caf/msm8998 hardware/qcom/audio-caf/msm8998 hardware/qcom/display-caf/msm8998 hardware/qcom/media-caf/msm8998
============================================
ninja: no work to do.
ninja: no work to do.
Environment variable PATH was modified (/home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/out/soong/host/linux-x86/bin:/home/kirk/android/system/out/host/linux-x86/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/kirk/android/system/development/scripts:/home/kirk/android/system/prebuilts/devtools/tools:/home/kirk/android/system/external/selinux/prebuilts/bin:/home/kirk/android/system/prebuilts/misc/linux-x86/dtc:/home/kirk/android/system/prebuilts/misc/linux-x86/libufdt:/home/kirk/android/system/prebuilts/android-emulator/linux-x86_64:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin => /home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/out/soong/host/linux-x86/bin:/home/kirk/android/system/out/host/linux-x86/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/kirk/android/system/development/scripts:/home/kirk/android/system/prebuilts/devtools/tools:/home/kirk/android/system/external/selinux/prebuilts/bin:/home/kirk/android/system/prebuilts/misc/linux-x86/dtc:/home/kirk/android/system/prebuilts/misc/linux-x86/libufdt:/home/kirk/android/system/prebuilts/android-emulator/linux-x86_64:/home/kirk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin), regenerating...
Environment variable PATH was modified (/home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/out/soong/host/linux-x86/bin:/home/kirk/android/system/out/host/linux-x86/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/kirk/android/system/development/scripts:/home/kirk/android/system/prebuilts/devtools/tools:/home/kirk/android/system/external/selinux/prebuilts/bin:/home/kirk/android/system/prebuilts/misc/linux-x86/dtc:/home/kirk/android/system/prebuilts/misc/linux-x86/libufdt:/home/kirk/android/system/prebuilts/android-emulator/linux-x86_64:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin => /home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/prebuilts/jdk/jdk9/linux-x86/bin:/home/kirk/android/system/out/soong/host/linux-x86/bin:/home/kirk/android/system/out/host/linux-x86/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/kirk/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/kirk/android/system/development/scripts:/home/kirk/android/system/prebuilts/devtools/tools:/home/kirk/android/system/external/selinux/prebuilts/bin:/home/kirk/android/system/prebuilts/misc/linux-x86/dtc:/home/kirk/android/system/prebuilts/misc/linux-x86/libufdt:/home/kirk/android/system/prebuilts/android-emulator/linux-x86_64:/home/kirk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin), regenerating...
[539/961] including system/sepolicy/Android.mk ...
system/sepolicy/Android.mk:88: warning: Be careful when using the SELINUX_IGNORE_NEVERALLOWS flag. It does not work in user builds and using it will not stop you from failing CTS.
[961/961] including vendor/xiaomi/sdm660-common/Android.mk ...
build/make/core/Makefile:28: warning: overriding commands for target `/home/kirk/android/system/out/target/product/clover/vendor/lib64/hw/fingerprint.default.so'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `/home/kirk/android/system/out/target/product/clover/vendor/lib64/hw/fingerprint.default.so'
[  0% 290/84433] target thumb C++: libaudiopolicymanager_32 <= vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp
FAILED: /home/kirk/android/system/out/target/product/clover/obj_arm/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/AudioPolicyManager.o 
/bin/bash -c "PWD=/proc/self/cwd  prebuilts/clang/host/linux-x86/clang-4691093/bin/clang++  -I frameworks/av/services -I frameworks/av/services/audioflinger -I system/media/audio_effects/include -I system/media/audio_utils/include -I frameworks/av/services/audiopolicy/common/include -I frameworks/av/services/audiopolicy/engine/interface -I frameworks/av/services/audiopolicy -I frameworks/av/services/audiopolicy/common/managerdefinitions/include -I vendor/qcom/opensource/audio/policy_hal -I /home/kirk/android/system/out/target/product/clover/obj_arm/SHARED_LIBRARIES/libaudiopolicymanager_intermediates -I /home/kirk/android/system/out/target/product/clover/gen/SHARED_LIBRARIES/libaudiopolicymanager_intermediates -I libnativehelper/include_jni $(cat /home/kirk/android/system/out/target/product/clover/obj_arm/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/import_includes)  -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -c  -fomit-frame-pointer -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -Wno-zero-as-null-pointer-constant -fdebug-prefix-map=$PWD/= -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -nostdlibinc -msoft-float -march=armv8-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -D__ARM_FEATURE_LPAE=1 -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin  -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -Wno-gnu-include-next -fvisibility-inlines-hidden  -std=gnu++14 -mthumb -Os  -fno-rtti -Wall -Werror -DPCM_OFFLOAD_ENABLED -DPCM_OFFLOAD_ENABLED_24 -DAUDIO_EXTN_FORMATS_ENABLED -DAAC_ADTS_OFFLOAD_ENABLED -DAUDIO_EXTN_HDMI_SPK_ENABLED -DAUDIO_EXTN_AFE_PROXY_ENABLED -DUSE_XML_AUDIO_POLICY_CONF -DCOMPRESS_VOIP_ENABLED -fPIC -D_USING_LIBCXX -DANDROID_STRICT   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-null-pointer-arithmetic -Wno-enum-compare -Wno-enum-compare-switch   -MD -MF /home/kirk/android/system/out/target/product/clover/obj_arm/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/AudioPolicyManager.d -o /home/kirk/android/system/out/target/product/clover/obj_arm/SHARED_LIBRARIES/libaudiopolicymanager_intermediates/AudioPolicyManager.o vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp"
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2240:65: error: member reference type 'android::AudioMix *' is a pointer; did you mean to use '->'?
            sp<AudioPolicyMix> policyMix = inputDesc->mPolicyMix.promote();
                                           ~~~~~~~~~~~~~~~~~~~~~^
                                                                ->
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2240:66: error: no member named 'promote' in 'android::AudioMix'
            sp<AudioPolicyMix> policyMix = inputDesc->mPolicyMix.promote();
                                           ~~~~~~~~~~~~~~~~~~~~~ ^
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2243:37: error: no member named 'mCbFlags' in 'android::AudioPolicyMix'
                    && ((policyMix->mCbFlags & AudioMix::kCbFlagNotifyActivity) != 0)) {
                         ~~~~~~~~~  ^
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2244:77: error: no member named 'mDeviceAddress' in 'android::AudioPolicyMix'
                mpClientInterface->onDynamicPolicyMixStateUpdate(policyMix->mDeviceAddress,
                                                                 ~~~~~~~~~  ^
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2265:39: error: no member named 'mMixType' in 'android::AudioPolicyMix'
                } else if (policyMix->mMixType == MIX_TYPE_PLAYERS) {
                           ~~~~~~~~~  ^
vendor/qcom/opensource/audio/policy_hal/AudioPolicyManager.cpp:2266:42: error: no member named 'mDeviceAddress' in 'android::AudioPolicyMix'
                    address = policyMix->mDeviceAddress;
                              ~~~~~~~~~  ^
6 errors generated.
[  0% 299/84433] target  C++: netutils-wrapper-1.0 <= system/netd/netutils_wrappers/NetUtilsWrapper-1.0.cpp
ninja: build stopped: subcommand failed.
09:31:14 ninja failed with: exit status 1

#### failed to build some targets (03:41 (mm:ss)) ####

我昨天也遇到了同样的错误。 我还原了 here 中的代码。 到目前为止,我还没有遇到任何问题。

只需将 AudioPolicyManager.cpp 文件中的每个 "policyMix" 更改为 "inputDesc->mPolicyMix"。

[更新]

PE 刚刚更新了他们的代码,重新同步 repo 可能会有帮助。