summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-04-30 18:28:24 -0700
committerEric Laurent <elaurent@google.com>2012-06-04 14:02:07 -0700
commit3cdfddf1b27bcb5408ca3a04fcdf206447ba07ba (patch)
tree49d1029ed9cc8378bd404dc9d35183d2357de45a /include
parent4660455366d2ee64cb65f0ecd6f7ddeb1c17bac6 (diff)
downloadhardware_libhardware_legacy-3cdfddf1b27bcb5408ca3a04fcdf206447ba07ba.zip
hardware_libhardware_legacy-3cdfddf1b27bcb5408ca3a04fcdf206447ba07ba.tar.gz
hardware_libhardware_legacy-3cdfddf1b27bcb5408ca3a04fcdf206447ba07ba.tar.bz2
audio policy: improve support for direct outputs
Add the capability to query supported parameters for direct outputs after a device is connected. This allows to dynamically update the output profile for devices like HDMI where the capabilities depend on the connected sink. Also added very verbose log mode for volume and mute. Change-Id: I1d4ba8e7dbc3e1af883582857ce93240441e551c
Diffstat (limited to 'include')
-rw-r--r--include/hardware_legacy/AudioPolicyManagerBase.h10
-rw-r--r--include/hardware_legacy/audio_policy_conf.h4
2 files changed, 11 insertions, 3 deletions
diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h
index a918d39..96041c6 100644
--- a/include/hardware_legacy/AudioPolicyManagerBase.h
+++ b/include/hardware_legacy/AudioPolicyManagerBase.h
@@ -203,6 +203,9 @@ protected:
void dump(int fd);
+ // by convention, "0' in the first entry in mSamplingRates, mChannelMasks or mFormats
+ // indicates the supported parameters should be read from the output stream
+ // after it is opened for the first time
Vector <uint32_t> mSamplingRates; // supported sampling rates
Vector <audio_channel_mask_t> mChannelMasks; // supported channel masks
Vector <audio_format_t> mFormats; // supported audio formats
@@ -387,8 +390,9 @@ protected:
// when a device is disconnected, checks if an output is not used any more and
// returns its handle if any.
// transfers the audio tracks and effects from one output thread to another accordingly.
- audio_io_handle_t checkOutputForDevice(audio_devices_t device,
- AudioSystem::device_connection_state state);
+ status_t checkOutputsForDevice(audio_devices_t device,
+ AudioSystem::device_connection_state state,
+ SortedVector<audio_io_handle_t>& outputs);
// close an output and its companion duplicating output.
void closeOutput(audio_io_handle_t output);
@@ -466,7 +470,7 @@ protected:
uint32_t samplingRate,
uint32_t format,
uint32_t channelMask);
- audio_module_handle_t getModuleForDirectoutput(audio_devices_t device,
+ IOProfile *getProfileForDirectOutput(audio_devices_t device,
uint32_t samplingRate,
uint32_t format,
uint32_t channelMask,
diff --git a/include/hardware_legacy/audio_policy_conf.h b/include/hardware_legacy/audio_policy_conf.h
index c1fc0c1..fa58c36 100644
--- a/include/hardware_legacy/audio_policy_conf.h
+++ b/include/hardware_legacy/audio_policy_conf.h
@@ -47,4 +47,8 @@
#define DEVICES_TAG "devices"
#define FLAGS_TAG "flags"
+#define DYNAMIC_VALUE_TAG "dynamic" // special value for "channel_masks", "sampling_rates" and
+ // "formats" in outputs descriptors indicating that supported
+ // values should be queried after opening the output.
+
#endif // ANDROID_AUDIO_POLICY_CONF_H