1# 2# Copyright (C) 2020 The Android Open-Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17AUDIO_TABLE_FOLDER := comet 18 19# Choose AIDL config by build flag. 20ifeq ($(USE_AUDIO_HAL_AIDL),true) 21PRODUCT_SOONG_NAMESPACES += device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/aidl_config 22PRODUCT_PACKAGES += audio_aidl_configs 23 24else 25# Platform Configuration for AudioHAL / SoundTriggerHAL 26PRODUCT_COPY_FILES += \ 27 device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \ 28 device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ 29 device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_le_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_le_offload_disabled.xml \ 30 device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_a2dp_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_a2dp_offload_disabled.xml \ 31 device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ 32 device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/config/audio_platform_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration.xml \ 33 device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/config/sound_trigger_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_configuration.xml \ 34 device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/config/bluetooth_with_le_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml 35 36# AudioEffectHAL Configuration 37PRODUCT_COPY_FILES += \ 38 device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/config/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml 39 40# Mixer Path Configuration for AudioHAL 41PRODUCT_COPY_FILES += \ 42 device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/config/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml 43endif 44 45# Speaker firmware files 46SPK_FIRMWARE_PATH := $(AUDIO_TABLE_FOLDER)/cs35l41/fw 47SPK_FIRMWARE_FULL_PATH := device/google/comet/audio/$(SPK_FIRMWARE_PATH) 48 49PRODUCT_COPY_FILES += $(call copy-files,$(wildcard $(SPK_FIRMWARE_FULL_PATH)/*),$(TARGET_COPY_OUT_VENDOR)/firmware) 50 51# Audio tuning 52PRODUCT_SOONG_NAMESPACES += device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/tuning 53PRODUCT_PACKAGES += \ 54 recording.gatf \ 55 smartfeature.gstf \ 56 BLUETOOTH.dat \ 57 HANDSFREE.dat \ 58 HANDSET.dat \ 59 HEADSET.dat \ 60 mcps.dat \ 61 waves_config.ini \ 62 waves_preset.mps \ 63 waves_config_nx.ini \ 64 waves_preset_nx.mps \ 65 compens_spk_l_1.conf \ 66 compens_spk_l_2.conf \ 67 compens_spk_r_1.conf \ 68 compens_spk_r_2.conf \ 69 downlink_bluetooth_headset_config.pb \ 70 downlink_dock_config.pb \ 71 downlink_external_speaker_config.pb \ 72 downlink_handset_config.pb \ 73 downlink_speaker_config.pb \ 74 downlink_wired_headset_config.pb \ 75 uplink_bluetooth_headset_aec_off_config.pb \ 76 uplink_bluetooth_headset_aec_on_config.pb \ 77 uplink_dock_aec_off_config.pb \ 78 uplink_dock_aec_on_config.pb \ 79 uplink_external_speaker_aec_off_config.pb \ 80 uplink_external_speaker_aec_on_config.pb \ 81 uplink_handset_aec_off_config.pb \ 82 uplink_handset_aec_on_config.pb \ 83 uplink_speaker_aec_off_config.pb \ 84 uplink_speaker_aec_on_config.pb \ 85 uplink_wired_headset_aec_off_config.pb \ 86 uplink_wired_headset_aec_on_config.pb 87 88 89# userdebug specific 90PRODUCT_PACKAGES_DEBUG += \ 91 BLUETOOTH.mods \ 92 HANDSFREE.mods \ 93 HANDSET.mods \ 94 HEADSET.mods \ 95 template.xml \ 96 tuning_constraints_combination.xml \ 97 test_config.ini \ 98 test_preset.mps \ 99 speaker_post_processing_volume_spec.xml 100 101ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 102# Mixer Path Configuration for Audio Speaker Calibration Tool crus_sp_cal 103PRODUCT_COPY_FILES += \ 104 device/google/comet/audio/$(AUDIO_TABLE_FOLDER)/cs35l41/crus_sp_cal_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/crus_sp_cal_mixer_paths.xml 105 106endif 107 108# Offload spatializer config 109PRODUCT_PACKAGES += \ 110 vendor.google.whitechapel.audio.hal.effect.spatializer.base \ 111 vendor.google.whitechapel.audio.hal.effect.spatializer.mode_2_ch \ 112 vendor.google.whitechapel.audio.hal.effect.spatializer.mode_6_ch \ 113 vendor.google.whitechapel.audio.hal.effect.spatializer.mode_xaural 114 115# Waves nx config 116PRODUCT_PACKAGES += \ 117 libNX_Google_Pixel_Android 118