Android framework should provide a buffer to the wifihal which needs
to be filled with scan_result. This commit will ensure that would
happen by passing a fixed max buffer size as part of each
wifi_cached_scan_results.
Change-Id: I005dd39f26be62694c46369e16d5f7f89f64021d
This change introduces wifi_set_passpoint_list and wifi_reset_passpoint_list
which implement the functionality of offloading passpoint match to
the chipset firmware.
Change-Id: I8a3730d4e23891b1dce47b8cf877e9b3c04ac279
1) add the request_id in wifi_get_logger_supported_feature_set
2) Change the wifi_get_firmware_memory_dump API
1) Normally the size of firmware dump is 700KB.
Thus, Driver cannot send the data in one time because of limitation of skb length.
In order to send such big data from kernel Driver,
we need to send data using event continuously until we send the memory dump completely.
In the event handler of hal, it will allocate the
big buffer to store the data.
Once event handler copy the data completely, event handler
will call the function callback(on_firmware_memory_dump).
So, upper layer has to free the buffer after handling the buffer.
Change-Id: If80b03ec8bd9349d952743e17a001c04096aac95
Signed-off-by: eccopark@broadcom.com <eccopark@broadcom.com>
1) define entry type for parsing the data easily.
2) the payload will be attached at end of the wifi_ring_buffer_entry
3) added the feature set
4) remove duplicate wifi_get_ring_data
5) add request_id in wifi_start_logging
6) change the pointer of buffer to double pointer of buffer
in wifi_get_ring_buffers_status and wifi_get_firmware_memory_dump
wifi_get_firmware_version and wifi_get_driver_version
to indicate the buffer supplied by Application layer
Change-Id: I5dc2811155e7efa058a0c3414036461de3e45d98
Signed-off-by: eccopark@broadcom.com <eccopark@broadcom.com>
Mainstream wpa_supplicant now has common driver_nl80211.h
Change-Id: I6d886daf39110969b2442c3943806364e63a5d04
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Added single shot scan, and maxScansToCache. Also fixed getScanResults()
to report scan results to listeners.
Bug: 18087596
Bug: 17694040
Bug: 18059273
Change-Id: Id623ab9ee2ab89c86a35082279331fa609016347
Mainstream wpa_supplicant now has common driver_nl80211.h
Change-Id: I6d886daf39110969b2442c3943806364e63a5d04
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
When the wifi_hal.h is included as part of the c source
code files some of the functions are not exported. The
const variable as an index to an array is causing compiler
error. The changes are to address these issues.
Change-Id: Ia2dbd7a87315cee8d0246a8ac6539c9b4b22ffd4
Added single shot scan, and maxScansToCache. Also fixed getScanResults()
to report scan results to listeners.
Bug: 18087596
Bug: 17694040
Bug: 18059273
Change-Id: I8a6da5426561e22e72d1e99c5537205b893077dd
New stream types have been added, so make sure that
legacy implementation uses legacy stream definitions
Bug: 18067208
Change-Id: I8042ebe9ac3e7eda380b8c91650f2ac16b44bc34
* commit '69f48b86d78ac8968ccafc6287eed3079f1cb56e':
[AU]Buganizer ID: 17182487, sprout audio HAL should mute all audio output with property ro.audio.silent set to true
Added a new macro in feature set to indicate wifihal support for
link layer stats collection.
Bug: 17359758
Change-Id: I3f8ecce67430bd8270fb157a4e6cd246503a3d9f
Fixes a race condition whereby two requests attempt to change the audio stream
(and interrupt each other). For example, a user space app makes a call through
the audio API and before completion, a kernel function such as jack removal is
detected and is serviced. In this case, you have a nullified audio route that
needs to be re-routed.
In order to know a routing update is needed, a boolean member mForceRouting
has been introduced to enforce routing for the next attempt to set audio output
with a non-null device.
Change-Id: Ia0aa2f27fe63c39f0980dec2e1e79dbc26b81e56
Author: Vincent Becker <vincentx.becker@intel.com>
Signed-off-by: Vincent Becker <vincentx.becker@intel.com>
Signed-off-by: Zhi Jin <zhi.jin@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Robert Beatty <robert.m.beatty@intel.com>
Main changes are -
1. max_bssid_history_entries in wifi_gscan_capabilities
2. A new callback to report extra status of scan
3. Channel hint for hotlist APs
4. More details on significant change event
Change-Id: I665cb28df99cf152e6b95c8050ea246c5fce81e9
Some types are defined in link_layer_stats.h as well as rtt.h; this
change removes duplicate definitions
Change-Id: If1e16b7868c7ad7f9b5ca4d020d26df4c17daf0a
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
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>
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
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
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
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
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
Extend minimun duration of offloaded audio content
to 1 minute to avoid offloading short clips like
TTS generated files.
Bug: 8174034.
Change-Id: Ied21557c300af4b27d99388e069576e36804087f
This helps to preapre for future updates from external sources.
Bug: 9298955
Change-Id: I4c63ad5fc1ea3564aab38cfce955de19bad75c0c
(cherry picked from commit 759cc323cb586192d591a815b0fb9d839536fcd6)
- 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>
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>
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
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
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
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
Add new volume curves for VOICE_CALL stream type
to improve voice/video chat volume on speakers.
Bug 7346643.
Change-Id: Ib282a97570d2234deec6b58391bdfc45846d9cc0
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
Add support for querying whether there is currently a recording
underway from the specified audio source.
Bug 7314859
Change-Id: I8894845b176241134870af5df2bebc5ef27e4de4
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
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
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
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
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
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
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
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
Added FORCE_NO_BT_A2DP forced use to allow applications to
override default policy to use A2DP whenever connected.
Bug 6485897.
Change-Id: I784271c062294fbe1aff7884965075b40c68dc24
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
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
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
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
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
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
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>
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
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
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
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
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
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
This allows users of the library to handle thier own poll loop.
Change-Id: Id3fe2be442c0ca29c74253f9f36e9377278780e4
Signed-off-by: Erik Gilling <konkers@android.com>
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
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
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>
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
Added an initCheck() method to AudioPolicyInterface to verify
successful initialization of AudioPolicyManager.
Change-Id: I4c892282dbeb3246ee6c006bd206a3e723bcb71f
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
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
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
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
We now use the libhardware HAL interface instead.
Change-Id: I0e52ff1da13109b509f166a6437d0a24cdd389b3
Signed-off-by: Mike Lockwood <lockwood@android.com>
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>
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.
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.
Merge commit '205021cd79eb84b4931ed79fd6d995aa8ca8c29e'
* commit '205021cd79eb84b4931ed79fd6d995aa8ca8c29e':
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>