2 # Template audio policy configuration file
5 # Global configuration section:
6 # - before audio HAL version 3.0:
7 # lists input and output devices always present on the device
8 # as well as the output device selected by default.
9 # Devices are designated by a string that corresponds to the enum in audio.h
11 # global_configuration {
12 # attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
13 # default_output_device AUDIO_DEVICE_OUT_SPEAKER
14 # attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX
17 # - after and including audio HAL 3.0 the global_configuration section is included in each
18 # hardware module section.
19 # it also includes the audio HAL version of this hw module:
20 # global_configuration {
22 # audio_hal_version <major.minor> # audio HAL version in e.g. 3.0
24 # other attributes (attached devices, default device) have to be included in the
25 # global_configuration section of each hardware module
28 # audio hardware module section: contains descriptors for all audio hw modules present on the
29 # device. Each hw module node is named after the corresponding hw module library base name.
30 # For instance, "primary" corresponds to audio.primary.<device>.so.
31 # The "primary" module is mandatory and must include at least one output with
32 # AUDIO_OUTPUT_FLAG_PRIMARY flag.
33 # Each module descriptor contains one or more output profile descriptors and zero or more
34 # input profile descriptors. Each profile lists all the parameters supported by a given output
35 # or input stream category.
36 # The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
37 # to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
39 # For audio HAL version posterior to 3.0 the following sections or sub sections can be present in
40 # a hw module section:
41 # - A "global_configuration" section: see above
42 # - Optionally a "devices" section:
43 # This section contains descriptors for audio devices with attributes like an address or a
44 # gain controller. The syntax for the devices section and device descriptor is as follows:
46 # <device name> { # <device name>: any string without space
47 # type <device type> # <device type> e.g. AUDIO_DEVICE_OUT_SPEAKER
48 # address <address> # optional: device address, char string less than 64 in length
51 # - one or more "gains" sections can be present in a device descriptor section.
52 # If present, they describe the capabilities of gain controllers attached to this input or
53 # output device. e.g. :
54 # <device name> { # <device name>: any string without space
55 # type <device type> # <device type> e.g. AUDIO_DEVICE_OUT_SPEAKER
56 # address <address> # optional: device address, char string less than 64 in length
59 # mode <gain modes supported> # e.g. AUDIO_GAIN_MODE_CHANNELS
60 # channel_mask <controlled channels> # needed if mode AUDIO_GAIN_MODE_CHANNELS
61 # min_value_mB <min value in millibel>
62 # max_value_mB <max value in millibel>
63 # default_value_mB <default value in millibel>
64 # step_value_mB <step value in millibel>
65 # min_ramp_ms <min duration in ms> # needed if mode AUDIO_GAIN_MODE_RAMP
66 # max_ramp_ms <max duration ms> # needed if mode AUDIO_GAIN_MODE_RAMP
70 # - when a device descriptor is present, output and input profiles can refer to this device by
71 # its name in their "devices" section instead of specifying a device type. e.g. :
74 # sampling_rates 44100
75 # channel_masks AUDIO_CHANNEL_OUT_STEREO
76 # formats AUDIO_FORMAT_PCM_16_BIT
77 # devices <device name>
78 # flags AUDIO_OUTPUT_FLAG_PRIMARY
81 # sample audio_policy.conf file below
85 global_configuration {
86 attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
87 default_output_device AUDIO_DEVICE_OUT_SPEAKER
88 attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC
93 type AUDIO_DEVICE_OUT_SPEAKER
96 mode AUDIO_GAIN_MODE_JOINT
108 channel_masks AUDIO_CHANNEL_OUT_STEREO
109 formats AUDIO_FORMAT_PCM_16_BIT
111 flags AUDIO_OUTPUT_FLAG_PRIMARY
116 sampling_rates 8000|16000
117 channel_masks AUDIO_CHANNEL_IN_MONO
118 formats AUDIO_FORMAT_PCM_16_BIT
119 devices AUDIO_DEVICE_IN_BUILTIN_MIC
124 global_configuration {
125 attached_input_devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
126 audio_hal_version 2.0
131 channel_masks AUDIO_CHANNEL_OUT_STEREO
132 formats AUDIO_FORMAT_PCM_16_BIT
133 devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
139 channel_masks AUDIO_CHANNEL_IN_STEREO
140 formats AUDIO_FORMAT_PCM_16_BIT
141 devices AUDIO_DEVICE_IN_REMOTE_SUBMIX