Because of the downmix capability of the mixer, do not prevent
a non-direct output to be retrieved based on channel mask.
Change-Id: I911f95f4055c2134298c233d14f2f5d586091fd4
Audio hw modules are now loaded according to configuration
data read from audio_policy.conf. They are not loaded anymore
from a hardcoded list in AudiFlinger.
Output and input streams are opened on the hw module by which
they are exposed.
Also removed obsolete "acoustics" flags for input streams.
Change-Id: I8dc658cc83890d3ac7d5e36c372a03732aa5b0c4
The audio policy manager implementation now reads a configuration file at
boot time that contains descriptors for available audio hardware
modules and for each module the profiles of available inputs and outputs streams.
The configuration file path on the target is: /system/etc/audio_policy.conf.
A default configuration file is given that defines a basic configuration
with one primary audio hw module capable of playback and capture.
Each platform or device should have its own audio_policy.conf file.
Also removed default value of fromCache argument of getDeviceForStrategy()
and getNewDevice() methods.
Change-Id: I0c773d2331508bbc787f89b123dd6a7b8c10d459
Map the NOTIFICATION stream type to a new strategy,
named STRATEGY_NOTIFICATION_RESPECTFUL, which differs
from STRATEGY_NOTIFICATION in that, when media is
playing, the notifications will use the same output
as the MEDIA strategy. This will results in the
notifications not being duplicated on the speaker
when a headset is in use for media playback.
Change-Id: I032be0e2d383c69b5b6c912d7174753f5572c4b4
Some system calls can be interrupted. wifi.c in particular was getting
into error conditions during bugreport because it doesn't handle EINTR
at all.
Change-Id: I7bec432a0b3dca7dcc5c03c5e9f5e9ed73fa3c4b
This change makes support for A2DP related audio policy more generic:
-removed WITH_A2DP compilation switch
-use output profile descriptors listing the parameters
(sampling rate, format...) devices and attributes (low power, tunneling...)
for each available output.
All the behavior specific to A2DP is derived from the A2DP output profile
descriptor.
- removed obsolete a2dpUsedForSonification() method.
This is a first step towards a more generic support for different audio
hardware modules (USB, HDMI) and output streams supporting different
combinations of parameters (sampling rate, format...) and attributes
(low power, tunneling...).
Ultimately, the hw modules and output descriptors will loaded from a
configuration file.
Change-Id: Ife3e49e1afbcb72613bfc8ce38919bb087ca85ea
The early-suspend/late-resume interface to /sys/power/state
is being moved to the default/legacy Power HAL.
The emulator interface is being moved to the emulator
Power HAL.
Change-Id: I66a1e611e6d907f20335f047001745f818dfc846
Signed-off-by: Todd Poynor <toddpoynor@google.com>
The change for volume per device introduced a problem where if a headset
is plugged in while in silent mode, the sound will not be restored
at the first press on volume up key but only at the second press.
This is because when exiting silent mode, AudioService reapplies the
last known volume for all devices in any order and the last volume
applied prevails, even if it is for a device other than currently selected
by audio policy manager.
The fix consists in applying a new volume only if the device indicated
matches currently selected device on an output.
Change-Id: I778b90a9ec5a8b4a15e0333bd045f2dd327f388c
Improve volume management by keeping track of volume for each type
of device independently.
AudioPolicyManagerBase now keeps track of stream volumes for each device
and apply volume according to current device selection.
Methods to set and get stream volume now specify the device class.
A value for "default" device is always present for each stream and is used
if a device is selected and no specific volume was ever set for this device.
Change-Id: I06d8f43aa151a09014f7e47e81304c73ff82e9f8
Right now, everything goes over the primary interface socket connection.
Add support for a seperate connection over the p2p interface.
Change-Id: I09118f88cfaa201b2d62d27add410cfd441d4454
The ringer mode is at the moment not passed down from AudioService to
AudioPolicyManager as it is currently not used in any routig decision.
So the value store in audio policy manager is wrong and the dump is miss leading.
Change-Id: I3c21c168393470fd64c1b73e3c511576a9acdd7e
Make sure that camera shutter sound is output to device speaker also while
in call.
Added a new strategy for enforced audible stream to address this case as
the routing policy is now different from sonification strategy.
Issue 5548406.
Change-Id: I2de39dfaef7d90e3804b238b1379f0f59b75e985