Commit graph

459 commits

Author SHA1 Message Date
vandwalle
73efd5b991 fix build compile
Change-Id: Ic9ffdfb23fa704d636a5f0106a205af3693d3a20
2014-05-15 17:06:21 -07:00
Chilam Ng
d1940c016f Include hal link_layer_stats.h
Change-Id: Ic86065863c7b3d6a40101724f4e7d8a8263d62b5
Signed-off-by: Chilam Ng <chilam@broadcom.com>
2014-05-15 17:06:02 -07:00
Vinit Deshapnde
cb2c4baad6 Introduce Link Layer Stats API
Change-Id: Ie3b3a1a511026aafbd46f8165272059ce856992d
2014-05-15 17:05:48 -07:00
Eric Laurent
9c599afbc0 am 62038fc4: am 2c388a44: am 8eb3354a: Merge "Audio: add an openOutputStreamWithFlags API"
* commit '62038fc4c5c596f04a87388bb42bdef13d359c39':
  Audio: add an openOutputStreamWithFlags API
2014-05-08 18:24:06 +00:00
Vinit Deshapnde
5eabea5585 Introduce on_full_scan_result event in WifiHal
This change will allow the hardware to report all IEs found in the probe
response.

Change-Id: I149900c63a301df84fd6ff6eb1a1f3773daa0111
2014-05-07 19:23:27 -07:00
Vinit Deshapnde
b80d32d2a1 Moving Wifi HAL to hardware
This change moves all Wifi HAL headers to libhardware_legacy; and moves
hal implementation under hardware/<vendor>/wlan. This way different
vendors will be able to tailor implementation to their drivers.

Change-Id: I55789bb6788ab694f4896aa36d76f7887b32dad6
2014-05-07 18:51:12 -07:00
Paul McLean
fd61179b64 Update policy handling for USB inputs
Change-Id: Ib2e531f115f8bd1d5f290094032f3f4a4753e726
2014-04-25 17:00:48 +00:00
David Wagner
cc029e59f7 Audio: add an openOutputStreamWithFlags API
The existing openOutputStream API did not allow passing stream flags even
though its audio hardware interface's open_output_stream counterpart does take
a "flags" argument.  This means that, when the audio hw_module is implemented
using libhardware_legacy, the output flag was lost.

This commit adds an API in libhardware_legacy's audio module, allowing to pass
the flag, and updates the default wrapper in order to call this new API instead
of the old version that missed the flag.

Change-Id: I20c102d32b489f87fabbd7d02aa0b28fae13948b
Signed-off-by: David Wagner <david.wagner@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
2014-04-23 14:42:21 +02:00
Dmitry Shmidt
cd56eb51af wifi: Sync with wpa_supplicant commit 7dba0e5 (bacb984)
Change-Id: I2f40c47c6388174b8ad09d089fe8a8aab2e67ca4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2014-04-14 11:01:39 -07: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
Dmitry Shmidt
a1e9d83af5 wifi: Sync with wpa_supplicant commit bd14a57
Change-Id: I17f5ff7c53b642c163c5ca25b0f075b112469004
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2014-02-18 15:48:20 -08:00
Eric Laurent
9f4165f36d audio policy: send config params when opening output
When a new output stream is opened upon device connection,
always send mandatory configuration parameters
(A2DP device address, ALSA card and device number etc...)
immediately after opening the output.

Change-Id: Id1fc1d99d3b30e2ef907dcb231a6a9e70560ecae
2014-01-08 09:34:38 -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
Dmitry Shmidt
de90e1074d wifi: Sync with wpa_supplicant commit 107a894
Change-Id: I9ed9eb6e8dda10600c150a1cade55dc7547cc7e4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-11-19 13:19:30 -08:00
Jean-Michel Trivi
ec7aab39d5 am 9d395038: am 18fc094c: Define and use DRC-specific volume curves when applicable
* commit '9d3950389b53452338fab25f2255623ac159b259':
  Define and use DRC-specific volume curves when applicable
2013-11-15 09:08:16 -08:00
Jean-Michel Trivi
18fc094c0e Define and use DRC-specific volume curves when applicable
Add support for property defining whether a DRC on the speaker path
 is enabled and will boost soft sounds.
Define new volume curves with more attenuations than existing ones
 to compensate for DRC-induced boost on sonification sounds to
 provide a more "linear" control to the user over the applied volume.

Bug 11600699

Change-Id: If23dd097a8b9b5ebb61e75dd8512ff75e63ba899
2013-11-14 16:36:43 -08:00
Eric Laurent
1ecadc5852 am 758289be: Merge "audio policy: fix gapless playback when effects enabled" into klp-dev
* commit '758289be1f05457db5dd4d29020cabd81efe66bb':
  audio policy: fix gapless playback when effects enabled
