summaryrefslogtreecommitdiff
path: root/files/audio_policy.conf (plain)
blob: a5992e4f3ae596bad6cfdceae75f467148c0e2e8
1# Global configuration section:
2# - before audio HAL version 3.0:
3# lists input and output devices always present on the device
4# as well as the output device selected by default.
5# Devices are designated by a string that corresponds to the enum in audio.h
6#
7# global_configuration {
8# attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
9# default_output_device AUDIO_DEVICE_OUT_SPEAKER
10# attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_DIA_REMOTE
11# }
12#
13# - after and including audio HAL 3.0 the global_configuration section is included in each
14# hardware module section.
15# it also includes the audio HAL version of this hw module:
16# global_configuration {
17# ...
18# audio_hal_version <major.minor> # audio HAL version in e.g. 3.0
19# }
20# other attributes (attached devices, default device) have to be included in the
21# global_configuration section of each hardware module
22
23
24# audio hardware module section: contains descriptors for all audio hw modules present on the
25# device. Each hw module node is named after the corresponding hw module library base name.
26# For instance, "primary" corresponds to audio.primary.<device>.so.
27# The "primary" module is mandatory and must include at least one output with
28# AUDIO_OUTPUT_FLAG_PRIMARY flag.
29# Each module descriptor contains one or more output profile descriptors and zero or more
30# input profile descriptors. Each profile lists all the parameters supported by a given output
31# or input stream category.
32# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
33# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
34
35audio_hw_modules {
36 primary {
37 global_configuration {
38 attached_output_devices speaker|SPDIF
39 default_output_device AUDIO_DEVICE_OUT_SPEAKER
40 attached_input_devices hdmi_in|line_in|tuner|spdif_in|buimic_in
41 audio_hal_version 3.0
42 }
43 devices {
44 speaker {
45 type AUDIO_DEVICE_OUT_SPEAKER
46 gains {
47 gain_1 {
48 mode AUDIO_GAIN_MODE_JOINT
49 min_value_mB 0
50 max_value_mB 100
51 default_value_mB 50
52 step_value_mB 1
53 }
54 }
55 }
56 wired_headphone {
57 type AUDIO_DEVICE_OUT_WIRED_HEADPHONE
58 gains {
59 gain_1 {
60 mode AUDIO_GAIN_MODE_JOINT
61 min_value_mB 0
62 max_value_mB 100
63 default_value_mB 50
64 step_value_mB 1
65 }
66 }
67 }
68 tuner {
69 type AUDIO_DEVICE_IN_TV_TUNER
70 gains {
71 gain_1 {
72 mode AUDIO_GAIN_MODE_JOINT
73 min_value_mB 0
74 max_value_mB 100
75 default_value_mB 50
76 step_value_mB 1
77 }
78 }
79 }
80 line_in {
81 type AUDIO_DEVICE_IN_LINE
82 gains {
83 gain_1 {
84 mode AUDIO_GAIN_MODE_JOINT
85 min_value_mB 0
86 max_value_mB 100
87 default_value_mB 50
88 step_value_mB 1
89 }
90 }
91 }
92 buimic_in {
93 type AUDIO_DEVICE_IN_BUILTIN_MIC
94 }
95 spdif_in {
96 type AUDIO_DEVICE_IN_SPDIF
97 }
98 hdmi_out {
99 type AUDIO_DEVICE_OUT_AUX_DIGITAL
100 }
101 hdmi_in {
102 type AUDIO_DEVICE_IN_HDMI
103 gains {
104 gain_1 {
105 mode AUDIO_GAIN_MODE_JOINT
106 min_value_mB 0
107 max_value_mB 100
108 default_value_mB 50
109 step_value_mB 1
110 }
111 }
112 }
113 hdmi_arc {
114 type AUDIO_DEVICE_OUT_HDMI_ARC
115 }
116 SPDIF {
117 type AUDIO_DEVICE_OUT_SPDIF
118 }
119 wired_headset {
120 type AUDIO_DEVICE_OUT_WIRED_HEADSET
121 }
122 BT_sco {
123 type AUDIO_DEVICE_OUT_BLUETOOTH_SCO
124 }
125 BT_sco_headset {
126 type AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET
127 }
128 }
129 outputs {
130 primary {
131 sampling_rates 48000
132 channel_masks AUDIO_CHANNEL_OUT_STEREO
133 formats AUDIO_FORMAT_PCM_16_BIT
134 devices speaker|hdmi_arc|SPDIF|wired_headphone|wired_headset|BT_sco|BT_sco_headset
135 flags AUDIO_OUTPUT_FLAG_PRIMARY
136 }
137 offload {
138 #sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
139 #channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_QUAD_BACK|AUDIO_CHANNEL_OUT_QUAD_SIDE|AUDIO_CHANNEL_OUT_5POINT1_BACK|AUDIO_CHANNEL_OUT_5POINT1_SIDE|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_7POINT1
140 #formats AUDIO_FORMAT_AC3|AUDIO_FORMAT_E_AC3|AUDIO_FORMAT_IEC61937
141 sampling_rates dynamic
142 channel_masks dynamic
143 formats dynamic
144 devices speaker|hdmi_arc|SPDIF|wired_headphone|wired_headset
145 #flags AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_IEC958_NONAUDIO|AUDIO_OUTPUT_FLAG_HW_AV_SYNC
146 flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_HW_AV_SYNC
147 }
148 tunnel_raw {
149 sampling_rates 8000|11025|16000|22050|24000|32000|44100|48000
150 channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_QUAD_BACK|AUDIO_CHANNEL_OUT_QUAD_SIDE|AUDIO_CHANNEL_OUT_5POINT1_BACK|AUDIO_CHANNEL_OUT_5POINT1_SIDE|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_7POINT1
151 formats AUDIO_FORMAT_AC3|AUDIO_FORMAT_E_AC3
152 devices speaker|hdmi_arc|SPDIF|wired_headphone|wired_headset
153 flags AUDIO_OUTPUT_FLAG_HW_AV_SYNC|AUDIO_OUTPUT_FLAG_DIRECT
154 }
155 tunnel_pcm {
156 sampling_rates 32000|44100|48000
157 channel_masks AUDIO_CHANNEL_OUT_STEREO
158 formats AUDIO_FORMAT_PCM_16_BIT
159 devices speaker|hdmi_arc|SPDIF|wired_headphone|wired_headset
160 flags AUDIO_OUTPUT_FLAG_HW_AV_SYNC|AUDIO_OUTPUT_FLAG_DIRECT
161 }
162 }
163 inputs {
164 primary {
165 sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
166 channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
167 formats AUDIO_FORMAT_PCM_16_BIT
168 devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET|hdmi_in|line_in|tuner|spdif_in
169 }
170 }
171 }
172 a2dp {
173 outputs {
174 a2dp {
175 sampling_rates 44100
176 channel_masks AUDIO_CHANNEL_OUT_STEREO
177 formats AUDIO_FORMAT_PCM_16_BIT
178 devices AUDIO_DEVICE_OUT_ALL_A2DP
179 }
180 }
181 }
182 usb {
183 outputs {
184 usb_accessory {
185 sampling_rates 44100
186 channel_masks AUDIO_CHANNEL_OUT_STEREO
187 formats AUDIO_FORMAT_PCM_16_BIT
188 devices AUDIO_DEVICE_OUT_USB_ACCESSORY
189 }
190 usb_device {
191 sampling_rates 44100
192 channel_masks AUDIO_CHANNEL_OUT_STEREO
193 formats AUDIO_FORMAT_PCM_16_BIT
194 devices AUDIO_DEVICE_OUT_USB_DEVICE|AUDIO_DEVICE_OUT_USB_HEADSET
195 }
196 }
197 inputs {
198 usb_device {
199 sampling_rates 8000|11025|16000|22050|32000|44100|48000
200 channel_masks AUDIO_CHANNEL_IN_MONO
201 formats AUDIO_FORMAT_PCM_16_BIT
202 devices AUDIO_DEVICE_IN_USB_DEVICE|AUDIO_DEVICE_IN_USB_HEADSET
203 }
204 }
205 }
206 r_submix {
207 global_configuration {
208 attached_input_devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
209 audio_hal_version 2.0
210 }
211 outputs {
212 submix {
213 sampling_rates 48000
214 channel_masks AUDIO_CHANNEL_OUT_STEREO
215 formats AUDIO_FORMAT_PCM_16_BIT
216 devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
217 }
218 }
219 inputs {
220 submix {
221 sampling_rates 48000
222 channel_masks AUDIO_CHANNEL_IN_STEREO
223 formats AUDIO_FORMAT_PCM_16_BIT
224 devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
225 }
226 }
227 }
228}
229
230
231