summaryrefslogtreecommitdiff
path: root/files/audio_policy.conf (plain)
blob: 7f861cf9c84f111645025d8f7308aca4a742b604
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 AUDIO_DEVICE_OUT_SPEAKER
39 default_output_device AUDIO_DEVICE_OUT_SPEAKER
40 attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC
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 -8400
50 max_value_mB 4000
51 default_value_mB 0
52 step_value_mB 100
53 }
54 }
55 }
56 HDMI {
57 type AUDIO_DEVICE_OUT_AUX_DIGITAL
58 }
59 wired_headphone {
60 type AUDIO_DEVICE_OUT_WIRED_HEADPHONE
61 }
62 wired_headset {
63 type AUDIO_DEVICE_OUT_WIRED_HEADSET
64 }
65 BT_sco {
66 type AUDIO_DEVICE_OUT_BLUETOOTH_SCO
67 }
68 BT_sco_headset {
69 type AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET
70 }
71 }
72 outputs {
73 primary {
74 sampling_rates 48000
75 channel_masks AUDIO_CHANNEL_OUT_STEREO
76 formats AUDIO_FORMAT_PCM_16_BIT
77 devices speaker|HDMI|wired_headphone|wired_headset|BT_sco|BT_sco_headset
78 flags AUDIO_OUTPUT_FLAG_PRIMARY
79 }
80 #offload {
81 # sampling_rates 48000|96000|192000
82 # channel_masks AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_7POINT1
83 # formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AC3|AUDIO_FORMAT_E_AC3|AUDIO_FORMAT_DTS|AUDIO_FORMAT_DTS_HD|AUDIO_FORMAT_TRUEHD
84 # devices speaker
85 # flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_HW_AV_SYNC|AUDIO_OUTPUT_FLAG_NON_BLOCKING
86 #}
87 #here for HDMI audio dynamic profile from edid
88 hdmi_output {
89 sampling_rates dynamic
90 channel_masks dynamic
91 formats dynamic
92 devices HDMI
93 flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_HW_AV_SYNC
94 }
95 }
96 inputs {
97 primary {
98 sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
99 channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO
100 formats AUDIO_FORMAT_PCM_16_BIT
101 devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET
102 }
103 }
104 }
105 a2dp {
106 outputs {
107 a2dp {
108 sampling_rates 44100
109 channel_masks AUDIO_CHANNEL_OUT_STEREO
110 formats AUDIO_FORMAT_PCM_16_BIT
111 devices AUDIO_DEVICE_OUT_ALL_A2DP
112 }
113 }
114 }
115 usb {
116 outputs {
117 usb_accessory {
118 sampling_rates 44100
119 channel_masks AUDIO_CHANNEL_OUT_STEREO
120 formats AUDIO_FORMAT_PCM_16_BIT
121 devices AUDIO_DEVICE_OUT_USB_ACCESSORY
122 }
123 usb_device {
124 sampling_rates 44100
125 channel_masks AUDIO_CHANNEL_OUT_STEREO
126 formats AUDIO_FORMAT_PCM_16_BIT
127 devices AUDIO_DEVICE_OUT_USB_DEVICE
128 }
129 }
130 inputs {
131 usb_device {
132 sampling_rates 8000|11025|16000|22050|32000|44100|48000
133 channel_masks AUDIO_CHANNEL_IN_MONO
134 formats AUDIO_FORMAT_PCM_16_BIT
135 devices AUDIO_DEVICE_IN_USB_DEVICE
136 }
137 }
138 }
139 r_submix {
140 global_configuration {
141 attached_input_devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
142 audio_hal_version 2.0
143 }
144 outputs {
145 submix {
146 sampling_rates 48000
147 channel_masks AUDIO_CHANNEL_OUT_STEREO
148 formats AUDIO_FORMAT_PCM_16_BIT
149 devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
150 }
151 }
152 inputs {
153 submix {
154 sampling_rates 48000
155 channel_masks AUDIO_CHANNEL_IN_STEREO
156 formats AUDIO_FORMAT_PCM_16_BIT
157 devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
158 }
159 }
160 }
161 dia_remote {
162 global_configuration {
163 attached_input_devices AUDIO_DEVICE_IN_DIA_REMOTE
164 audio_hal_version 2.0
165 }
166 inputs {
167 submix {
168 sampling_rates 16000
169 channel_masks AUDIO_CHANNEL_IN_MONO
170 formats AUDIO_FORMAT_PCM_16_BIT
171 devices AUDIO_DEVICE_IN_DIA_REMOTE
172 }
173 }
174 }
175# hdmi {
176#here for board attached digital passthrough device profile.
177#we asssue SPDIF/AUX LINE are alwayes available.
178#user can force DD+/DD otuput without HDMI audio EDID support some kind
179#of audio compressed format
180#also supported Direct PCM output for 2.0 high samplerate lpcm
181# spdif_device_pcm {
182# sampling_rates 32000|44100|48000|88200|96000|176400|192000
183# channel_masks AUDIO_CHANNEL_OUT_STEREO
184# formats AUDIO_FORMAT_PCM_16_BIT
185# devices AUDIO_DEVICE_OUT_SPDIF
186# flags AUDIO_OUTPUT_FLAG_DIRECT
187# }
188# spdif_device_raw {
189# sampling_rates 32000|44100|48000|88200|96000|176400|192000
190# channel_masks AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_7POINT1
191# formats AUDIO_FORMAT_DTS|AUDIO_FORMAT_AC3
192# devices AUDIO_DEVICE_OUT_SPDIF
193# flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_HW_AV_SYNC|AUDIO_OUTPUT_FLAG_IEC958_NONAUDIO
194# }
195# }
196# inputs {
197# hdmi_device {
198# sampling_rates 48000
199# channel_masks AUDIO_CHANNEL_IN_STEREO
200# formats AUDIO_FORMAT_PCM_16_BIT
201# devices AUDIO_DEVICE_IN_AUX_DIGITAL
202# }
203# }
204# }
205}
206
207