2013-10-29 18:24:59 -07:00
Eric Laurent
000bb51ca5 audio policy: fix gapless playback when effects enabled
Do not allow offloading if one non offloadable effect is enabled. This prevents from
creating an offloaded track and tearing it down immediately after start when audioflinger
detects there is an active non offloadable effect.
Not doing so breaks gapless playback because AwesomePlayer will always be able to open
an offloaded track which will not be compatible with the previous PCM track and
Audiosink::open() will not recycle it.

Bug: 11181933.
Change-Id: I6d163806849d9093b9ec701ba8e8c1ccb658e3c8
2013-10-14 11:15:39 -07:00
Dmitry Shmidt
77aa9a6dfb wifi: Sync with wpa_supplicant commit 5605286
Change-Id: I43713275612f612e9d73ad555cac30e056b3c85a
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-10-04 11:04:45 -07:00
Eric Laurent
45c763947b audio policy: add support for audio effect offload
Add rules to select the appropriate output for global
effects.
Move global effects if needed when an offloaded output is
created or released.

Bug: 8174034.

Change-Id: I0bbd8e9f8aa717f672462dd74ba0d01eaef1fda7
2013-09-17 11:27:45 -07:00
Eric Laurent
8c3b7b67ac audio policy: extend min duration for offload
Extend minimun duration of offloaded audio content
to 1 minute to avoid offloading short clips like
TTS generated files.

Bug: 8174034.
Change-Id: Ied21557c300af4b27d99388e069576e36804087f
2013-09-09 13:24:05 -07:00
Vinit Deshapnde
0f330488af Use a single socket to communicate with supplicant
This helps to preapre for future updates from external sources.

Bug: 9298955

Change-Id: I4c63ad5fc1ea3564aab38cfce955de19bad75c0c
(cherry picked from commit 759cc323cb586192d591a815b0fb9d839536fcd6)
2013-08-08 18:31:38 +00:00
Richard Fitzgerald
a527ffd3c2 Code changes for audio offload support
- Share existing offload output if compatible instead of
  creating a new one. Hardware has limited number of
  offload channels (possible only 1) so we must use as
  few as possible

- Changes to routing handling for offloaded outputs

Change-Id: I11111d8f504828595bd8dbf66444cbd1202e7192
Signed-off-by: Eric Laurent <elaurent@google.com>
2013-07-24 18:39:05 -07:00
Dmitry Shmidt
41d40cfaa6 wifi: Sync with wpa_supplicant commit 1075b29
Change-Id: I502a925054c13f3ceb43445e1c4703427ed4ca7f
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-07-12 10:10:40 -07: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
Dmitry Shmidt
8ab86c7865 wifi: Move common file from wpa_supplicant_lib
Change-Id: I902f864da4317fd637fbc31036133c49a8ae0724
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-06-06 16:51:59 -07:00
Dmitry Shmidt
77cc5e2925 wifi: Add command buffer length parameter to wifi_command()
Change-Id: I832bc51279e0fb7d3002298f87a35b816b666ad5
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-05-30 10:49:15 -07:00
Eric Laurent
5a950c960c audio policy: reuse direct output when possible
Modified getOutput() logic to not systematically
open a new direct output when a profile matches a request.
This causes a problem when transitioning between two
multichannel tracks as the audio HAL will most of the times
only support one direct output stream open at a time.

Instead, reuse an open output if all the parameters match
or force close the output before reopening it.

Also modify releaseOuput():
- close a direct output only if no client is using it anymore
- call closeOutput() instead of removing the output from
the open output list: this factors in code executed when closing an
output stream.

Bug 8388941

Change-Id: Ic3d3beb21063622ddf57a5b932f93d56f2986f54
2013-04-04 14:18:40 -07:00
Eric Laurent
80f5b0400f audio policy: fix music glitch when starting call
When answering a call in silent mode, music playing over A2DP
was not immediately muted by current audio policy manager logic.

The fix consists in muting media strategy on all output streams
immediately when entering in call.

Also add methods to AudioOutputDescriptor to report
recent global, per strategy and per stream activity.

Bug 8315512

Change-Id: I4a90eb05db50e4f22374d02b1e647e8662f6bec6
2013-03-25 16:58:39 -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
Eric Laurent
911408bc76 Merge "audio policy: fix notification start delay" 2012-11-08 09:43:16 -08:00
Eric Laurent
42fa8215a7 audio policy: fix notification start delay
The mechanism delaying notifications in case of
muliple active outputs with long latencies must
take into account recently paused audio tracks.

Bug 7400428.

