diff options
author | Eric Laurent <elaurent@google.com> | 2015-04-10 11:29:24 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-04-15 23:15:38 +0000 |
commit | 554a277d4e42a3d3df3d90ba0e7dfa2d31690e32 (patch) | |
tree | 3647500470a7eca8095102a0e2818acb848cdf6a /media/libmedia/AudioSystem.cpp | |
parent | 3249558196082087fb8bd0a847ef5c6000c8b925 (diff) | |
download | frameworks_av-554a277d4e42a3d3df3d90ba0e7dfa2d31690e32.zip frameworks_av-554a277d4e42a3d3df3d90ba0e7dfa2d31690e32.tar.gz frameworks_av-554a277d4e42a3d3df3d90ba0e7dfa2d31690e32.tar.bz2 |
audio policy: add binder calls for audio source control
Add binder methods to IAudioPolicyService to control activity
of external audio sources (e.g FM tuner).
Change-Id: I2008308a6a996baeae502b68a790d87281efe2ff
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
-rw-r--r-- | media/libmedia/AudioSystem.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index d1aeba1..e9ee169 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -985,6 +985,22 @@ status_t AudioSystem::registerPolicyMixes(Vector<AudioMix> mixes, bool registrat return aps->registerPolicyMixes(mixes, registration); } +status_t AudioSystem::startAudioSource(const struct audio_port_config *source, + const audio_attributes_t *attributes, + audio_io_handle_t *handle) +{ + const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); + if (aps == 0) return PERMISSION_DENIED; + return aps->startAudioSource(source, attributes, handle); +} + +status_t AudioSystem::stopAudioSource(audio_io_handle_t handle) +{ + const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); + if (aps == 0) return PERMISSION_DENIED; + return aps->stopAudioSource(handle); +} + // --------------------------------------------------------------------------- status_t AudioSystem::AudioPolicyServiceClient::addAudioPortCallback( |