summaryrefslogtreecommitdiffstats
path: root/include/hardware_legacy/AudioPolicyManagerBase.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-05-15 19:16:30 -0700
committerEric Laurent <elaurent@google.com>2012-05-15 19:26:46 -0700
commit01e6272f0a3a7d1d53e826012377ff9269b03b06 (patch)
treebbc1a201c6eed6f896c03435992362b8335bf1d4 /include/hardware_legacy/AudioPolicyManagerBase.h
parent03f3747b2f364bce475aead57141bbc44b1637e7 (diff)
downloadhardware_libhardware_legacy-01e6272f0a3a7d1d53e826012377ff9269b03b06.zip
hardware_libhardware_legacy-01e6272f0a3a7d1d53e826012377ff9269b03b06.tar.gz
hardware_libhardware_legacy-01e6272f0a3a7d1d53e826012377ff9269b03b06.tar.bz2
audio policy: fix in call volume problem.
When switching audio path, it is sometimes required to temporarily mute certain streams to avoid glitches. The unmute command is sent with a delay but the volume applied when unmuting is computed according to the state at the time of mute. If the device selection changes after the delayed unmute is programmed the new volume will not correspond to the new device. setStreamMute() now accepts a device selection as input parameter which is used instead of current device for volume computation. Bug 6497819. Change-Id: I355ebf9e1afe814fa5c2723bda9c40e58f921b46
Diffstat (limited to 'include/hardware_legacy/AudioPolicyManagerBase.h')
-rw-r--r--include/hardware_legacy/AudioPolicyManagerBase.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h
index be6c19d..a918d39 100644
--- a/include/hardware_legacy/AudioPolicyManagerBase.h
+++ b/include/hardware_legacy/AudioPolicyManagerBase.h
@@ -358,10 +358,18 @@ protected:
void applyStreamVolumes(audio_io_handle_t output, audio_devices_t device, int delayMs = 0, bool force = false);
// Mute or unmute all streams handled by the specified strategy on the specified output
- void setStrategyMute(routing_strategy strategy, bool on, audio_io_handle_t output, int delayMs = 0);
+ void setStrategyMute(routing_strategy strategy,
+ bool on,
+ audio_io_handle_t output,
+ int delayMs = 0,
+ audio_devices_t device = (audio_devices_t)0);
// Mute or unmute the stream on the specified output
- void setStreamMute(int stream, bool on, audio_io_handle_t output, int delayMs = 0);
+ void setStreamMute(int stream,
+ bool on,
+ audio_io_handle_t output,
+ int delayMs = 0,
+ audio_devices_t device = (audio_devices_t)0);
// handle special cases for sonification strategy while in call: mute streams or replace by
// a special tone in the device used for communication