Add the possibility to specify a target audio device when
creating an audio effect by passing its audio port handle
to createEffect API.
Add new create_effect_3_1() function to audio_effect_library_t
interface for interface version to 3.1.
Bug: 136294538
Test: make
Change-Id: Ia84eaf32f2a7c0cc73a43075c84902a395bafe58
audio.h and its dependencies (audio-effect.h, sound_trigger.h...)
used to be shared between system and vendor code.
This led to multiple problems:
1) Such sharing contradicts the Treble policy of
strict independence of framework and vendor code.
2) When audio.h was changed, every vendor needed to update
its code in the next release. This meant that audio*.h
headers were mostly changed in backward compatible manner.
Nevertheless, for P the HIDL interface and thus the audio.h
interface are changed in backward incompatible way.
(Some enum are becoming 64 bit long).
3) As the headers were common, some API used only by the framework
needed to be visible to the vendors (mostly enum values).
4) Treble policy is to support at least one previous HAL version
As a result the audio*.h headers are now duplicated,
one set for the framework, and one for the vendor.
Each set will evolve independently. After this split,
the framework-only APIs will be removed from the vendor headers
and vice versa.
The split is implements as such:
+ for system code
- NOT moving the libaudio_system_headers
Eg: system/audio.h and system/audio_effects/effect_equalizer.h
are still in system/media/audio
- the legacy audio HAL API that were in libhardware headers
are now in libaudiohal_legacy_headers
Eg: hardware/audio.h and hardware/audio_effect.h
are now in frameworks/av/media/libaudiohal/legacy/
+ for vendor code
- moving libaudio_system_headers and the legacy audio HAL API
that were in libhardware_headers in
android.hardware.audio.common.legacy@2.0
Note that those headers are now versioned, so migrating to a @4.0
HIDL HAL will mean changing the legacy dependency too.
Eg: system/audio.h, system/audio-effect.h, hardware/audio.h
are now in hardware/interfaces/audio/common/2.0/legacy
- the legacy audio effect HAL API that was in libaudioeffects
is now moved in android.hardware.audio.effect.legacy@2.0
Eg: audio_effects/effect*.h are now in
hardware/interfaces/audio/effect/2.0/legacy
- the legacy sound trigger HAL API that were in libhardware_headers
is now moved in android.hardware.soundtrigger.legacy@2.0
Eg: hardware/sound_trigger.h is now in
hardware/interfaces/audio/effect/2.0/legacy
libaudioutil being used by both system and vendor, had
to be renamed for system to libaudioutil_system.
Vendor libs that now depend on the audio.h of a specific
version and are not extensively referenced in non google code,
append @2.0 to their name.
Note that headers that are not expected to change in the 4.0 HAL are
left in all-versions folder to avoid duplication.
This is an implementation detail as the versioned libraries export
the all-versions headers.
Note that strict vendor-system separation is enforced by the
build-system. The system headers are not available for vendor
libs and vice-versa.
Note that this patch is split between numerous git repository (>10),
all the commits having the same Change-id for searchability.
Note that audio_policy.h is no longer exposed to vendors
as the legacy audio policy HAL API was never officially supported.
As a result the audiopolicy stub implementation has been removed.
Test: compile taimen-userdebug walleye-userdebug
sailfish-userdebug marlin-userdebug
gce_x86_phone-userdebug gce_x86_phone
full-eng aosp_arm aosp_x86-eng
Test: check that the emulator booted and played audio
Test: full QA on sailfish-userdebug and taimen-userdebug
Bug: 38184704
Change-Id: I950f4e0a55613d72e32eba31bd563cb5bafe2d1a
Signed-off-by: Kevin Rocard <krocard@google.com>
A lot of code (including clients of AudioFlinger) use constants
and structs from hardware/audio_effect.h for convenience, without
actually interacting with HAL. Thus these definitions are more
like the ones from system/audio.h and need to be moved to system/.
Test: make
Change-Id: I17a210fc7bde96380be42b50c60f10f2b1017e3a
Add a flag for effect descriptor indicating that the effect does not
implement a process function. This tells the framework that no
latency or performance penalty comes with enabling this effect.
When this flag is set, the process function does not have to be implemented
by the effect implementation.
Bug: 31491112
Change-Id: I69e6959eb17e04266f4de3f2943c226e34868b1f
Added EFFECT_CMD_OFFLOAD command to audio effect control
interface. It is used by the framework to indicate if
the playback thread the effect is attached to is offloaded
of not.
Added effect flag EFFECT_FLAG_OFFLOAD_SUPPORTED indicating if
the effect implementation supports offloading to a DSP.
Change-Id: I26553576657d3aa9cd0cdcd5785c813b02f48136
Signed-off-by: jpadmana <jayashree.r.padmanaban@intel.com>
Signed-off-by: Eric Laurent <elaurent@google.com>
A special value for NULL effect UUID is declared as const
in audio_effect.h. This prevents several modules including
audio_effect.h to be linked together.
The fix consists in declaring the value as static const.
Change-Id: I86e74dc9da8eaed13a3ad44765abb9cd1e80f316
Added API to query and configure effects supporting auxiliary channels.
An auxiliary channel contains an additional audio signal helping in the
processing of the main channel. An example is a dual mic noise suppressor
were the main channel contains the signal from the main mic and the aux channel
containss the signal from the sub mic.
Change-Id: Ibb7a19d7f492720ebad0be45f78f996e0beba272
Renamed audio effect library interface command for audio format
configuration from EFFECT_CMD_CONFIGURE to EFFECT_CMD_SET_CONFIG.
This makes the naming more consistent with other exixsting commands
and allow adding new a command to get the configuration (EFFECT_CMD_GET_CONFIG).
Same change for reverse channel configuration renamed from
EFFECT_CMD_CONFIGURE_REVERSE to EFFECT_CMD_SET_CONFIG_REVERSE.
Change-Id: I1cc462aa50e58ceec900b3da9bd3873d2d098098
Moved and renamed media/EffectApi.h to hardware/audio_effect.h
Modified the effect library API to expose a library info structure
containing an interface functions table.
Also removed enums for audio channels, audio format and devices
from effect API and use values from system/audio.h instead.
Change-Id: I32fd752e449337410115121c1c60c699d95247c2