1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/*
4** Copyright 2021, The Android Open Source Project
5**
6** Licensed under the Apache License, Version 2.0 (the "License");
7** you may not use this file except in compliance with the License.
8** You may obtain a copy of the License at
9**
10**     http://www.apache.org/licenses/LICENSE-2.0
11**
12** Unless required by applicable law or agreed to in writing, software
13** distributed under the License is distributed on an "AS IS" BASIS,
14** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15** See the License for the specific language governing permissions and
16** limitations under the License.
17*/
18-->
19
20<!--
21  Overlay resources to configure car service based on each OEM's preference.
22  See also packages/services/Car/service/res/values/config.xml
23-->
24<audioPolicyConfiguration version="7.0" xmlns:xi="http://www.w3.org/2001/XInclude">
25    <!-- Global configuration Declaration -->
26    <globalConfiguration speaker_drc_enabled="true"/>
27    <modules>
28      <module name="primary" halVersion="2.0">
29        <attachedDevices>
30            <item>Speaker</item>
31            <item>Built-In Mic</item>
32            <item>FM Tuner</item>
33        </attachedDevices>
34        <defaultOutputDevice>Speaker</defaultOutputDevice>
35        <mixPorts>
36            <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
37                <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
38                    samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
39            </mixPort>
40            <mixPort name="primary input" role="sink" maxActiveCount="1" maxOpenCount="1">
41                <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
42                    samplingRates="8000 16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
43            </mixPort>
44            <mixPort name="mixport_tuner0" role="sink">
45                <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
46                    samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
47            </mixPort>
48        </mixPorts>
49        <devicePorts>
50            <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_BUS"
51                address="Speaker">
52                <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
53                    samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
54                <gains>
55                    <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
56                        minValueMB="-3200" maxValueMB="600" defaultValueMB="0" stepValueMB="100"/>
57                </gains>
58            </devicePort>
59
60            <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
61            </devicePort>
62
63            <devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source"
64                address="tuner0">
65                <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
66                    samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
67                <gains>
68                    <gain name="" mode="AUDIO_GAIN_MODE_JOINT"
69                        minValueMB="-3200" maxValueMB="600" defaultValueMB="0" stepValueMB="100"/>
70                </gains>
71            </devicePort>
72        </devicePorts>
73        <routes>
74            <route type="mix" sink="Speaker"
75                sources="primary output"/>
76            <route type="mix" sink="primary input"
77                sources="Built-In Mic"/>
78            <route type="mix" sink="mixport_tuner0"
79                sources="FM Tuner"/>
80        </routes>
81      </module>
82
83      <!-- Remote Submix Audio HAL -->
84      <xi:include href="r_submix_audio_policy_configuration.xml"/>
85
86      <!-- Bluetooth Audio HAL -->
87      <xi:include href="bluetooth_audio_policy_configuration_7_0.xml"/>
88    </modules>
89
90    <xi:include href="audio_policy_volumes.xml"/>
91    <xi:include href="default_volume_tables.xml"/>
92
93    <!-- End of Volume section -->
94    <!-- End of Modules section -->
95
96</audioPolicyConfiguration>
97