summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2015-04-10 11:29:24 -0700
committerEric Laurent <elaurent@google.com>2015-04-15 23:15:38 +0000
commit554a277d4e42a3d3df3d90ba0e7dfa2d31690e32 (patch)
tree3647500470a7eca8095102a0e2818acb848cdf6a /services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
parent3249558196082087fb8bd0a847ef5c6000c8b925 (diff)
downloadframeworks_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 'services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp')
-rw-r--r--services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
index 9510727..5f501a5 100644
--- a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
+++ b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
@@ -661,4 +661,26 @@ status_t AudioPolicyService::registerPolicyMixes(Vector<AudioMix> mixes, bool re
}
}
+status_t AudioPolicyService::startAudioSource(const struct audio_port_config *source,
+ const audio_attributes_t *attributes,
+ audio_io_handle_t *handle)
+{
+ Mutex::Autolock _l(mLock);
+ if (mAudioPolicyManager == NULL) {
+ return NO_INIT;
+ }
+
+ return mAudioPolicyManager->startAudioSource(source, attributes, handle);
+}
+
+status_t AudioPolicyService::stopAudioSource(audio_io_handle_t handle)
+{
+ Mutex::Autolock _l(mLock);
+ if (mAudioPolicyManager == NULL) {
+ return NO_INIT;
+ }
+
+ return mAudioPolicyManager->stopAudioSource(handle);
+}
+
}; // namespace android