diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2015-04-15 21:11:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-15 21:12:01 +0000 |
commit | cfdd52423cee9efea73023feeaa74279ebd45b7c (patch) | |
tree | 154c4ea34b3fc95dbde268fb24be2f2915438c78 /include | |
parent | 5e1c007038df74b389018e762d5059cacecff59e (diff) | |
parent | de80105c3f2db0eabd47640c49387ea3b44d4782 (diff) | |
download | frameworks_av-cfdd52423cee9efea73023feeaa74279ebd45b7c.zip frameworks_av-cfdd52423cee9efea73023feeaa74279ebd45b7c.tar.gz frameworks_av-cfdd52423cee9efea73023feeaa74279ebd45b7c.tar.bz2 |
Merge "AudioPolicyManager: notification of dynamic policy mix activity"
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioPolicy.h | 11 | ||||
-rw-r--r-- | include/media/AudioSystem.h | 1 | ||||
-rw-r--r-- | include/media/IAudioPolicyServiceClient.h | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/include/media/AudioPolicy.h b/include/media/AudioPolicy.h index a755e1e..800b27b 100644 --- a/include/media/AudioPolicy.h +++ b/include/media/AudioPolicy.h @@ -38,9 +38,15 @@ namespace android { #define MIX_TYPE_PLAYERS 0 #define MIX_TYPE_RECORDERS 1 +#define MIX_STATE_DISABLED -1 +#define MIX_STATE_IDLE 0 +#define MIX_STATE_MIXING 1 + #define ROUTE_FLAG_RENDER 0x1 #define ROUTE_FLAG_LOOP_BACK (0x1 << 1) +#define MIX_FLAG_NOTIFY_ACTIVITY 0x1 + #define MAX_MIXES_PER_POLICY 10 #define MAX_CRITERIA_PER_MIX 20 @@ -63,9 +69,9 @@ class AudioMix { public: AudioMix() {} AudioMix(Vector<AttributeMatchCriterion> criteria, uint32_t mixType, audio_config_t format, - uint32_t routeFlags, String8 registrationId) : + uint32_t routeFlags, String8 registrationId, uint32_t flags) : mCriteria(criteria), mMixType(mixType), mFormat(format), - mRouteFlags(routeFlags), mRegistrationId(registrationId) {} + mRouteFlags(routeFlags), mRegistrationId(registrationId), mFlags(flags){} status_t readFromParcel(Parcel *parcel); status_t writeToParcel(Parcel *parcel) const; @@ -75,6 +81,7 @@ public: audio_config_t mFormat; uint32_t mRouteFlags; String8 mRegistrationId; + uint32_t mFlags; }; }; // namespace android diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 3b6db8c..927283c 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -384,6 +384,7 @@ private: // IAudioPolicyServiceClient virtual void onAudioPortListUpdate(); virtual void onAudioPatchListUpdate(); + virtual void onDynamicPolicyMixStateUpdate(String8 regId, int32_t state); private: Mutex mLock; diff --git a/include/media/IAudioPolicyServiceClient.h b/include/media/IAudioPolicyServiceClient.h index 59df046..a7f2cc3 100644 --- a/include/media/IAudioPolicyServiceClient.h +++ b/include/media/IAudioPolicyServiceClient.h @@ -35,6 +35,8 @@ public: virtual void onAudioPortListUpdate() = 0; // Notifies a change of audio patch configuration. virtual void onAudioPatchListUpdate() = 0; + // Notifies a change in the mixing state of a specific mix in a dynamic audio policy + virtual void onDynamicPolicyMixStateUpdate(String8 regId, int32_t state) = 0; }; |