Change-Id: I4ac9dfac81336e33f475b4f28df82713707d0c46
2012-11-07 13:48:47 -08:00
Irfan Sheriff
745e7fd4e0 Fix stop supplicant api
Bug: 7227463
Change-Id: I4576e223c69dd67bd714fefecf0a1047770362fd
2012-11-06 15:55:30 -08:00
Eric Laurent
0d6490a58b audio policy: tune voice/video chat volumes
Add new volume curves for VOICE_CALL stream type
to improve voice/video chat volume on speakers.

Bug 7346643.

Change-Id: Ib282a97570d2234deec6b58391bdfc45846d9cc0
2012-10-17 10:22:29 -07:00
Jean-Michel Trivi
31363a9cb9 Remote audio submix always has priority for media, only plays media
Don't use force use mechanism for remote audio submix routing.

Prevent streams of strategy sonification to be played over
 remote audio submix (e.g. WFD) and HDMI

Bug 7318180

Change-Id: Ic5c87d3c568873dffea9002cf87ecf42b403cde6
2012-10-11 19:18:40 -07: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
Eric Laurent
738207def5 audio policy: add forced uses for system
The volume and routing policy of AUDIO_STREAM_ENFORCED_AUDIBLE is
now controlled by AudioService by means of new forced use type
AUDIO_POLICY_FORCE_FOR_SYSTEM with config
AUDIO_POLICY_FORCE_SYSTEM_ENFORCED.

Property ro.camera.sound.forced is not used anymore.

Bug 7032634.

Change-Id: I742b0eebbe6b013f61d199846454a06411b52bc8
2012-10-08 15:59:36 -07:00
Jean-Michel Trivi
6d3a115c09 Support audio recording while remote submix is active
When evaluating if an audio record is active, do not count inputs
 opened on "virtual" devices, such as remote submix, as active.

Change-Id: If19c321cf673e3bdf4c3f81e73c163190df7c21e
2012-09-18 12:21:14 -07:00
Eric Laurent
ed8f62d4fa audio: new audio devices enums
Changes for new audio devices enums:
- legacy audio HAL wrapper provides conversion between new and
old device enums. It exposes a rev 2.0 audio device API to the
audio framework and allow legacy implementation to use old device enums.
- AudioPolicyManager: use standard enum value for no device (0).

Change-Id: I855d72291d672cdd8a6641bedb228634a54b7d9d
2012-09-07 10:34:46 -07:00
Jean-Michel Trivi
48387b28c8 Update Audio Policy Manager for remote submix
Define a new forced mode to route media to remote submix.
Update media routing rules according to mode.
Modify device connection management for remote submix.

Note that this CL doesn't implement changes to not prevent audio
 recording when WFD is on, as audio recording is currently limited
 to one input.

Change-Id: I458fe1802705da2d091ff82e536dc3e7f092f291
2012-09-07 09:46:53 -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
Jean-Michel Trivi
00d1d688bd Remove unused member variables in AudioPolicyManagerBase
The fields for the lists of input and output IOProfile are
 not used in the AudioPolicyManagerBase class. Those are
 actually stored inside each HwModule instance.

Change-Id: Iebb9fa5b7599a74013fd785a87de692890a89758
2012-08-20 17:02:39 -07:00
Glenn Kasten
c94dccc97c effect_descriptor_t const correctness
Change-Id: I734155d4cebb22b180f25290332c7c48be1e2b36
2012-07-24 07:51:26 -07:00
Eric Laurent
c952527e6f audio policy: fix HDMI hot plug
When an HDMI sink is connected it is possible that
a direct output is made available for multichannel audio.
In this case, the list of outputs available to reach the HDMI device
after the connection is different from before. checkOutputForStrategy()
must take this into account in order to invalidate tracks so that
they can be re connected to the multi channel output if necessary.

Change-Id: Id0baeb51688eba8017fe96bf92aaac52eb8e0f59
2012-06-21 15:10:31 -07:00
Eric Laurent
3cdfddf1b2 audio policy: improve support for direct outputs
Add the capability to query supported parameters for
direct outputs after a device is connected. This allows
to dynamically update the output profile for devices like
HDMI where the capabilities depend on the connected sink.

Also added very verbose log mode for volume and mute.

Change-Id: I1d4ba8e7dbc3e1af883582857ce93240441e551c
2012-06-04 14:02:07 -07:00
Eric Laurent
1afd84f622 audio policy: allow disabling A2DP for media.
Added FORCE_NO_BT_A2DP forced use to allow applications to
override default policy to use A2DP whenever connected.

Bug 6485897.

