| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Make sure that when a new audio device is connected,
and a specific profile for this device is listed in
audio_policy.conf, this particular profile is used instead
of a default generic profile.
Bug: 19188567.
Change-Id: I5f576fcd697adc041b2cfbd2bac7a51bcc2143b9
|
|
|
|
|
|
|
|
|
|
|
| |
Fix initilization of default gain configuration for
audio devices loaded from audio_policy.conf.
Initialization cannot be done in constructor as the possible
gain configurations are not loaded yet.
Bug: 19120566.
Change-Id: I78f057ecfa1a121365ac3d8f317912a6f1647627
|
|
|
|
|
|
|
|
|
|
| |
Bug: 18847131
Review: https://partner-android-review.git.corp.google.com/#/c/193318
Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>
Change-Id: I79703ba4ceb67ca3b95fbc71444dd3b116ba4131
|
|
|
|
|
|
|
|
|
|
|
| |
- change output close logic to find the device from IOProfile rather than
AudioPatch as AudioPatch handle can be cleared before disconnect.
- Otherwise, remote submix can be stuck as output is never closed and does not
work any more as subsequent open fails as output is already taken.
bug: 18733215
Change-Id: Iddb481c91e81070e6be18996a4c8837dabd7ebdb
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Define input types covering the different usecases for audio
recording, and check the corresponding permissions when
starting to record.
Move the permission check from audio flinger to audio policy,
as only the policy has the information to determine which
permission to enforce.
Fix missing permission when an application records audio
and the audio is injected by an external policy.
Bug 18736417
Change-Id: If7ec040502242c990ac8ea464db484339bdce573
|
|/
|
|
|
|
|
|
|
| |
https://partner-android-review.git.corp.google.com/#/c/188454/
Bug: 18727227
Change-Id: I74856ede5999cfc8a6932a99855d468cccd6f51c
Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit 275e8e9de introduced a regression for platforms
overriding AudioPolicyManager::getDeviceForInputSource() method.
Fixed by defining specific non virtual methods when overiding would
break remote submix implementation.
Bug: 18736417.
Change-Id: Id4d0a6c48da987e6fb24422f2d61c7ab0fbfc921
|
|
|
|
|
|
|
|
|
|
|
| |
Completed support for dynamic sources:
- remote submix input device is dynamically connected/disconnected
when corresponding AudioTrack starts/stops.
Also do not create a duplicated output for mixes used by dynamic policies.
Bug: 16006090.
Change-Id: Ib5b5a2159fcac9d9f410a5a2f1c64d7ebad79f72
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the screen mirroring case, the notification manager queries
the policy to see if media "is playing remotely": if yes, it
will not request audio focus before playing a notification.
This is the correct behavior for screen mirroring, but doesn't
work when audio is rerouted to an external policy.
This change consists in not reporting "remote" activity when
playing to a mix of an external policy by looking at the address
of the output on which playback is active for the given stream
type.
Bug 16009464
Change-Id: Iebbf5a8c738ab36c1cf2055e921c0a3472503125
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for custom mixes in AudioPolicyManager.
Two methods are added to register or unregister a list of custom mixes
with their attributes and format.
getOutputForAttr() and getInputForAttr() first look for a match in
registered mixes before defaulting to normal output/input selection
Remote submix device connection disconnection now takes address into
account to identify the correspnoding custom mix.
Bug: 16009464.
Change-Id: I3f1c2a485a0fb71b1f984ed0adc9b68aa971e408
|
|
|
|
|
|
|
|
|
| |
unexpectedly
https://partner-android-review.git.corp.google.com/#/c/187894/
Change-Id: I3f9175bbc302e382155e568e66b88400ec05ffa5
Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
| |
Signed-off-by: Hochi Huang <hochi.huang@mediatek.com>
Review: https://partner-android-review.git.corp.google.com/#/c/182522
Change-Id: Ida2dfedc6eaa3204354cdc182e0ee13a35472661
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Make sure that all outputs considered by selectOutput()
when called from AudioPolicyManager::getOutputForDevice()
support the requested audio format.
Bug: 17340382.
Change-Id: I76520ce60e9a8fe4d2d23125d6143bb016522754
|
|\
| |
| |
| | |
lmp-dev
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure that an audio patch having an output as source or input as sink
is removed when this input or output is closed.
Bug: 17303725.
Change-Id: I234d54a25ce0b579eeeafdcfda3a0594f048768c
|
|/
|
|
|
|
|
|
| |
Turns out having an sp<> point at the containing object doesn't really
work so well.
Bug: 17210991
Change-Id: I4bcb0c38adffc574d661f0772583357868f6c5b4
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 10549017.
Change-Id: I896c8e16c8cf7490bab75295903620a76236f571
|
|/
|
|
|
|
|
|
|
| |
When opening an output, import the profile capabilities associated
with the device into the AudioPort.
Bug 10549017
Change-Id: If102f5623457542d2c1407ada303c71e43d19a08
|
|
|
|
|
|
|
|
|
| |
Add possibility to use sink and source devices not on
the primary HW module for voice calls (e.g. USB headsets).
Bug: 15520724.
Change-Id: Ib27db4ba759b6d91ea1104dc2e35c87733517b30
|
|
|
|
| |
Change-Id: Iddf1b6486430270d871a45c75615e54339a818e9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Audio policy:
- Added active capture indication to sound trigger service:
recognition stops if concurrent capture is not supported.
- Added generation of reserved I/O handle and session ID for
utterance capture.
Sound trigger service
- Added sound model update callback handling.
- Added service state callback
- Simplified callback shared memory allocation.
Bug: 12378680.
Change-Id: Ib0292c2733e6df90fdae480633dd9953d0016ef1
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Ensure AUDIO_FORMAT_PCM_FLOAT and AUDIO_FORMAT_PCM_32_BIT
have proper precedence.
Allow more mixer channels than 2.
Change-Id: I02af97dad6218b25cbada4d93077a213314c6725
|
| |
| |
| |
| |
| |
| |
| |
| | |
Indicate the audio session ID when calling getInput(),
startInput(), stopInput(), releaseInput().
Bug: 12378680.
Change-Id: I763793752f93e2f4e1445a5ab217c895af011038
|
|/
|
|
|
|
|
|
|
|
| |
Add parameters to openInput() and openOutput(): device address,
input source.
Allow caller to specify a given I/O handle
Group parameters in a struct audio_config.
Bug: 12378680.
Change-Id: I7e9af74c0d996561cc13cbee7d9012d2daf33025
|
|
|
|
| |
Change-Id: I50d068a968aa6bd9e53e5b3111a1b09a6c2d219c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the notion of device types that cause the device address
to be taken into account, i.e. multiple devices of the
same type but with a different address can be connected/
disconnected.
AUDIO_DEVICE_OUT_REMOTE_SUBMIX is such a device type.
When making those devices available / unavailable, look for
all outputs with a matching address.
Bug 16009464
Change-Id: I260f8248b7794c4932094e876afdf29fdea007a3
|
|
|
|
| |
Change-Id: I5f9c7b5ebf03b9bc94efe70d3677edfabb99c194
|
|
|
|
|
|
|
|
|
|
| |
Added rules to select most appropriate sampling rate, format and
channel mask from an input or output profile.
Moved mFlags from IOProfile to its base class AudioPort.
Removed bogus mChannelMask member in DeviceDescriptor class.
Improveed dump of dynamic parameters in AudioPort.
Change-Id: Ic09d320386002a8bafee4a28db00b1001a386678
|
|
|
|
|
|
|
|
|
|
| |
In AudioPolicyManager, support querying an output
or playback strategy for audio attributes,
instead of a stream type,
In AudioTrack creation, use the output returned
for the track's attributes.
Change-Id: I0fef05845ba676404775e2e338c10e6a96237268
|
|\
| |
| |
| |
| |
| |
| | |
audio_policy.conf" into lmp-preview-dev
* commit '318cd78e3b8503113919191b3711eb8be5d23d35':
audio policy: added audio HAL version in audio_policy.conf
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Each hardware module section in audio_policy.conf indicates
the audio HAL version it implements.
Also added a template audio_policy.conf file with examples
of device and gain descriptors added for audio HAL version3.0.
Bug: 14815883.
Change-Id: Id219d121f81f687363f6c18f2d1684b2448dcdf4
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For devices with DRC on speaker (using the flag "speaker_drc_enabled"
in audio_policy.conf), set the speaker media volume to use a
new curve with more aggressive attenuation in the upper range.
Bug 15318604
Change-Id: Ia5fb9fdd608fddad22fadfb1065d35574030bb52
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rewrite setAudioPortConfig() to take advantage of the new
AudioPortConfig class.
The configuration is now checked against AudioPort capabilities
and stored in the AudioPortConfig.
Fix a bug where the config mask was not set properly when calling
setAudioPortConfig at the PatchPanel interface.
Remove debug log in IAudioPolicyService.
Bug: 14815883.
Change-Id: I7eb7683a96e049581c13f2a212486507883d008d
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use only RefBase objects for the following classes:
- AudioOutputDescriptor
- AudioInputDescriptor
- HwModule
- EffectDescriptor
Create a common base class AudioPortConfig for:
AudioOutputDescriptor, AudioInputDescriptor and DeviceDescriptor
Bug: 14815883.
Change-Id: I1bd193ef1020780d8b94c13142029903615aba97
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement parsing of audio_policy.conf for device and gain
controller definitions.
Copy audio_policy_conf.h from hardware_legacy.
New syntax for devices and gain controllers description will not
be parsed by legacy audio policy manager.
Bug: 14815883.
Change-Id: I7f1035d514dcf55fb3e45ed1f633a2f63ee398f5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add implementation of audio routing control via AudioSystem APIs.
The following APIs are implemented:
- listAudioPorts(): return a list of devices and output/input mixers ports
that can be used as sources or sinks for audio patches.
- createAudioPatch()/releaseAudioPatch(): create/release a connection patch between
two audio ports (e.g. to connect input from an HDMI device to a speaker output device).
Only one client application can own a patch from a given source.
When an audio port (device or mix) is part of an application created patch, its routing cannot
not be changed by a policy decision.
- listAudioPatches(): return a list of existing patches.
Each audio port addition/removal and each audio patch creation/release increments a generation count.
This generation count is used to ensure consistency betwen calls to
listAudioPorts() and listAudioPatches().
Bug: 14815883.
Change-Id: I022b638c2f5f0bb41543c7cfca7488fb45cfdd80
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added a new PatchPanel subclass to AudioFlinger
to handle audio ports and audio patches configuration
and connection.
The first implementation does not add new functionnality.
AudioPolicyManager uses patch panel interface to control
device routing.
AudioFlinger:
- Added PatchPanel class. The first implementation does not
add new functionnality. PatchPanel handles routing commands
for audio HAL after 3.0 or converts to setParameters for audio
HALs before 3.0.
- Added config events to ThreadBase to control synchronized
audio patch connection.
AudioPolicyManager:
- Use PatchPanel API to control device selection isntead of setParameters.
- New base class AudioPort common to audio device descriptors
and input output stream profiles. This class is RefBase and groups
attributes common to audio ports.
- Use same device selection flow for input as for outputs:
getNewInputDevice -> getDeviceForInptusiource -> setInputDevice
Change-Id: Idaa5a883b19a45816651c58cac697640dc717cd9
|