The output for a 3 channel input is not bit-exact with that of
2 channel input when concert surround is enabled and tested using lvmtest.
Test: local native test (lvmtest)
Bug: 124085228
Change-Id: Icb2d1d5d858be0c37cb11dd3734f8a6244d3cc1c
The memories created in lvmCreate call have to be freed at the end of
execution. Added code to achieve the same.
Test: local native test (lvmtest)
Bug: 123324940
Change-Id: I83fad7def874da27c79d755e44ec738fa0816a41
Added sample testbench, necessary makefile to build standalone application
and shell script to build and run the standalone application.
Test: downmixtest (in this CL)
Change-Id: I64651dfae497c0bf8687bfc5ed45020e27a8fdd1
Corrected the scratch memory size calculations of bundle scratch for
floating point and multichannel builds.
Added comments detailing the usage and size calculation of
memories of various memories LVM.
Test: local native test (lvmtest)
Bug: 120874654
Change-Id: I69bb7faa106be5b82b4e579718afe0d1d3bb798d
Added a standalone test bench that calculates SNR values using 2 files
as input. This tool is used to test the multichannel changes.
Test: build_and_run_all_unit_tests.sh
Bug: 121353611
Change-Id: I5e67d8113bace7872133f2e02d9ae7b9d90e61ff
Adjusted delay values in LVCS modwqule for higher sampling frequencies
starting from 48000 Hz. The values for higher frequencies are obtained
by linearly scaling the delay value for 44100 Hz frequency.
Test: Local Native Test (lvmtest)
Bug: 120991000
Change-Id: I261fd1ef338474f266aa19347e44aee1412db953
Table entries corresponding to 88.2kHz and 176.4kHz were missing for tables
corresponding to time constants and omega(2*pi/Fs). Added these missing entries.
Test: local native test (lvmtest)
Bug: 123209908
Change-Id: I6c17bb8492a3138acdc1e1fce3bc0a3e5a7eabf2
This commit adds the following audio capture sources:
- AUDIO_SOURCE_VOICE_PERFORMANCE: for real time live performances like Karaoke.
- AUDIO_SOURCE_ECHO_REFERENCE: for capturing the reference signal to suppress by an echo
canceller. Protected by privileged permission CAPTURE_AUDIO_OUTPUT.
Also added device AUDIO_DEVICE_IN_ECHO_REFERENCE selected when the requested
capture source is AUDIO_SOURCE_ECHO_REFERENCE.
Bug: 118203066
Test: CTS tests for audio capture
Change-Id: Ieb159ea82a7b81acf762506a44e24ec80111609f
Channel masks beyond stereo are not supported by Concert Surround
virtualization at this time.
Test: VirtualizerTest#test4_1SpeakerAnglesCapaMatchesFormatModeCapa
Bug: 122358150
Change-Id: Ib5ea0f8655c1845d5974ec9cc18a821652fac9b4
This ensures all input audio channels are identical
by replicating the first audio channel of each
audio frame to the other channels.
Test: Use lvmtest with -M
Bug: 121331591
Change-Id: Ie85b6511397a97c9d0f3451328d128048c803ce5
Added test cases for testing audio effects for higher frequencies
Added test cases for different combination of effects
Removed generated *.raw files at the end of the test
Test: local native test (lvmtest)
Bug: 120910607
Change-Id: I4df654314fee39a41bac05a8398d01e8f11e1173
Corrected the headphone side filter coefficients for 96kHz and 192kHz sampling
rates for the Concert Surround / Stereo Widening (CS) module.
Test: local native test lvmtest
Bug: 120942559
Change-Id: I213ff07aa54f4e0e4271c7ae619ede3881cee409
Multichannel processing support added for Bundled effects including
Bass Enhancement (DBE)
N Band Equalizer (EQNB)
Concert Surround / Stereo Widening (CS)
Parametric Spectrum Analysis (PSA)
DC removal
Treble Boost
Test: Solo Tester, CTS Effects Test, Local Native Test
Bug: 72223862
Change-Id: Ide86b529a7574c26306098fedd7b276b3688998f
See build/soong/README.md for more information.
Also removed some obsolete subdirs entries.
Test: m MODULES-IN-frameworks-av-media-libeffects
Change-Id: I1111197a62cc0e856159bfa0d650c5c36b20890a
ParsingResult::configPath is the path of the configuration file
used for the factory config parsing.
This path is used for an error log if the configuration file has errors.
The paths used to be a static string literals stored as char*
without lifecycle management.
When it was changed to dynamic strings, the code was not updated.
This patch changes it to a std::string.
Bug: 111261328
Test: flash and check effect works
Change-Id: Ia2022c794936f3f75793371cdde86c3047bb6c0a
Signed-off-by: Kevin Rocard <krocard@google.com>
* clang-analyzer-cplusplus.NewDelete and clang-analyzer-unix.Malloc
could give wrong "Use of memory after it is freed" warnings.
* Delete old obsolet calls to ALOGV.
Test: make with WITH_TIDY=1
Change-Id: Ie7806c8d423b31e8b527b42ad15469d0b087edfa
ParsingResult::configPath is the path of the configuration file
used for the factory config parsing.
This path is used for an error log if the configuration file has errors.
The paths used to be a static string literals stored as char*
without lifecycle management.
When it was changed to dynamic strings, the code was not updated.
This patch changes it to a std::string.
Bug: 111261328
Test: flash and check effect works
Change-Id: Ia2022c794936f3f75793371cdde86c3047bb6c0a
Signed-off-by: Kevin Rocard <krocard@google.com>
Fixed issue with FFT scaling and energy computation.
Added windowing compensation to energy computation.
Refactored FFT and stages computation to accomodate for linked limiters.
Added better logic for linked limiters computation.
Bug: 79712497
Test: manual testing and sound amplifier test
Change-Id: Ice16de3b6e21a4972e7667a71839478ef8b22c22
VTS tests can only depend on NDK shared libraries,
as libeffectsconfig is not part of the NDK and is used
by audio tests, it must have a static version.
Bug: 78871270
Test: compile
Change-Id: I48fbffd0316efc151917071c54aa19e533c615df
Signed-off-by: Kevin Rocard <krocard@google.com>
Ported the frequency domain implementation of the effect from the
development sandbox.
Bug: 64161702
Bug: 38266419
Test: manual with Triton app. Cts tests. Listening tests.
Change-Id: I9417beba2f98f2a677f0857c7976bf76a0e0d8e0
Due to a typo in an error message.
Bug: 74446193
Test: boot
Change-Id: Ief4150ff335e53c7b08bbc9ec9fd20ee61d4e13a
Signed-off-by: Kevin Rocard <krocard@google.com>
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>
There's an intended integer overflow in the Visualizer_command function.
This refactors it to use the builtin overflow-safe function.
runtime error: unsigned integer overflow: 1664 - 4048 cannot be
represented in type 'unsigned int'
Bug: 30969751
Test: Builds and boots.
Change-Id: I63a505f4b073480f52d0b073ec5e45c52212caa8
Merged-In: I63a505f4b073480f52d0b073ec5e45c52212caa8
(cherry picked from commit 612d8fcbc9)
There's an intended integer overflow in the Visualizer_command function.
This refactors it to use the builtin overflow-safe function.
runtime error: unsigned integer overflow: 1664 - 4048 cannot be
represented in type 'unsigned int'
Bug: 30969751
Test: Builds and boots.
Change-Id: I63a505f4b073480f52d0b073ec5e45c52212caa8
Fixes duplicate sessionNo for the same sessionId which
causes crashes, effect glitching, and random failure.
Test: Solo Tester long run
Bug: 70809793
Change-Id: I872635641f5a0794cb7792bf80c3eac0661f0180
Merged-In: I872635641f5a0794cb7792bf80c3eac0661f0180
Fixes duplicate sessionNo for the same sessionId which
causes crashes, effect glitching, and random failure.
Test: Solo Tester long run
Bug: 70809793
Change-Id: I872635641f5a0794cb7792bf80c3eac0661f0180
This makes an implicit conversion to a signed integer explicit before
the unsigned integer overflow happens. This was causing runtime errors
on integer sanitized builds.
runtime error: unsigned integer overflow: 1664 - 4096 cannot be
represented in type 'unsigned int'
Bug: 30969751
Test: Compiles.
Change-Id: I1d4b5ab024e94c19ff448110064340125cd01e01
Merged-In: I1d4b5ab024e94c19ff448110064340125cd01e01
This makes an implicit conversion to a signed integer explicit before
the unsigned integer overflow happens. This was causing runtime errors
on integer sanitized builds.
runtime error: unsigned integer overflow: 1664 - 4096 cannot be
represented in type 'unsigned int'
Bug: 30969751
Test: Compiles.
Change-Id: I1d4b5ab024e94c19ff448110064340125cd01e01
EffectBundle combines effects on the same session into a single processing step.
Intermediate processing must forward or accumulate float buffers properly.
Test: Compilation
Bug: 70237476
Change-Id: I9344cc6c32e32c15892bd96ea676da635e34e569
Removed additional conversions from/to int16/float.
Fixed config file restrictions.
Detection of native format (int16/float) of effects.
On-the-fly conversion to/from 16 bit effects if necessary.
WIP: testing effects in all possible configurations.
Bug: 63935479
Test: Bufflog dumps, frequency analysis comparison, SoloTester
Change-Id: Id4cabc5c5698befc90a5d68b0b996a9b9adebfc4
The effect framework only supports loading its config from /vendor/etc/.
As the audioeffects.conf supported to be loaded from /system and we want
to ease transition to xml,
As the audio policy config and the effect HW modules are can be loaded
from {"/odm/etc", "/vendor/etc", "/system/etc"},
Search for the audio effects xml config in /odm, then /vendor then
/vendor.
Bug: 38184704
Change-Id: I92a4e182fd16659eee2cf6481f8c2a646bf4f427
Test: media.audio_flinger dumpsys with config in /vendor and /system
are identical
Signed-off-by: Kevin Rocard <krocard@google.com>
This turns on unsigned and signed integer overflow sanitization in
libreverbwrapper.
Bug: 67588213
Bug: 62343822
Test: CtsMediaTestCases and device boots.
Change-Id: I44c50252e278d38c59b71b0e86d52bc1f976f47b
Effects might give wrong energy estimate if they were disabled since
last computation.
Updated BassBoost level
Bug: 65529284
Test: manual testing with SoloTester, play music and headphone load.
Change-Id: Ieb1df935e88fed6997a663bab10d6bda8176cc57
Output buffer is shared with temp buffer. Conversion should go low to
high indexes in array to avoid corruption.
Bug: 65375387
Test: Manual testing with SoloTester app.
Change-Id: I1b96e6c625d2b0a857f029e493b5fcb22bf02ece