Change-Id: I784271c062294fbe1aff7884965075b40c68dc24
2012-05-22 11:31:26 -07:00
Eric Laurent
01e6272f0a 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
2012-05-15 19:26:46 -07:00
Jeff Brown
03f3747b2f Delete unused function.
set_last_user_activity_timeout() is no longer used or useful.
It opens a sysfs node that no longer exists that used to
be published by a daemon that is no longer even compiled
and that is about to be deleted.  It used to be called
by the power manager with a huge value whose purpose was
essentially to disable the timeout feature altogether.

Long live dead code!

Bug: 6435382
Change-Id: If8f97a66f4e963a11e1c6b67ad97b41b2613043e
2012-05-11 17:56:01 -07:00
Eric Laurent
ddfe26905e system and UI sounds volume policy
Added specific volume curves for AUDIO_STREAM_SYSTEM,
AUDIO_STREAM_ENFORCED_AUDIBLE and AUDIO_STREAM_DTMF.
Volume for these streams tracks AUDIO_STREAM_RING on phones
and AUDIO_STREAM_MUSIC on tablets but is contrained in the range
-24dB to -6dB on speaker and -24dB to -12dB on headset.

STRATEGY_ENFORCED_AUDIBLE routing policy is now the same as
STRATEGY_MEDIA in countries where not enforced.

Change-Id: If58d96559bfe2bbff4cd94c631d5933bd940778e
2012-04-26 10:17:13 -07:00
Dima Zavin
739022f26a audio_policy: set some reasonable defaults if audio_policy.conf is not found
Change-Id: I25f7407c34b3032d4e77a27a4ac47b648098d9b0
Signed-off-by: Dima Zavin <dima@android.com>
2012-04-24 12:55:06 -07:00
Dima Zavin
5ec145df77 audio_policy: look for config file in /vendor first
Change-Id: If10308f688437e1682e4104120772cfce16e9d89
Signed-off-by: Dima Zavin <dima@android.com>
2012-04-23 16:51:00 -07:00
Eric Laurent
9029a4fe8a audio policy: volume burst when switching device
The addition of the per device volume feature has introduced
a problem where a volume burst can be heard in the headphones
just after insertion if the speaker volume is much higher than the
headphones volume.

Added a temporary mute of the output when switching device to force
volume ramp to 0 and back up to new volume.

Issue 5984108.

Change-Id: I5c9ffbbcadd12d25c78cc2614d351346b8186c55
2012-04-23 10:25:13 -07:00
Eric Laurent
b2971bf2ae audio policy: add support for deep audio buffers
Added definitions for parsing deep buffer flags in output profiles.

Make sure that sound start is delayed enough to allow
duck/mute effect to apply before starting a notification on an output
with lower latency.

Change-Id: I1578e245da19d1a0f9ec62a2ea6dddaf82ea282b
2012-04-20 13:51:53 -07:00
Eric Laurent
0977cf534f rename audio policy flags
Change-Id: Ic42eba3432671f651c9703a07fe7b429a8ec0dff
2012-04-18 10:42:04 -07:00
Eric Laurent
599a1fc115 audio policy: added rules for USB audio devices
Change-Id: If712b0c7fcf281d66d34614529f3433e56e058fb
2012-04-06 16:28:09 -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
Eric Laurent
5ccdf14a85 audio policy: use configuration file
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
2012-04-03 15:56:30 -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
Mike Lockwood
584c285492 Merge commit '5b71e6f'
Add an implementation of get_next_write_timestamp.

Change-Id: Ie8e19307bafdb057d06bf3c536380c5740f830a6
2012-03-21 17:44:01 -07:00
Mike Lockwood
0b934ade25 Merge commit '617c80a'
Add a bridge implementation of get_master_volume.

Conflicts:
	audio/audio_hw_hal.cpp

Change-Id: Icff9d8dce05d1d811fca815cc39cb38a1df293f9
2012-03-21 17:42:25 -07:00
Eric Laurent
f9a4e2eccf audio policy: use audio_devices_t when appropriate
Change-Id: I0b4e2ff705fce96b40fdda28b1bc4b514438bec6
2012-03-08 13:41:38 -08:00
Eric Laurent
f7db035626 audio policy: spaced comments in header file
Change-Id: Ie72dcb9e33afb217bb7e37081500a7fc53d7a047
2012-03-07 19:19:29 -08:00
Eric Laurent
b4696fc22b audio policy manager: more generic A2DP impl.
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
2012-03-07 17:53:49 -08:00
Todd Poynor
77d789de26 libhardware_legacy: Remove set_screen_state
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>
2012-02-18 00:23:46 -08:00
Irfan Sheriff
02243837e4 Merge "Fixes for concurrency support" 2012-02-14 15:37:17 -08:00
Glenn Kasten
70eb9dec50 Use audio_in_acoustics_t consistently
Change-Id: I9875afdf21937c88a5decc9d94e89fddffc3519e
2012-01-27 13:04:19 -08:00
Irfan Sheriff
096e49c869 Fixes for concurrency support
Change-Id: Ia7251dc86184fff710234c70a8ad54a6b245809a
2012-01-20 15:33:52 -08:00
Glenn Kasten
c97d4bb2bd Merge "Use audio_format_t consistently" 2012-01-20 14:50:30 -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
Glenn Kasten
53e2cfab45 Use audio_format_t consistently
Was int

