summaryrefslogtreecommitdiffstats
path: root/include/hardware_legacy/audio_policy_conf.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-03-20 13:44:51 -0700
committerEric Laurent <elaurent@google.com>2012-04-03 15:56:30 -0700
commit5ccdf14a85ed66ac54036fb393acc06ea7acfed6 (patch)
tree145bbc9ae42ed8282b94722ca0caa7c5d9f713a4 /include/hardware_legacy/audio_policy_conf.h
parent12bd6e4a5c26bd8035bf804d0cc821bd9b8cce9b (diff)
downloadhardware_libhardware_legacy-5ccdf14a85ed66ac54036fb393acc06ea7acfed6.zip
hardware_libhardware_legacy-5ccdf14a85ed66ac54036fb393acc06ea7acfed6.tar.gz
hardware_libhardware_legacy-5ccdf14a85ed66ac54036fb393acc06ea7acfed6.tar.bz2
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 'include/hardware_legacy/audio_policy_conf.h')
-rw-r--r--include/hardware_legacy/audio_policy_conf.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/hardware_legacy/audio_policy_conf.h b/include/hardware_legacy/audio_policy_conf.h
new file mode 100644
index 0000000..c5e8940
--- /dev/null
+++ b/include/hardware_legacy/audio_policy_conf.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef ANDROID_AUDIO_POLICY_CONF_H
+#define ANDROID_AUDIO_POLICY_CONF_H
+
+
+/////////////////////////////////////////////////
+// Definitions for audio policy configuration file (audio_policy.conf)
+/////////////////////////////////////////////////
+
+#define AUDIO_HARDWARE_MODULE_ID_MAX_LEN 32
+
+#define AUDIO_POLICY_CONFIG_FILE "/system/etc/audio_policy.conf"
+
+// global configuration
+#define GLOBAL_CONFIG_TAG "global_configuration"
+
+#define ATTACHED_OUTPUT_DEVICES_TAG "attached_output_devices"
+#define DEFAULT_OUTPUT_DEVICE_TAG "default_output_device"
+#define ATTACHED_INPUT_DEVICES_TAG "attached_input_devices"
+
+// hw modules descriptions
+#define AUDIO_HW_MODULE_TAG "audio_hw_modules"
+
+#define OUTPUTS_TAG "outputs"
+#define INPUTS_TAG "inputs"
+
+#define SAMPLING_RATES_TAG "sampling_rates"
+#define FORMATS_TAG "formats"
+#define CHANNELS_TAG "channel_masks"
+#define DEVICES_TAG "devices"
+#define FLAGS_TAG "flags"
+
+#endif // ANDROID_AUDIO_POLICY_CONF_H