summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioSystem.cpp
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2015-04-21 17:37:00 -0700
committerEric Laurent <elaurent@google.com>2015-04-30 12:43:06 -0700
commit8c7e6dac6f5eb38cef627dab92eac8b38513450c (patch)
tree6aede3a6ac013462a117ffb181d93439525eebeb /media/libmedia/AudioSystem.cpp
parentf62a067a5b21c840c915d36392679346ac0abfd7 (diff)
downloadframeworks_av-8c7e6dac6f5eb38cef627dab92eac8b38513450c.zip
frameworks_av-8c7e6dac6f5eb38cef627dab92eac8b38513450c.tar.gz
frameworks_av-8c7e6dac6f5eb38cef627dab92eac8b38513450c.tar.bz2
audio policy: session routes continued.
- Clear session routes when client process dies. - Enforce the route only when the requesting session is active. - Fix requested route not working if an output mix change is required (e.g forcing to SPEAKER when the default route is USB or A2DP). - Make sure all sessions sharing the strategy with a rerouted session have the same route (needed for volume control consistency) Change-Id: I0ab347a8fb97e73e2c5965374544c5f4fe509ef1
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
-rw-r--r--media/libmedia/AudioSystem.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 3478441..12cd257 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -653,6 +653,7 @@ status_t AudioSystem::getOutputForAttr(const audio_attributes_t *attr,
audio_io_handle_t *output,
audio_session_t session,
audio_stream_type_t *stream,
+ uid_t uid,
uint32_t samplingRate,
audio_format_t format,
audio_channel_mask_t channelMask,
@@ -662,7 +663,7 @@ status_t AudioSystem::getOutputForAttr(const audio_attributes_t *attr,
{
const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
if (aps == 0) return NO_INIT;
- return aps->getOutputForAttr(attr, output, session, stream,
+ return aps->getOutputForAttr(attr, output, session, stream, uid,
samplingRate, format, channelMask,
flags, selectedDeviceId, offloadInfo);
}
@@ -697,6 +698,7 @@ void AudioSystem::releaseOutput(audio_io_handle_t output,
status_t AudioSystem::getInputForAttr(const audio_attributes_t *attr,
audio_io_handle_t *input,
audio_session_t session,
+ uid_t uid,
uint32_t samplingRate,
audio_format_t format,
audio_channel_mask_t channelMask,
@@ -706,7 +708,7 @@ status_t AudioSystem::getInputForAttr(const audio_attributes_t *attr,
const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
if (aps == 0) return NO_INIT;
return aps->getInputForAttr(
- attr, input, session, samplingRate, format, channelMask, flags, selectedDeviceId);
+ attr, input, session, uid, samplingRate, format, channelMask, flags, selectedDeviceId);
}
status_t AudioSystem::startInput(audio_io_handle_t input,