Change-Id: I8cc1beaa8006fb0a135cf1135955155090c8e87e
2012-01-12 15:01:42 -08:00
Irfan Sheriff
da52930b89 Add support for p2p socket communication
Right now, everything goes over the primary interface socket connection.
Add support for a seperate connection over the p2p interface.

Change-Id: I09118f88cfaa201b2d62d27add410cfd441d4454
2011-12-28 13:16:24 -08:00
Eric Laurent
c16ac09f51 Force camera shutter sound to speaker in Japan.
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
2011-11-01 13:54:26 -07:00
John Grossman
5b71e6fd76 Add an implementation of get_next_write_timestamp.
Add a default implementation of get_next_write_timestamp to the C <--> C++
legacy audio HAL implementation allowing HALs using the legacy C++
AudioStreamOut to overload and implement get_next_write_timestamp.  Default
implementation returns INVALID_OPERATION to indicate that the functionality is
not supported.

Change-Id: I087347649e9ba186a74cb34aaadf989bf90720fe
2011-10-27 17:35:47 -04:00
John Grossman
617c80a82e Add a bridge implementation of get_master_volume.
Add an implementation of the new get_master_volume method to bridge from the new
C only audio HAL to the old C++ legacy audio HAL.

Change-Id: I5c29814623b5141b0c69927ea60be9873c8a5dab
2011-10-27 17:35:43 -04:00
Eric Laurent
e43c5c4ca4 Fix issue 5440852: Youtube volume is too small ...
When no DRC is applied by the platform when playing
over the device speaker, faint audio signals are not boosted and
barely audible until the media volume is raised to about one fourth
of the range.

Compensate this by applying a different volume curve for music stream
when the speaker is selected.

Change-Id: I03f316fb28150eda50b05dfa12310701e2674648
2011-10-18 18:29:26 -07: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
cd057ad277 Issue 5256795: Phone ringtone volume is too low
Modified the volume curve for ringtones and notifications
in audio policy manager. The first volume step now corresponds to
-30dB instead of -50dB thus making ringtone much more
audible for low volume settings.

Also made a generic implementation of volume curves according to
audio policy strategies.

Change-Id: Ieb7916ba2e53c2a10a47efec82814cabed21c48b
2011-09-12 17:01:15 -07:00
Erik Gilling
020418ec64 uevent: add helper to get uevent FD
This allows users of the library to handle thier own poll loop.

Change-Id: Id3fe2be442c0ca29c74253f9f36e9377278780e4
Signed-off-by: Erik Gilling <konkers@android.com>
2011-09-08 16:30:33 -07:00
Irfan Sheriff
67ba2276b9 Add support seperate p2p config file
Also, fixed a bug with config overwrite with ctrl_interface update

Bug: 5002384
Change-Id: I870c12ee58d60f696512c27deb4b9d35b4dc3b2a
2011-08-26 14:39:38 -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
Jean-Michel Trivi
8e925841ab Merge "Fix bug 4319552 Use commonly defined channel mask values" 2011-07-26 09:27:24 -07:00
Jean-Michel Trivi
20324efa14 Fix bug 4319552 Use commonly defined channel mask values
Use channel mask values that match OpenSL ES and other common APIs.

Change-Id: Ie7e62bf8e3565f4e4b1f17b6e525c490989c8d6c
2011-07-25 17:00:17 -07:00
Jean-Michel Trivi
77e130e18c Merge "Fix bug 4211099 channel constants and 7.1 mask" 2011-07-25 16:59:36 -07:00
Jean-Michel Trivi
9b1b6064c1 Fix bug 4211099 channel constants and 7.1 mask
Add definitions for the side and elevated channels.

Correct definition of 7.1 mask which uses
 the side channels rather than the front half-pan channels.

