diff options
| author | Eric Laurent <elaurent@google.com> | 2012-03-20 13:44:51 -0700 |
|---|---|---|
| committer | Eric Laurent <elaurent@google.com> | 2012-04-03 15:56:30 -0700 |
| commit | 5ccdf14a85ed66ac54036fb393acc06ea7acfed6 (patch) | |
| tree | 145bbc9ae42ed8282b94722ca0caa7c5d9f713a4 /audio/audio_policy.conf | |
| parent | 12bd6e4a5c26bd8035bf804d0cc821bd9b8cce9b (diff) | |
| download | hardware_libhardware_legacy-5ccdf14a85ed66ac54036fb393acc06ea7acfed6.tar.gz hardware_libhardware_legacy-5ccdf14a85ed66ac54036fb393acc06ea7acfed6.tar.bz2 hardware_libhardware_legacy-5ccdf14a85ed66ac54036fb393acc06ea7acfed6.zip | |
audio policy: use configuration file
The audio policy manager implementation now reads a configuration file at
boot time that contains descriptors for available audio hardware
modules and for each module the profiles of available inputs and outputs streams.
The configuration file path on the target is: /system/etc/audio_policy.conf.
A default configuration file is given that defines a basic configuration
with one primary audio hw module capable of playback and capture.
Each platform or device should have its own audio_policy.conf file.
Also removed default value of fromCache argument of getDeviceForStrategy()
and getNewDevice() methods.
Change-Id: I0c773d2331508bbc787f89b123dd6a7b8c10d459
Diffstat (limited to 'audio/audio_policy.conf')
| -rw-r--r-- | audio/audio_policy.conf | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/audio/audio_policy.conf b/audio/audio_policy.conf new file mode 100644 index 0000000..9f77dce --- /dev/null +++ b/audio/audio_policy.conf @@ -0,0 +1,46 @@ +# +# Audio policy configuration for generic device builds (goldfish audio HAL - emulator) +# + +# Global configuration section: lists input and output devices always present on the device +# as well as the output device selected by default. +# Devices are designated by a string that corresponds to the enum in audio.h + +global_configuration { + attached_output_devices AUDIO_DEVICE_OUT_SPEAKER + default_output_device AUDIO_DEVICE_OUT_SPEAKER + attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC +} + +# audio hardware module section: contains descriptors for all audio hw modules present on the +# device. Each hw module node is named after the corresponding hw module library base name. +# For instance, "primary" corresponds to audio.primary.<device>.so. +# The "primary" module is mandatory and must include at least one output with +# AUDIO_POLICY_OUTPUT_FLAG_PRIMARY flag. +# Each module descriptor contains one or more output profile descriptors and zero or more +# input profile descriptors. Each profile lists all the parameters supported by a given output +# or input stream category. +# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding +# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n". + +audio_hw_modules { + primary { + outputs { + primary { + sampling_rates 44100 + channel_masks AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_OUT_SPEAKER + flags AUDIO_POLICY_OUTPUT_FLAG_PRIMARY + } + } + inputs { + primary { + sampling_rates 8000|16000 + channel_masks AUDIO_CHANNEL_IN_MONO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_IN_BUILTIN_MIC + } + } + } +} |
