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 17$(call add_soong_config_namespace,audio_extn_config) 18$(call add_soong_config_var_value,audio_extn_config,isHFPEnabled,$(AUDIO_FEATURE_HFP_ENABLED)) 19 20PRODUCT_PACKAGE_OVERLAYS += device/google/trout/product_files/overlay 21 22ifeq ($(TARGET_USES_CUTTLEFISH_AUDIO),false) 23# Car Emulator Audio HAL 24LOCAL_AUDIO_PRODUCT_PACKAGE ?= \ 25 audio.primary.caremu \ 26 audio.r_submix.default \ 27 android.hardware.audio@6.0-impl:32 \ 28 android.hardware.audio.effect@6.0-impl:32 \ 29 android.hardware.audio.service \ 30 android.hardware.soundtrigger@2.3-impl 31 32LOCAL_AUDIO_DEVICE_PACKAGE_OVERLAYS ?= device/generic/car/emulator/audio/overlay 33 34LOCAL_AUDIO_PROPERTIES ?= \ 35 ro.hardware.audio.primary=caremu \ 36 ro.vendor.caremu.audiohal.out_period_ms=16 \ 37 ro.vendor.caremu.audiohal.in_period_ms=16 38 39ifndef LOCAL_AUDIO_PRODUCT_COPY_FILES 40LOCAL_AUDIO_PRODUCT_COPY_FILES := \ 41 device/google/trout/product_files/vendor/etc/audio_policy_configuration.emulator.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ 42 device/generic/car/emulator/audio/car_audio_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/car_audio_configuration.xml \ 43 frameworks/native/data/etc/android.hardware.broadcastradio.xml:system/etc/permissions/android.hardware.broadcastradio.xml \ 44 frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \ 45 frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml 46endif 47endif 48 49# Audio Control HAL 50LOCAL_AUDIOCONTROL_HAL_PRODUCT_PACKAGE ?= android.hardware.automotive.audiocontrol-service.trout 51 52# Dumpstate HAL 53LOCAL_DUMPSTATE_PRODUCT_PACKAGE ?= android.hardware.automotive.dumpstate-service.trout 54LOCAL_DUMPSTATE_PROPERTIES ?= \ 55 ro.vendor.dumpstate.server.cid=2 \ 56 ro.vendor.dumpstate.server.port=9310 \ 57 ro.vendor.helpersystem.log_loc=/data/host_logs \ 58 59# Vehicle HAL 60LOCAL_VHAL_PRODUCT_PACKAGE ?= android.hardware.automotive.vehicle@2.0-virtualization-service 61 62# EVS HAL 63LOCAL_EVS_RRO_PACKAGE_OVERLAYS ?= TroutEvsOverlay 64ENABLE_EVS_SERVICE ?= true 65ENABLE_MOCK_EVSHAL ?= false 66ENABLE_EVS_SAMPLE ?= true 67ENABLE_SAMPLE_EVS_APP ?= false 68ENABLE_CAREVSSERVICE_SAMPLE ?= true 69 70PRODUCT_PACKAGES += $(LOCAL_EVS_RRO_PACKAGE_OVERLAYS) 71 72ifeq ($(LOCAL_EVS_PRODUCT_COPY_FILES),) 73LOCAL_EVS_PRODUCT_COPY_FILES := \ 74 device/google/trout/product_files/etc/automotive/evs/config_override.json:${TARGET_COPY_OUT_SYSTEM}/etc/automotive/evs/config_override.json \ 75 device/google/trout/product_files/vendor/etc/automotive/evs/evs_configuration_override.xml:$(TARGET_COPY_OUT_VENDOR)/etc/automotive/evs/evs_configuration_override.xml 76endif 77PRODUCT_COPY_FILES += $(LOCAL_EVS_PRODUCT_COPY_FILES) 78 79# A device inheriting trout can enable Vulkan support. 80TARGET_VULKAN_SUPPORT ?= false 81 82PRODUCT_PROPERTY_OVERRIDES += \ 83 ro.hardware.type=automotive \ 84 ${LOCAL_AUDIO_PROPERTIES} \ 85 ${LOCAL_AUDIOCONTROL_PROPERTIES} \ 86 ${LOCAL_DUMPSTATE_PROPERTIES} \ 87 ${LOCAL_TRACING_SERVER_PROPERTIES} \ 88 ro.audio.flinger_standbytime_ms=0 89 90ifeq ($(TARGET_DISABLE_BOOT_ANIMATION),true) 91PRODUCT_PROPERTY_OVERRIDES += debug.sf.nobootanimation=1 92endif 93 94PRODUCT_CHARACTERISTICS := nosdcard,automotive 95 96TARGET_BOARD_INFO_FILE ?= device/google/trout/board-info.txt 97 98# Keymaster HAL 99LOCAL_KEYMINT_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service 100 101# Gatekeeper HAL 102LOCAL_GATEKEEPER_PRODUCT_PACKAGE ?= android.hardware.gatekeeper@1.0-service.software 103 104PRODUCT_PACKAGES += tinyplay tinycap 105 106# Trout fstab (workaround b/182190949) 107PRODUCT_COPY_FILES += \ 108 device/google/trout/product_files/fstab.trout:$(TARGET_COPY_OUT_RAMDISK)/fstab.trout \ 109 device/google/trout/product_files/fstab.trout:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.trout \ 110 device/google/trout/product_files/fstab.trout:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.trout \ 111 device/google/trout/product_files/fstab.trout:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.trout \ 112 device/google/trout/product_files/fstab.trout:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.trout 113 114# User HAL support 115TARGET_SUPPORTS_USER_HAL ?= false 116 117ifeq ($(TARGET_SUPPORTS_USER_HAL),false) 118PRODUCT_SYSTEM_DEFAULT_PROPERTIES += android.car.user_hal_enabled=false 119endif 120 121PRODUCT_PACKAGES += android.automotive.tracing-client.trout 122 123BOARD_SEPOLICY_DIRS += device/google/trout/sepolicy/vendor/google 124 125DEVICE_MANIFEST_FILE += device/google/trout/manifest.xml 126