summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-04-16 18:05:39 -0700
committerEric Laurent <elaurent@google.com>2012-04-17 16:02:31 -0700
commit545ab46063f083239b29e59b8b491656d93f2a38 (patch)
tree8572736c90155a9c22be5d846f00e8680c642dba /include
parentb47cd10acf6eb9449fc12a93f17f720b21e998c8 (diff)
downloadsystem_core-545ab46063f083239b29e59b8b491656d93f2a38.zip
system_core-545ab46063f083239b29e59b8b491656d93f2a38.tar.gz
system_core-545ab46063f083239b29e59b8b491656d93f2a38.tar.bz2
audio: added definitions for audio HAL device API.
Added definitions for output flags needed by new audio HAL device API. These flags where previously defined in audio_policy.h. Definition in audio_policy.h remains temporarily until all projects are changed to use new flags. Change-Id: I371558c78050daae73942a36f51854372ab71068
Diffstat (limited to 'include')
-rw-r--r--include/system/audio.h22
-rw-r--r--include/system/audio_policy.h23
2 files changed, 28 insertions, 17 deletions
diff --git a/include/system/audio.h b/include/system/audio.h
index 4cadb67..382fc36 100644
--- a/include/system/audio.h
+++ b/include/system/audio.h
@@ -341,6 +341,28 @@ typedef enum {
AUDIO_DEVICE_IN_ALL_SCO = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET,
} audio_devices_t;
+/* the audio output flags serve two purposes:
+ * - when an AudioTrack is created they indicate a "wish" to be connected to an
+ * output stream with attributes corresponding to the specified flags
+ * - when present in an output profile descriptor listed for a particular audio
+ * hardware module, they indicate that an output stream can be opened that
+ * supports the attributes indicated by the flags.
+ * the audio policy manager will try to match the flags in the request
+ * (when getOuput() is called) to an available output stream.
+ */
+typedef enum {
+ AUDIO_OUTPUT_FLAG_NONE = 0x0, // no attributes
+ AUDIO_OUTPUT_FLAG_DIRECT = 0x1, // this output directly connects a track
+ // to one output stream: no software mixer
+ AUDIO_OUTPUT_FLAG_PRIMARY = 0x2, // this output is the primary output of
+ // the device. It is unique and must be
+ // present. It is opened by default and
+ // receives routing, audio mode and volume
+ // controls related to voice calls.
+ AUDIO_OUTPUT_FLAG_FAST = 0x4, // output supports "fast tracks",
+ // defined elsewhere
+} audio_output_flags_t;
+
static inline bool audio_is_output_device(audio_devices_t device)
{
if ((popcount(device) == 1) && ((device & ~AUDIO_DEVICE_OUT_ALL) == 0))
diff --git a/include/system/audio_policy.h b/include/system/audio_policy.h
index 641b177..701c86a 100644
--- a/include/system/audio_policy.h
+++ b/include/system/audio_policy.h
@@ -30,24 +30,13 @@ __BEGIN_DECLS
* frameworks/base/include/media/AudioSystem.h
*/
-/* the audio output flags serve two purposes:
- * - when an AudioTrack is created they indicate a "wish" to be connected to an output stream with
- * attributes corresponding to the specified flags
- * - when present in an output profile descriptor listed for a particular audio hardware module,
- * they indicate that an output stream can be opened that supports the attributes indicated by
- * the flags.
- * the audio policy manager will try to match the flags in the request (when getOuput() is called)
- * to an available output stream.
- */
+/* FIXME: temporary definitions to be removed once all projects have been changed
+ * to use audio_output_flags_t */
typedef enum {
- AUDIO_POLICY_OUTPUT_FLAG_NONE = 0x0, // no attributes
- AUDIO_POLICY_OUTPUT_FLAG_DIRECT = 0x1, // this output directly connects a track to one output
- // stream (no software mixer)
- AUDIO_POLICY_OUTPUT_FLAG_PRIMARY = 0x2, // this output is the primary output of the device.
- // it is unique and must be present. it is opened by
- // default and receives routing, audio mode and
- // volume controls related to voice calls.
- AUDIO_POLICY_OUTPUT_FLAG_FAST = 0x4, // output supports "fast tracks", defined elsewhere
+ AUDIO_POLICY_OUTPUT_FLAG_NONE = AUDIO_OUTPUT_FLAG_NONE,
+ AUDIO_POLICY_OUTPUT_FLAG_DIRECT = AUDIO_OUTPUT_FLAG_DIRECT,
+ AUDIO_POLICY_OUTPUT_FLAG_PRIMARY = AUDIO_OUTPUT_FLAG_PRIMARY,
+ AUDIO_POLICY_OUTPUT_FLAG_FAST = AUDIO_OUTPUT_FLAG_FAST,
} audio_policy_output_flags_t;
/* device categories used for audio_policy->set_force_use() */