Commit graph

31 commits

Author SHA1 Message Date
Glenn Kasten
6a36ec43e6 Use audio_session_t consistently
Bug: 27562099
Change-Id: Id5af47af3e8e3404c575fbb0ec02cf25378b7089
2016-03-10 09:44:53 -08:00
Glenn Kasten
316222fcd6 Rename setStreamOutput to invalidateStream
And simplify by removing the unused I/O handle parameter 'output'.

Change-Id: Ie9c4df17a7378066312d4ed8790fda7a9125c95e
2014-02-28 11:54:03 -08:00
Glenn Kasten
2c3d2379ee Use audio_channel_mask_t in AudioPolicy
Also:
 - use %x format for logging channel masks
 - use AUDIO_CHANNEL_IN_* constants from system/audio.h instead of AudioSystemLegacy.h symbols
 - remove redundant casts
 - use "channelMask" instead of "channels" to avoid possible confusion with channel counts

Change-Id: If05d6b1cae5cf1b560cd53a93ae9e592b719ec9e
2013-12-16 14:10:22 -08:00
Glenn Kasten
5082dbeb19 Use audio_format_t in AudioPolicy
Also remove unnecessary default parameters

Change-Id: I553c01a98b8c2a3f3fd2ac98724aded3ad3c3022
2013-12-10 10:06:28 -08:00
Glenn Kasten
6fd6f41c11 Include header files used by this header
Change-Id: I36c6f580c698706b961150978e2124f9235eab12
2013-07-02 14:08:21 -07:00
Richard Fitzgerald
b4d07b97d2 Add audio policy API changes for audio offload
Changes to the API of audio policy for audio offload support:
- Add isOffloadSupported() function
- Add OUTPUT_FLAG_OFFLOAD
- Extend AudioOutputDescriptor to include a sharing count for direct outputs
- Pass audio_offload_info_t when opening output streams

Change-Id: I5ad26418fdb286eb7ae299d586dd1fd525d48ab9
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Eric Laurent <elaurent@google.com>
2013-06-27 17:16:25 -07:00
Jean-Michel Trivi
dc3bf1a374 Identify remote stream activity, used for notification routing
Add support for checking remote stream activity.

Don't route notifications like media when media active remotely.

Add remote stream activity query in audio policy HAL.

Bug 7485803

Change-Id: Ifb722c7f9ffbfbdc877fec5156bcfc09bec40651
2013-02-11 10:23:13 -08:00
Jean-Michel Trivi
abc55c6983 AudioPolicyManager supports querying active record sources
Add support for querying whether there is currently a recording
  underway from the specified audio source.

Bug 7314859

Change-Id: I8894845b176241134870af5df2bebc5ef27e4de4
2012-10-10 15:19:35 -07:00
Jean-Michel Trivi
c8101f5b14 Update AudioPolicyManagerBase to only use audio_devices_t
The AudioPolicyManagerBase implementation was using some device
 enum values from AudioSystemLegacy.h, of type audio_devices,
 and some from /system/audio.h, of type audio_devices_t.
Now only uses audio_devices_t, and associated functions to
 inspect what audio device type they correspond to.
Added #define to represent "no audio device" to clarify code.
Removed unused variable in AudioPolicyManagerBase::startOutput()

