| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added AudioRecord constructor with audio attributes.
Replaced AudioPolicymanager::getInput() by getInputForAttr().
No new functionality for now.
Also:
- Fixed warnings in AudioPolicyManager
- Allocate audio session ID before calling getOutputForAttr() in
AudioTrack.
Bug: 16006090.
Change-Id: I15df21e4411db688e3096dd801cf579d76d81711
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a digital output (HDMI or S/PDIF) is configured with
a non linear PCM audio format it is likely that the audio HAL
or HW will not be able to mix other sounds with the main
media stream being played.
In this case, do not condider HDMI or S/PDIF as a valid route for
accessibilty strategy so that accessibility prompts are always audible.
Bug: 18067208.
Change-Id: If20603a1dc1dc470f206f841308bed2b87daf21c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update getOutputForAttr() prototype and group all logic
dealing with audio attributes to stream type conversion in
audio policy manager.
getOutputForAttr():
- specifies the audio session (for future use)
- returns a status code
- receives either stream type (for legacy) or audio attributes
- returns an updated streamtype
Remove logic dealing with legacy stream types to attributes conversion
from AudioTrack.
Use correct type for audio sessions in other APIs (startOutput() ...).
releaseOutput() specifies the audio session (for future use).
Bug: 18067208.
Change-Id: I1bfbe9626c04c7955d77f8a70aecfad2cb204817
|
|
|
|
| |
Change-Id: Iab6b65327ae1adbf0b3a6da5a23b8107468f533e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added new routing strategies and stream type for internal use
by audio policy manager and audio flinger:
- One for accessibility to allow different routing than media
- One for re-routing (remote submix) in preparation of dynamic
policies
- Added stream type for "internal" audio flinger tracks used
for audio patches and duplication.
Bug: 18067208.
Change-Id: I88f884b552e51e4a49c29125e5a1204cf58ff434
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not hold gLockAPS when calling
AudioPolicyService::registerClient() in get_audio_policy_service().
registerClient() will need to acquire the AudioPolicyService mutex and
if at the same time a method called from AudioPolicyService
(with mutex held) calls back into AudioSystem and get_audio_policy_service()
a cross deadlock occurs.
Same preventive fix for get_audio_flinger().
Use a separate mutex for notification client list in AudioPolicyService.
This prevents deadlocking if registerClient() is called as a consequence of
AudioFlinger calling back into AudioPolicyManager while executing a method
with AudioPolicyService locked
Bug: 18403952.
Bug: 18450065.
Change-Id: Ia832e41aede8bc6c843fc615508fbdd74e0863b5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow A2DP sink selection even if A2DP is suspended.
It is not because use of A2DP is temporarily disabled by SCO
selection that the policy rule routing a given use case
to A2DP should be altered. The source will be routed to A2DP
but it will remain silent until suspend condition is cleared
which is the purpose of suspend mode.
Also make sure that accessibility prompts are audible while in call
by forcing stream type to STREAM_VOICE_CALL.
Fix inconsistent logic between AudioTrack::setStreamTypeFromAttributes()
and AudioPolicyManager::getStrategyForAttr()
Bug: 18095151.
Change-Id: I1c75dd8288ed3dd494eb942060eac9c9660dca50
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- When an input device is disconnected, checkInputsForDevice clears
dynamic fields of input profiles that are supporting the disconnected
device. AUDIO_DEVICE_BIT_IN mask is missing while comparing with the
supported input devices of a profile which is resulting in clearing
wrong fields
- Fix is to include AUDIO_DEVICE_BIT_IN in this comparison
- also fix two other places where comparison with input device was not
masked with AUDIO_DEVICE_BIT_IN.
Bug: 18367045
Change-Id: Icc94b8353bc49567d8a6d6a75293c3b0dd42d83c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for routing audio stream to the speaker when audio
attributes carry the FLAG_BEACON value:
- associate streams with FLAG_BEACON to the up-to-now unused
STREAM_TTS ("Transmitted Through Speaker").
The remapping happens in AudioTrack.
- AudioPolicyManager: define new strategy for handling the Beacon
behavior, that only goes to speaker. Define new volume curves
for STREAM_TTS that are not silence only for the speaker device
category. Keep ref count of other streams and never play Beacon
streams when anything else is playing: either don't start playback
if something else is playing, or unmute STREAM_TTS when it's
allowed to play and mute when it's done.
- Take into account muting latency when starting an output.
Bug 15415971
Change-Id: I26539c7ec1a486accd85bbeb1623e9c7d3a1192f
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix return types in early returns added by
commit dea1541f in AudioPolicy binder call methods.
Also fix former similar mistakes found nearby.
Bug: 18001784.
Bug: 18002005.
Change-Id: I088c6029ca04e2c2c2f78e560c9cb6b9576dd88f
|
|\
| |
| |
| | |
lmp-mr1-dev
|
| |
| |
| |
| |
| |
| | |
Bug: 18001784.
Bug: 18002005.
Change-Id: I8efa674dceff5a6e10251b1c7a55e9bb2d532395
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Usage of remote submix device for audio rerouting (e.g. wifi display)
didn't mandate the use of addresses. Use "0" as the default address
when none is specificed.
In logs, only use hex format for audio devices
Bug 16009464
Change-Id: Ibfb1ce6881eba8b7e34420293b8a7077a6e659e6
|
|/
|
|
|
|
|
|
| |
Make sure that a valid audio patch is created again on an output stream
following the disconneciton and reconnection of the same output device.
Bug: 18144611.
Change-Id: I72387ad8e93f8fb2571da2a6c58a6e167ac7fc4d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Whem multiple devices are selected by a strategy,
apply volume to all these devices when one of them is changed by
setStreamVolumeIndex() API.
Also only consider devices supported by current output profile
in checkDeviceMuteStrategies() to avoid muting a stream because of
devices connected to another output stream.
Bug: 17507571.
Change-Id: I83ef9fb7f294214d30f7f890db44c64ece3be387
|
|\
| |
| |
| |
| | |
* commit '7de5ac1f067ec61f7ea424d5534cfd40987b11fa':
audio policy: fix effect handle leak
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fix ref counting error in AudioPolicyEffect::addInputEffects()
and addOutputSessionEffects()
Bug: 17675112.
Change-Id: I5267d1024a585919f66ead83662e57b78ba53540
|
|\ \
| |/
| |
| |
| | |
* commit 'a2d4a6dac432f0c4f543d79b9a63c55ae91f81d6':
audio policy: Fix for voice call audio loss
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Audio Policy service filters out one of the create patch
commands when it finds two pending commands with the same
patch handles. Due to this routing command is not received
to audio HAL and the voice call set up fails.
Fix this by filtering create patch commands only when
they are issued on the same output.
authored-by: Karthik Reddy Katta <a_katta@codeaurora.org>
Bug: 17787282
Change-Id: If36f0ab71e9b72d6a8eb61d31f762bc5e1683b89
|
| |
| |
| |
| |
| |
| |
| |
| | |
Review: https://partner-android-review.git.corp.google.com/#/c/184276
Signed-off-by: Carson Liao <carson.liao@mediatek.com>
Change-Id: I0847c8a6e6d054a9258b52402c914105d902c573
|
|\ \
| |/
| |
| |
| |
| |
| | |
ro.audio.media_deep_buffer"" into lmp-dev
* commit '9286354c0a864ce2348cc7dfc6ca81e84a15f8e2':
Revert "audio policy: add support for ro.audio.media_deep_buffer"
|
| |
| |
| |
| |
| |
| | |
This reverts commit 95511add8ad4d440c67272503559f5042c4e6f1f.
Change-Id: I76a8b86790b06b08d8ca0f8d374e585f964ffba8
|
|\ \
| |/
| |
| |
| |
| |
| | |
ro.audio.media_deep_buffer" into lmp-dev
* commit 'ffd5cdbd3e3faa203539e26adc755f860c8cac80':
audio policy: add support for ro.audio.media_deep_buffer
|
| |
| |
| |
| |
| | |
Bug: 17931716.
Change-Id: Ife170f20f5d02b71059fbd384bd29759fafee826
|
|\ \
| |/
| |
| |
| | |
* commit 'f5ada6edcc83bb1b313abcd4c4fbdc4f7724f04d':
audio policy: move intializations to onFirstRef()
|
| |
| |
| |
| |
| |
| | |
Bug: 17896324.
Change-Id: I3bb74f5397142ac354bd815eb362e5ddacdcb463
|
|\ \
| |/
| |
| |
| |
| |
| | |
into lmp-dev
* commit '07811789ebf31f5317403356f624d04282e666aa':
audio policy: fix build with USE_LEGACY_AUDIO_POLICY
|
| |
| |
| |
| |
| | |
Bug: 17894512.
Change-Id: I6431c0b03ba02cf561413c34848a334caa0261fa
|
|\ \
| |/
| |
| |
| |
| |
| | |
into lmp-dev
* commit '5bee844fd8c2f6d9fa78ed5e063a8e3df9f2f7b6':
audio policy: fix lockup during mediaserver restart
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When pre or post processing effects are applied by audio policy service
automatically there is a potential lockup if the first call into
AudioPolicyService is made while creating one of those effects.
This is because effects are created with AudioPolicyService mutex held and
effect creation calls into methods (e.g registerClient()) which also acquire
the mutex.
The fix consists in adding a new mutex to AudioPolicyEffects class and not
hold the AudioPolicyService mutex when calling methods in of class.
Bug: 17830596.
Change-Id: Ie61c3671d3147f46e99ba208f39c1a3bf180779f
|
| |
| |
| |
| |
| |
| |
| |
| | |
Review: https://partner-android-review.git.corp.google.com/#/c/183780
Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>
Change-Id: I415d0b494b9bfadf783280aeea6ad46e0a242cfb
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| | |
Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>
Review: https://partner-android-review.git.corp.google.com/#/c/182522
Change-Id: Ida2dfedc6eaa3204354cdc182e0ee13a35472661
|
|/
|
|
|
|
|
|
|
|
|
| |
commit b732cf5a broke the selection mechanism for the
HW A/V sync direct output.
Add a rule to only select a mixed output for basic PCM
stereo content when a direct output is not explicitly requested.
Bug: 17702382.
Change-Id: I1387690ace77cd4d6a8faf0b525c3d1008fba3f1
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
modify getOutputForDevice() to skip direct output selection
if the request can obviously be attached to a mixed output
This prevents from selecting a direct output profile that
can manage stereo PCM format if a mixer output is available
to reach the same device.
Bug: 17628413.
Change-Id: I02e9a0b02c9ae5f44ff5768ac4ed02ce84d521c5
|
|/
|
|
|
|
|
|
|
| |
Make sure that accessibility prompts are heard when
a ringtone is active by forcing stream type
to AUDIO_STREAM_RING when phone state is AUDIO_MODE_RINGTONE.
Bug: 17558149.
Change-Id: Ia3bead8052fca5cbf282c267f7b9b06014fef628
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Audio input profiles can indicate flag AUDIO_INPUT_FLAG_HW_HOTWORD
meaning they allow capture from the same source as HW hotword
detection.
When a client requests capture with this flag, the policy will
try to find an input profile matching this request first and
fallback to a regular input if not found.
Bug: 17575019.
Change-Id: Ia463211597d7fa363527d776389f2257f0ced9a2
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consider all supported devices in an io profile and
not only the first one when looking for a match with attached
devices.
Failing to do so would cause the device validation to fail
if supported devices are not declared in a specific order
in the io profile descriptor in audio_policy.conf
Bug: 17532764.
Change-Id: Id27c9192e21de7f075076e17eb8c48e7e42847f6
|
|
|
|
|
|
|
|
|
| |
ENFORCED_AUDIBLE should only be highest priority if system tones
are being forced. Otherwise it should behave like SONIFICATION.
Bug: 17474485.
Change-Id: Ia651779870d51100cc3179c96fa09694bc691ba7
|
|
|
|
|
| |
Bug: 17488759.
Change-Id: I9dd2c3ca7f83de4b3573f4fb0e9934e1bc37c3bc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On particularly loud devices, unexpected audio bursts can be harmful.
For longer audio events, the conventional mitigation strategy is to
somehow soft-start (ramp) the loudspeaker volume, but this strategy
can severely impact the audibility of short audio events.
Use of the "safe" speaker path hints to AudioHAL to immediately output
at best allowable level for transient audio events.
SPEAKER_SAFE is aliased to SPEAKER for purposes of volume control.
Bug: 17319721
Change-Id: I75187c23f3d1f18e9f638c5d14e7b0bf805a67bc
|
|
|
|
|
|
|
|
|
| |
Make sure that all outputs considered by selectOutput()
when called from AudioPolicyManager::getOutputForDevice()
support the requested audio format.
Bug: 17340382.
Change-Id: I76520ce60e9a8fe4d2d23125d6143bb016522754
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not select maximum sampling rate and channel count
when opening a direct output for the first time
to make sure that the combination of sampling rate
and channel count is supported by the connected sink.
Bug: 17047809.
Change-Id: I077a3c1436158378f2762343469ceb39fab9775e
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
HDMI-CEC system audio mode removes speaker from output
list. It also has multiple outputs by connected outputs.
However, getDeviceForVolume() doesn't cover multiple
output with no speaker or bluetooth case.
This change picks one of system audio outputs in order.
Bug: 17400026
Change-Id: I102fd0052c9c4c9543f9e8f3b16ec6815d7485d8
|
|/
|
|
|
|
|
|
|
|
| |
As for set parameters commands, create or release audio patch commands
modifying the same patch handle should be filtered by the audio policy service
command thread so that an immediate command is not overridden by
a pending delayed command.
Bug: 17379728.
Change-Id: I6aa4652b4bfec59eebd3c3cb7d1d9ac1bc1d6e49
|
|\ |
|