Change-Id: I8b75c6fb380fddc2db09fab53799850218940c93
2011-07-25 15:55:27 -07:00
Dmitry Shmidt
ea8ec41edf Merge "wifi: Add entropy file support" 2011-07-25 14:45:28 -07:00
Dmitry Shmidt
3ab3e66967 wifi: Add entropy file support
Change-Id: Iee92ee9fee15037cffde86b9cd2c9407afb8d2ca
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-07-25 10:48:45 -07:00
Eric Laurent
8581dee749 Merge "Audio effects: support for audio pre processing" 2011-07-20 17:45:18 -07:00
Dmitry Shmidt
29a4d4d74b wifi: Add wifi_change_fw_path()
Change-Id: I1c4afe43457a295c0ffe0a865c6c331109dce614
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-07-19 15:59:13 -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
Eric Laurent
2d97c20601 Audio HAL: added interface for audio preprocessing
Change-Id: I0a84ddbff53f13662873f69d9be4dfa13ebcb8fe
2011-07-11 12:01:13 -07:00
Dmitry Shmidt
4b7ffa08be wifi: Add wifi_get_fw_path() call
Change-Id: Ib9dc8ce84febb2fba045ee527838653d0d1ad11b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-07-01 11:03:43 -07:00
Dima Zavin
d17f66f332 audio: update for audio/audio_policy header names/locations
Change-Id: I7a414a2e173c2bfd72ae70d57b251fa0d4dbdfa0
Signed-off-by: Dima Zavin <dima@android.com>
2011-06-13 18:18:55 -07:00
Dima Zavin
4a0748be28 update for new audio.h header location
Change-Id: Ia0859cc22cfd50a334235aac5b1e8688bc3d52f4
Signed-off-by: Dima Zavin <dima@android.com>
2011-05-11 14:16:14 -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
Eric Laurent
3775706211 Improvement for issue 3489986: BT SCO volume
Add a parameter to applyStreamVolumes() to force stream volume update.

Change-Id: I3cc82e516bb7c76c28c2470b06711c44f4789ce5
2011-03-15 14:33:07 -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
793dd9f2be am 01056fcf: am 36291a74: Fix issue 3371080.
* commit '01056fcfbbbb577f7d70324a4d6a3a211a519951':
  Fix issue 3371080.
2011-02-03 17:18:49 -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
Jean-Michel Trivi
f2faac71fd Bug 3376700 Update APM header for volume initialization and computation
Change-Id: I7cb31c9ecd3c347bfa72cad5a331500a20fdcfbe
2011-01-25 09:35:39 -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
f9e188482f am 3cb64cb8: am 2f2db765: Fix issue 3142808.
* commit '3cb64cb8bbda335affcb3c71fce3c4f908a97111':
  Fix issue 3142808.
2010-12-01 12:15:23 -08:00
Jean-Michel Trivi
3e480fa067 Support new audio mode for audio communication other than telephony.
Change-Id: I965cbeee67f72e31240e3e8cd2630bf22a03b9ea
2010-11-15 16:45:36 -08:00
Dianne Hackborn
7314fe03b6 Add an API to find out whether there is a vibrator.
Change-Id: Ic0d967bc72c542fc6a97331c9197114f3f571c08
2010-11-04 12:05:45 -07:00
Eric Laurent
2f2db76522 Fix issue 3142808.
There is a bug in the way audio policy manager handles A2DP interface suspend/restore
when SCO is used. This bug is not new but has been triggered by a change in the timing
of the events received by audio policy manager when a call is setup and torn down
introduced by commit 164a8f86c7e48992691368c4895709c3bdb835a4.

The fix consists in grouping the control of A2DP suspended state in a single function
that is called systematically when conditions affecting this state are changed:
- call state change
- device connection/disconnection
- change in forced usage.

Change-Id: Ib76a999513b5afbfd59ba945f8650d2a48d6f480
2010-11-02 18:18:13 -07:00
Erik Gilling
1cb1728b18 add native uevent handling
Change-Id: I2315f5638668ab802a4b3c723afd97b7edf0c695
2010-10-20 16:07:57 -07:00
Eric Laurent
7a25fd7138 am bab20b67: am d6e68c3a: Fix issue 2952766.
Merge commit 'bab20b6759d9f0445e4ff5f27f0a3666f0efafa5'

* commit 'bab20b6759d9f0445e4ff5f27f0a3666f0efafa5':
  Fix issue 2952766.
2010-08-30 15:07:42 -07:00
Eric Laurent
d6e68c3ae5 Fix issue 2952766.
The fix for issue 2952766 showed some unused code in
AudioPolicyManagerBase::checkOutputForStrategy(): since commit
eb8f850d0b7e53956e917fd9645f808c1a09bc88: there is no need
to update the hardware output device as it will be updated when the
new tracks are created by audioflinger.