Change-Id: Ibec311dac550d6a806397377206a43bc708914c0
2012-08-24 15:12:57 -07:00
Glenn Kasten
c94dccc97c effect_descriptor_t const correctness
Change-Id: I734155d4cebb22b180f25290332c7c48be1e2b36
2012-07-24 07:51:26 -07:00
Eric Laurent
0977cf534f rename audio policy flags
Change-Id: Ic42eba3432671f651c9703a07fe7b429a8ec0dff
2012-04-18 10:42:04 -07:00
Eric Laurent
70c236c929 audio policy: load audio hw modules
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
2012-04-03 20:49:35 -07:00
Jean-Michel Trivi
12bd6e4a5c Only duplicate notifications when no media is playing
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
2012-04-02 09:31:09 -07:00
Eric Laurent
f9a4e2eccf audio policy: use audio_devices_t when appropriate
Change-Id: I0b4e2ff705fce96b40fdda28b1bc4b514438bec6
2012-03-08 13:41:38 -08:00
Glenn Kasten
70eb9dec50 Use audio_in_acoustics_t consistently
Change-Id: I9875afdf21937c88a5decc9d94e89fddffc3519e
2012-01-27 13:04:19 -08:00
Glenn Kasten
ba1e8cb245 Merge "Audio policy HAL set_ringer_mode is deprecated" 2012-01-20 10:07:13 -08:00
Glenn Kasten
902ec630b6 Fix typos
Change-Id: Ie0acd07861604e66f571e0c1f43cfdccf12ea691
2012-01-18 16:27:02 -08:00
Glenn Kasten
ca0657a1ca Audio policy HAL set_ringer_mode is deprecated
Change-Id: I66ef40ed381151ba61debe20edaa53bece0cc139
2012-01-18 15:24:50 -08:00
Eric Laurent
c6f331b3f4 audio policy manager: stream volume per device
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
2012-01-17 16:00:01 -08:00
Olivier Bailly
b7ee39305b fix build: method needs to be pure virtual, otherwise needs to be defined.
Change-Id: I9dbdd29dc430fbf19a1d9cb8d44a1f9c6f624dbb
2011-10-05 18:02:02 -07:00
Eric Laurent
582a15744b AudioPolicyManager: register effect CPU on enable
Audio effect CPU usage is now registered on enable and
unregistered on disable instead of when the effect is
created or destroyed.

Change-Id: Icffcede9558d8d41887278f0efef2df430927381
2011-08-11 09:17:07 -07:00
Eric Laurent
1c65a49da0 Audio effects: support for audio pre processing
Audio policy manager: allow registration of audio effects on
inputs too.

Change-Id: I92efa5b51cfde591052a5c56ba2b0b84de80df0f
2011-07-12 17:19:08 -07:00
Dima Zavin
e81531e91e hardware_legacy: provide HAL helpers for legacy audio users
This doesn't actually create a HAL, but rather a set of helper static
libraries that device specific libraries (i.e. the old libaudio pieces)
can link against to create a proper audio HAL module.

We provide an audio_policy static wrapper and audio hardware interface
static wrapper.

Change-Id: Ie56195447ad24b83888f752dca24674b0afd8a76
Signed-off-by: Dima Zavin <dima@android.com>
2011-04-27 10:48:25 -07:00
Glenn Kasten
fafb18fb31 Bug 3352047 Wrong message when adjusting volume
Add hidden AudioManager.getDevicesForStream and output device codes.

Change-Id: I45be59a2774196a135d013e45f38033036f74257
2011-02-10 13:31:26 -08:00
Eric Laurent
36291a74cd Fix issue 3371080.
Move isStreamActive() method from AudioFlinger to AudioPolicyManager.
iStreamActive() now specifies a time window during which the stream is considered
active after it actually stopped.

Change-Id: Ib0d7d8f061b9f809d307ecfac40960ef582e5f0f
2011-02-02 15:33:42 -08:00
Eric Laurent
61f3579486 Tentative fix for issue 3362362.
Added an initCheck() method to AudioPolicyInterface to verify
successful initialization of AudioPolicyManager.

Change-Id: I4c892282dbeb3246ee6c006bd206a3e723bcb71f
2011-01-19 08:49:30 -08:00
Eric Laurent
d2b227e760 Audio policy manager changes for audio effects
Added methods for audio effects management by audio policy manager.
- control of total CPU load and memory used by effect engines
- selection of output stream for global effects
- added audio session id in parameter list for startOutput() and stopOutput().
this is not used in default audio policy manager implementation.

Change-Id: I3467e64035387cc5272266b1318a5ed788958374
2010-07-20 09:31:47 -07:00
Eric Laurent
323028bd21 Log for issue 2203561.
Added dump() method to AudioPolicyInterface.
2009-11-03 09:28:27 -08:00
Eric Laurent
f163f3d600 Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
Added setVoiceVolume() method to AudioPolicyClientInterface.
2009-10-21 08:08:44 -07:00
Eric Laurent
721365e3e7 Fix issue 2045911: Camera Shutter tone does not play correctly while listening to music.
Add the possibility to delay routing and volume commands in AudioPolicyClientInterface. The delay is not blocking for the caller.
2009-08-27 05:51:04 -07:00
Eric Laurent
dbfad0ce83 Fix issue 1795088 Improve audio routing code
Initial commit for review.
2009-07-17 12:18:40 -07:00