diff options
author | Eric Laurent <elaurent@google.com> | 2014-05-28 16:13:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-28 16:13:31 +0000 |
commit | 5584c58c7c952b5ed891bbff3b00a0be3f96196d (patch) | |
tree | ed423b5646d2c76ff00ac9e407761635923fc1f0 /include | |
parent | ecc03733bfd3262ffadef3166e6be23b539c505c (diff) | |
parent | 8670c31fddbeadcf9627aa970c69a823f13939ff (diff) | |
download | frameworks_av-5584c58c7c952b5ed891bbff3b00a0be3f96196d.zip frameworks_av-5584c58c7c952b5ed891bbff3b00a0be3f96196d.tar.gz frameworks_av-5584c58c7c952b5ed891bbff3b00a0be3f96196d.tar.bz2 |
Merge "IAudioPolicyService interface extension for patch panel"
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioSystem.h | 25 | ||||
-rw-r--r-- | include/media/IAudioPolicyService.h | 25 |
2 files changed, 50 insertions, 0 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 402b479..a79a9ff 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -274,6 +274,31 @@ public: // check presence of audio flinger service. // returns NO_ERROR if binding to service succeeds, DEAD_OBJECT otherwise static status_t checkAudioFlinger(); + + /* List available audio ports and their attributes */ + static status_t listAudioPorts(audio_port_role_t role, + audio_port_type_t type, + unsigned int *num_ports, + struct audio_port *ports, + unsigned int *generation); + + /* Get attributes for a given audio port */ + static status_t getAudioPort(struct audio_port *port); + + /* Create an audio patch between several source and sink ports */ + static status_t createAudioPatch(const struct audio_patch *patch, + audio_patch_handle_t *handle); + + /* Release an audio patch */ + static status_t releaseAudioPatch(audio_patch_handle_t handle); + + /* List existing audio patches */ + static status_t listAudioPatches(unsigned int *num_patches, + struct audio_patch *patches, + unsigned int *generation); + /* Set audio port configuration */ + static status_t setAudioPortConfig(const struct audio_port_config *config); + // ---------------------------------------------------------------------------- private: diff --git a/include/media/IAudioPolicyService.h b/include/media/IAudioPolicyService.h index 09b9ea6..6b6df6e 100644 --- a/include/media/IAudioPolicyService.h +++ b/include/media/IAudioPolicyService.h @@ -99,6 +99,31 @@ public: // Check if offload is possible for given format, stream type, sample rate, // bit rate, duration, video and streaming or offload property is enabled virtual bool isOffloadSupported(const audio_offload_info_t& info) = 0; + + /* List available audio ports and their attributes */ + virtual status_t listAudioPorts(audio_port_role_t role, + audio_port_type_t type, + unsigned int *num_ports, + struct audio_port *ports, + unsigned int *generation) = 0; + + /* Get attributes for a given audio port */ + virtual status_t getAudioPort(struct audio_port *port) = 0; + + /* Create an audio patch between several source and sink ports */ + virtual status_t createAudioPatch(const struct audio_patch *patch, + audio_patch_handle_t *handle) = 0; + + /* Release an audio patch */ + virtual status_t releaseAudioPatch(audio_patch_handle_t handle) = 0; + + /* List existing audio patches */ + virtual status_t listAudioPatches(unsigned int *num_patches, + struct audio_patch *patches, + unsigned int *generation) = 0; + /* Set audio port configuration */ + virtual status_t setAudioPortConfig(const struct audio_port_config *config) = 0; + }; |