car: build audio control hal

This commit is contained in:
Konsta
2024-09-06 17:30:06 +03:00
parent e07c42997a
commit a00cc82199
2 changed files with 59 additions and 0 deletions

View File

@@ -15,6 +15,13 @@ PRODUCT_CHARACTERISTICS := automotive,nosdcard
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
$(call inherit-product, packages/services/Car/car_product/build/car.mk)
# Audio
PRODUCT_PACKAGES += \
android.hardware.automotive.audiocontrol-service.example
PRODUCT_COPY_FILES += \
$(DEVICE_CAR_PATH)/car_audio_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/car_audio_configuration.xml
# Bluetooth
PRODUCT_VENDOR_PROPERTIES += \
bluetooth.device.class_of_device=38,4,8 \

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Defines the audio configuration in a car, including
- Audio zones
- Zone configurations (in each audio zone)
- Volume groups (in each zone configuration)
- Context to audio bus mappings (in each volume group)
in the car environment.
-->
<carAudioConfiguration version="3">
<zones>
<zone name="Primary zone" isPrimary="true" occupantZoneId="0">
<zoneConfigs>
<zoneConfig name="Config 0" isDefault="true">
<volumeGroups>
<group>
<device address="Speaker">
<context context="music"/>
<context context="navigation"/>
<context context="voice_command"/>
<context context="call_ring"/>
<context context="call"/>
<context context="alarm"/>
<context context="notification"/>
<context context="system_sound"/>
<context context="emergency"/>
<context context="safety"/>
<context context="vehicle_status"/>
<context context="announcement"/>
</device>
</group>
</volumeGroups>
</zoneConfig>
</zoneConfigs>
</zone>
</zones>
</carAudioConfiguration>