xref: /aosp_15_r20/hardware/libhardware_legacy/audio/audio_policy.conf (revision 79330504eb3d14022296e3b041867f86289dd52c)
1*79330504STreehugger Robot#
2*79330504STreehugger Robot# Audio policy configuration for generic device builds (goldfish audio HAL - emulator)
3*79330504STreehugger Robot#
4*79330504STreehugger Robot
5*79330504STreehugger Robot# Global configuration section: lists input and output devices always present on the device
6*79330504STreehugger Robot# as well as the output device selected by default.
7*79330504STreehugger Robot# Devices are designated by a string that corresponds to the enum in audio.h
8*79330504STreehugger Robot
9*79330504STreehugger Robotglobal_configuration {
10*79330504STreehugger Robot  attached_output_devices AUDIO_DEVICE_OUT_SPEAKER
11*79330504STreehugger Robot  default_output_device AUDIO_DEVICE_OUT_SPEAKER
12*79330504STreehugger Robot  attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX
13*79330504STreehugger Robot}
14*79330504STreehugger Robot
15*79330504STreehugger Robot# audio hardware module section: contains descriptors for all audio hw modules present on the
16*79330504STreehugger Robot# device. Each hw module node is named after the corresponding hw module library base name.
17*79330504STreehugger Robot# For instance, "primary" corresponds to audio.primary.<device>.so.
18*79330504STreehugger Robot# The "primary" module is mandatory and must include at least one output with
19*79330504STreehugger Robot# AUDIO_OUTPUT_FLAG_PRIMARY flag.
20*79330504STreehugger Robot# Each module descriptor contains one or more output profile descriptors and zero or more
21*79330504STreehugger Robot# input profile descriptors. Each profile lists all the parameters supported by a given output
22*79330504STreehugger Robot# or input stream category.
23*79330504STreehugger Robot# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding
24*79330504STreehugger Robot# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n".
25*79330504STreehugger Robot
26*79330504STreehugger Robotaudio_hw_modules {
27*79330504STreehugger Robot  primary {
28*79330504STreehugger Robot    outputs {
29*79330504STreehugger Robot      primary {
30*79330504STreehugger Robot        sampling_rates 44100
31*79330504STreehugger Robot        channel_masks AUDIO_CHANNEL_OUT_STEREO
32*79330504STreehugger Robot        formats AUDIO_FORMAT_PCM_16_BIT
33*79330504STreehugger Robot        devices AUDIO_DEVICE_OUT_SPEAKER
34*79330504STreehugger Robot        flags AUDIO_OUTPUT_FLAG_PRIMARY
35*79330504STreehugger Robot      }
36*79330504STreehugger Robot    }
37*79330504STreehugger Robot    inputs {
38*79330504STreehugger Robot      primary {
39*79330504STreehugger Robot        sampling_rates 8000|16000
40*79330504STreehugger Robot        channel_masks AUDIO_CHANNEL_IN_MONO
41*79330504STreehugger Robot        formats AUDIO_FORMAT_PCM_16_BIT
42*79330504STreehugger Robot        devices AUDIO_DEVICE_IN_BUILTIN_MIC
43*79330504STreehugger Robot      }
44*79330504STreehugger Robot    }
45*79330504STreehugger Robot  }
46*79330504STreehugger Robot  r_submix {
47*79330504STreehugger Robot    outputs {
48*79330504STreehugger Robot      submix {
49*79330504STreehugger Robot        sampling_rates 48000
50*79330504STreehugger Robot        channel_masks AUDIO_CHANNEL_OUT_STEREO
51*79330504STreehugger Robot        formats AUDIO_FORMAT_PCM_16_BIT
52*79330504STreehugger Robot        devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
53*79330504STreehugger Robot      }
54*79330504STreehugger Robot    }
55*79330504STreehugger Robot    inputs {
56*79330504STreehugger Robot      submix {
57*79330504STreehugger Robot        sampling_rates 48000
58*79330504STreehugger Robot        channel_masks AUDIO_CHANNEL_IN_STEREO
59*79330504STreehugger Robot        formats AUDIO_FORMAT_PCM_16_BIT
60*79330504STreehugger Robot        devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
61*79330504STreehugger Robot      }
62*79330504STreehugger Robot    }
63*79330504STreehugger Robot  }
64*79330504STreehugger Robot}
65