• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER
7  default_output_device AUDIO_DEVICE_OUT_SPEAKER
8  attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC
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_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET
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|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_WIRED_HEADSET
39      }
40    }
41  }
42  a2dp {
43    outputs {
44      a2dp {
45        sampling_rates 44100
46        channel_masks AUDIO_CHANNEL_OUT_STEREO
47        formats AUDIO_FORMAT_PCM_16_BIT
48        devices AUDIO_DEVICE_OUT_ALL_A2DP
49      }
50    }
51  }
52}
53