summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_policy.conf102
-rw-r--r--audio/audio_policy_configuration.xml22
-rw-r--r--audio/primary/audio_policy_configuration.xml47
3 files changed, 69 insertions, 102 deletions
diff --git a/audio/audio_policy.conf b/audio/audio_policy.conf
deleted file mode 100644
index f7a6f02..0000000
--- a/audio/audio_policy.conf
+++ /dev/null
@@ -1,102 +0,0 @@
1# Global configuration section: lists input and output devices always present on the device
2# as well as the output device selected by default.
3# Devices are designated by a string that corresponds to the enum in audio.h
4
5global_configuration {
6 attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
7 default_output_device AUDIO_DEVICE_OUT_SPEAKER
8 attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_LINE
9}
10
11# audio hardware module section: contains descriptors for all audio hw modules present on the
12# device. Each hw module node is named after the corresponding hw module library base name.
13# For instance, "primary" corresponds to audio.primary.<device>.so.
14# The "primary" module is mandatory and must include at least one output with
15# AUDIO_OUTPUT_FLAG_PRIMARY flag.
16# Each module descriptor contains one or more output profile descriptors and zero or more
17# input profile descriptors. Each profile lists all the parameters supported by a given output
18# or input stream category.
19# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
20# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
21
22audio_hw_modules {
23 primary {
24 outputs {
25 primary {
26 sampling_rates 44100
27 channel_masks AUDIO_CHANNEL_OUT_STEREO
28 formats AUDIO_FORMAT_PCM_16_BIT
29 devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE
30 flags AUDIO_OUTPUT_FLAG_PRIMARY
31 }
32 }
33 inputs {
34 primary {
35 sampling_rates 8000|11025|16000|22050|32000|44100|48000
36 channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
37 formats AUDIO_FORMAT_PCM_16_BIT
38 devices AUDIO_DEVICE_IN_BUILTIN_MIC
39 }
40 }
41 }
42 hdmi {
43 outputs {
44 stereo {
45 sampling_rates 44100|48000
46 channel_masks AUDIO_CHANNEL_OUT_STEREO
47 formats AUDIO_FORMAT_PCM_16_BIT
48 devices AUDIO_DEVICE_OUT_AUX_DIGITAL
49 }
50 multichannel {
51 sampling_rates 44100|48000
52 channel_masks dynamic
53 formats AUDIO_FORMAT_PCM_16_BIT
54 devices AUDIO_DEVICE_OUT_AUX_DIGITAL
55 flags AUDIO_OUTPUT_FLAG_DIRECT
56 }
57 }
58 }
59 a2dp {
60 outputs {
61 a2dp {
62 sampling_rates 44100
63 channel_masks AUDIO_CHANNEL_OUT_STEREO
64 formats AUDIO_FORMAT_PCM_16_BIT
65 devices AUDIO_DEVICE_OUT_ALL_A2DP
66 }
67 }
68 inputs {
69 a2dp {
70 sampling_rates 44100|48000
71 channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
72 formats AUDIO_FORMAT_PCM_16_BIT
73 devices AUDIO_DEVICE_IN_BLUETOOTH_A2DP
74 }
75 }
76 }
77 r_submix {
78 outputs {
79 r_submix {
80 sampling_rates 44100|48000
81 channel_masks AUDIO_CHANNEL_OUT_STEREO
82 formats AUDIO_FORMAT_PCM_16_BIT
83 devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
84 }
85 multichannel {
86 sampling_rates 44100|48000
87 channel_masks AUDIO_CHANNEL_OUT_5POINT1
88 formats AUDIO_FORMAT_PCM_16_BIT
89 devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
90 flags AUDIO_OUTPUT_FLAG_DIRECT
91 }
92 }
93 inputs {
94 r_submix {
95 sampling_rates 44100|48000
96 channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_5POINT1EMUL
97 formats AUDIO_FORMAT_PCM_16_BIT
98 devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
99 }
100 }
101 }
102}
diff --git a/audio/audio_policy_configuration.xml b/audio/audio_policy_configuration.xml
new file mode 100644
index 0000000..319fa70
--- /dev/null
+++ b/audio/audio_policy_configuration.xml
@@ -0,0 +1,22 @@
1<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
3 <modules>
4 <!-- Primary Audio HAL -->
5 <xi:include href="primary_audio_policy_configuration.xml"/>
6
7 <!-- A2DP Audio HAL -->
8 <xi:include href="a2dp_audio_policy_configuration.xml"/>
9
10 <!-- USB Audio HAL -->
11 <xi:include href="usb_audio_policy_configuration.xml"/>
12
13 <!-- Remote Submix Audio HAL -->
14 <xi:include href="r_submix_audio_policy_configuration.xml"/>
15
16 </modules>
17
18 <!-- Volume section -->
19 <xi:include href="audio_policy_volumes.xml"/>
20 <xi:include href="default_volume_tables.xml"/>
21
22</audioPolicyConfiguration>
diff --git a/audio/primary/audio_policy_configuration.xml b/audio/primary/audio_policy_configuration.xml
new file mode 100644
index 0000000..f13d1bb
--- /dev/null
+++ b/audio/primary/audio_policy_configuration.xml
@@ -0,0 +1,47 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Primary Audio HAL Module Audio Policy Configuration include file -->
3<module name="primary" description="Primary Audio HAL" halVersion="2.0">
4 <attachedDevices>
5 <item>Speaker</item>
6 <item>Built-In Mic</item>
7 </attachedDevices>
8
9 <defaultOutputDevice>Speaker</defaultOutputDevice>
10
11 <mixPorts>
12 <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
13 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
14 samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
15 </mixPort>
16 <mixPort name="primary input" role="sink">
17 <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
18 samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
19 channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
20 </mixPort>
21 </mixPorts>
22
23 <devicePorts>
24 <devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink">
25 </devicePort>
26 <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
27 </devicePort>
28 <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
29 </devicePort>
30
31 <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
32 </devicePort>
33 </devicePorts>
34
35 <routes>
36 <route type="mux" sink="Speaker"
37 sources="primary output"/>
38 <route type="mux" sink="Wired Headset"
39 sources="primary output"/>
40 <route type="mux" sink="Wired Headphones"
41 sources="primary output"/>
42
43 <route type="mix" sink="primary input"
44 sources="Built-In Mic"/>
45 </routes>
46</module>
47