From a4123803d0a0e9e0c69faa4207d357cc74a65d58 Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Wed, 6 Apr 2016 18:35:02 -0700 Subject: audiopolicy: Be a little smarter with auto-attach * The edge cases, ZOMG! * Instead of relying on effects to be automatically attached, let's just always notify userspace and send a bit more information. This lets the application decide if effects should be attached rather than relying on a hard-coded configuration file. * Perform the setup in getOutputForAttr, but do it on the command thread so we don't block the client. OPO-593 Change-Id: I3900b349f2e895d51fa3a3dcc2de0c4bdf6dbc08 --- media/libmedia/AudioSystem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'media/libmedia/AudioSystem.cpp') diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 10ec495..5bd8747 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -1239,7 +1239,9 @@ void AudioSystem::AudioPolicyServiceClient::onDynamicPolicyMixStateUpdate( } void AudioSystem::AudioPolicyServiceClient::onOutputSessionEffectsUpdate( - audio_stream_type_t stream, audio_unique_id_t sessionId, bool added) + audio_stream_type_t stream, audio_session_t sessionId, + audio_output_flags_t flags, audio_channel_mask_t channelMask, + uid_t uid, bool added) { ALOGV("AudioPolicyServiceClient::onOutputSessionEffectsUpdate(%d, %d, %d)", stream, sessionId, added); effect_session_callback cb = NULL; @@ -1249,7 +1251,7 @@ void AudioSystem::AudioPolicyServiceClient::onOutputSessionEffectsUpdate( } if (cb != NULL) { - cb(AUDIO_OUTPUT_SESSION_EFFECTS_UPDATE, stream, sessionId, added); + cb(AUDIO_OUTPUT_SESSION_EFFECTS_UPDATE, stream, sessionId, flags, channelMask, uid, added); } } -- cgit v1.1