Change-Id: I2f46fab58a5db3b4cd03fdaeebd7d6603c8dbbdd
2010-08-27 17:16:29 -07:00
Irfan Sheriff
2bb990bfd2 Add is_wifi_driver_loaded
Change-Id: I73600a11891b1380d8bc1bfbc24494410a989fcb
2010-07-27 12:17:08 -07:00
Eric Laurent
3be78bce2b resolved conflicts for merge of 930fe98b to master
Change-Id: Ib6ab3b02aede7e07b71e19b16d305919be849bdd
2010-07-20 12:23:58 -07: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
564c303237 Fix issue 2641884: Bluetooth volume is dependent on in call volume.
The problem is that the code in AudioPolicyManagerBase::checkAndSetVolume() that forces
voice volume to max when setting bluetooth SCO volume is not called if the bluetooth stream
volume did not actually change. So even if we re apply volumes when switching to bluetooth
device, the voice volume is not changed in audio HAL and remains what it was when routed to earpiece.
What makes things worse on Passion is that stream volumes are limited when connected to bluetooth
and their actual value does not change as soon as they exceed the limit threshold.

Change-Id: Ic6c54b4a7fd54983f445de9a9b5cd2ea0025155c
2010-05-25 09:30:03 -07:00
Mike Lockwood
df61573ba8 Remove obsolete GPS support.
We now use the libhardware HAL interface instead.

Change-Id: I0e52ff1da13109b509f166a6437d0a24cdd389b3
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-04-05 15:25:49 -04:00
Eric Laurent
68f279fa86 Fix issue 2416481: Support Voice Dialer over BT SCO.
Make the choice of opening a direct output stream platform specific.

Change-Id: I63e5464a18aaa3600e9fed6cec0518ff1fad4dbd
2010-03-15 18:36:58 -07:00
Mike Lockwood
4ac28c4482 Fix sim build by including <stdlib.h>
Change-Id: I4df46fff44846b770a00d5f055ec483e9caf2516
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-08 10:56:52 -05:00
Fred Fettinger
7d675d8ea8 libhardware_legacy: add gps debug extension
The gps debug extension provides a single function that allows the native
gps implementation to include an arbitrary string in bugreports.

Change-Id: I1bd8e403e421847784804c47d83e3600340b3fea
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-03-07 09:30:00 -05:00
Eric Laurent
4eeca24727 Issue 2071329: audio track is shorter than video track for video capture on sholes
Add API to retrieve number of frames dropped by audio input kernel driver.

Submitted on behalf of Masaki Sato <masaki.sato@motorola.com>
2010-02-26 03:04:31 -08:00
Eric Laurent
1953686263 Fix issue 2305382: Pick up original call makes a noisy beep when wired headset connected.
The noise is the residual ring tone that is still playing while the call is answered and the
audio route changed to headset or earpiece.

The fix consists in muting the ringing tone when changing mode from ringtone to in call
and delaying the route change until the audio buffers are emptied.
2010-02-23 10:56:00 -08:00
Eric Laurent
e6c221466f Fix issue 2440226: Car dock volume synchronization.
Make computeVolume() method virtual so that its implementation can be platform specific.
2010-02-16 06:06:46 -08:00
San Mehat
f29ed1a8e3 libhardware_legacy: Refactor C++ bindings for new API
Signed-off-by: San Mehat <san@google.com>
2010-01-29 06:14:10 -08:00
Eric Laurent
392290d659 Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync
Added getRenderPosition() API to AudioHardwareInterface to retreive number of audio frames
    written by DSP to DAC.
2010-01-26 10:36:42 -08:00
San Mehat
d0a89fa6e1 libhardware_legacy: Add support for renaming secure containers
Signed-off-by: San Mehat <san@google.com>
2010-01-23 08:13:08 -08:00
Eric Laurent
f1eb9491a1 Merge "Create base class for audio policy manager." 2010-01-20 10:03:45 -08:00
San Mehat
91a6335923 libhardware_legacy: Add new unmount asec api call
Signed-off-by: San Mehat <san@google.com>
2010-01-18 06:24:01 -08:00
San Mehat
ac41dfc975 libhardware_legacy: Rename MountService method names
Signed-off-by: San Mehat <san@google.com>
2010-01-15 10:04:04 -08:00
Eric Laurent
de55cfb02d Create base class for audio policy manager.
First implementations of audio policy manager in Eclair branch have shown that most code is common to all platforms.
Creating AudioPolicyManagerBase base class will improve code maintainability and readability.
2010-01-13 09:29:49 -08:00
San Mehat
b811469fcd libhardware_legacy: asec: Rename 'Cache' -> 'Container'
Signed-off-by: San Mehat <san@google.com>
2010-01-11 10:16:07 -08:00
San Mehat
073396d20c Legacy MountService: Update binder interface to match MountService
Signed-off-by: San Mehat <san@google.com>
2010-01-09 10:08:50 -08:00
San Mehat
4a57c55ce8 legacy: Add asec binder transaction support to c++ wrappers
Signed-off-by: San Mehat <san@google.com>
2010-01-06 14:51:15 -08:00
Mike Lockwood
deb1c961a5 Remove obsolete flashlight support.
Change-Id: I7d366449301ee685bb3202c738ade06c3102229e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-11-25 12:55:44 -05: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
Android (Google) Code Review
c92ce88194 Merge change 21760 into eclair
* changes:
  gps: Network initiated SUPL
2009-08-27 14:00:45 -07:00
Danke Xie
03c1e50430 gps: Network initiated SUPL
Initial contribution from Qualcomm.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-27 12:24:54 -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
Mike Lockwood
a938a932ec gps: Add callback for reporting NMEA data.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-06 14:47:02 -04:00
Eric Laurent
dbfad0ce83 Fix issue 1795088 Improve audio routing code
Initial commit for review.
2009-07-17 12:18:40 -07:00
Marco Nelissen
5ba0002d70 am df37ea7b: Add virtual destructor.
Merge commit 'df37ea7b73f8ede7955067d5f7fcac4b9e66b79c'

* commit 'df37ea7b73f8ede7955067d5f7fcac4b9e66b79c':
  Add virtual destructor.
2009-07-07 12:13:57 -07:00
Marco Nelissen
df37ea7b73 Add virtual destructor. 2009-07-07 11:06:20 -07:00
Mike Lockwood
f74ed3d08d am 205021cd: gps: Set SUPL server via hostname rather than IP address.
Merge commit '205021cd79eb84b4931ed79fd6d995aa8ca8c29e'

* commit '205021cd79eb84b4931ed79fd6d995aa8ca8c29e':
  gps: Set SUPL server via hostname rather than IP address.
2009-06-19 12:12:03 -07:00
Mike Lockwood
205021cd79 gps: Set SUPL server via hostname rather than IP address.
The GPS engine needs the hostname for the secure SUPL case
and deferring the DNS lookup to the HAL might be helpful in the future
if the SUPL server is on a carrier's private network.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-06-19 14:57:20 -04:00
Mike Lockwood
192dee795e am 4403519a: gps: Add hooks for GPS location injection.
Merge commit '4403519ac60f99bf0100a7d6eed79b09bd9e5be7'

* commit '4403519ac60f99bf0100a7d6eed79b09bd9e5be7':
  gps: Add hooks for GPS location injection.
2009-06-11 11:41:27 -07:00
Mike Lockwood
4403519ac6 gps: Add hooks for GPS location injection.
This will allow injecting cell ID location to the GPS
(not implemented yet).
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-06-11 12:44:52 -04:00
Android (Google) Code Review
07f6ea1942 Merge changes 2103,2104
* changes:
  move libbinder's header files under includes/binder
  add libbinder to makefile
2009-05-20 13:04:58 -07:00
Mathias Agopian
c1c3eee4a1 move libbinder's header files under includes/binder 2009-05-20 13:03:58 -07:00
Dave Sparks
19f53f8083 Remove deprecated version of openInputStream.
Continuation of bug 1846343
2009-05-19 18:36:08 -07:00
Dave Sparks
c61651ca12 Add input source parameter to openInputStream factory function.
This change lays the foundation for recording from different sources.
A series of changes will follow that implement the factory function
for the various hardware configurations. Finally, the deprecated
function will be removed.
Bug 1846343
2009-05-19 13:51:40 -07:00
Mike Lockwood
049ae36fcb GPS: Generalize SUPL support to include AGPS for CDMA
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-05-11 09:47:59 -04:00
Mike Lockwood
1ea5429e78 gps: Add support for bringing up a GSM data connection on demand for SUPL.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-14 16:21:50 -04:00
The Android Open Source Project
e18b7b21c2 auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:47 -07:00
The Android Open Source Project
cc490161f6 auto import from //depot/cupcake/@135843 2009-03-03 19:32:14 -08:00
The Android Open Source Project
3bbe5328cd auto import from //depot/cupcake/@135843 2009-03-03 18:28:48 -08:00
The Android Open Source Project
652994d394 auto import from //branches/cupcake/...@132276 2009-02-19 10:57:35 -08:00
The Android Open Source Project
6e5ad3c6e8 auto import from //branches/cupcake/...@130745 2009-02-10 15:44:04 -08:00
The Android Open Source Project
5ce01674d4 auto import from //branches/cupcake/...@126645 2009-01-15 16:12:14 -08:00