AudioPlaybackRate is now defined in system/audio.h
as 'struct audio_playback_rate_t' (in global namespace).
Similar for the related enums.
To accommodate the existing code, introduce AudioPlaybackRate
as a typedef in the 'android' namespace.
Update code that was forward declaring AudioPlaybackRate
as it's not a struct anymore.
Bug: 133526565
Test: m
Change-Id: Iba20f1de1e8779cd78ac4573f2082416f2b428e2
Extend MONO_HACK to multi-channel output.
Mono track will have only one channel output on multi-channel devices.
Since ARC++ exposed a 4-channel output device and downmix track in
ChromeOS, we need to add this feature to support mono track sample
expansion.
Add support for both re-sample and non-resample path.
For resample path, we need to add MIXTYPE_STEREOEXPAND in
AudioMixerOps.h since AudioResampler will upmix mono track to stereo
track.
Bug: 120222604
Bug: 112341269
Bug: 117116052
Bug: crbug.com/890560
Test: Play mono tracks without re-sampling on ARC++
Test: Play mono tracks with re-sampling on ARC++
Test: Play normal stereo tracks on ARC++
(cherry picked from commit 9b79e0752e6536c31430aa31838a9de1b7b56f9f)
Change-Id: I51f5914c41dd0196db9c6a2e1a99b44e5d87c0d6
CrOS exposes 4-channel output for ARC++ and mixes samples in CRAS
server to real channel format, but AudioMixer will discard right
channel volume when mixing a 2-channel track to 4-channel output.
This behavior will cause ARC++ fail on Audio Frequency Line Test
in CTS-V since the right channel can't be tested.
The code is also updated to work for 3, 5, 6, 7, 8 canonical output
channel position masks, as well as continue the mono volume
handling for output channel index masks.
Bug: 110551766
Test: Run CTS-V Audio Frequency Line Test
Test: atest mixerops_benchmark
Change-Id: I4c6ee86d30bb8296f0e32f9a17b1135e1313fd64
Add the possibility to specify a target audio device when
creating an audio effect by passing its audio port handle
to createEffect API.
Bug: 136294538
Test: make
Change-Id: I32a6400278496653b4204175cd8a16d81f9724a0
Merged-In: I32a6400278496653b4204175cd8a16d81f9724a0
Add the possibility to specify a target audio device when
creating an audio effect by passing its audio port handle
to createEffect API.
Bug: 136294538
Test: make
Change-Id: I32a6400278496653b4204175cd8a16d81f9724a0
Test: make vts -j
run vts run vts-hal run vts-kernel
tests/build_and_run_all_unit_tests.sh
Change-Id: I997e0bb3dd1282a3c9ca5a270b57898558162b30
Signed-off-by: jaishank <jaishankar.rajendran@intel.com>
This is based on the code from test-resampler.cpp. I simplify out some
bits and use the data from LibFuzzer as the input audio.
Test: ran fuzzer locally on-device
Change-Id: I1ed732698feccd4a644a1a8eea4e3862a025e11a
Split AudioMixer into the base part which doesn't rely on
the framework and can be used in vendor code and the derived part
which is intended to be used by Audioflinger.
Test: A/B compare output from test scripts, manual testing on the phone
Merged-In: I24c390f67f20baa8109902099359ca6e34eebcfd
Change-Id: I24c390f67f20baa8109902099359ca6e34eebcfd
- Remove unused dependencies on libnbaio and libnblog;
- Move dependencies on libaudiohal and libsonic to libaudioprocessing
as AudioMixer implementation does not use them.
Test: make
Merged-In: I258a450725bdacb4fcf437b6f86582d51d40e622
Change-Id: I258a450725bdacb4fcf437b6f86582d51d40e622
Split AudioMixer into the base part which doesn't rely on
the framework and can be used in vendor code and the derived part
which is intended to be used by Audioflinger.
Test: A/B compare output from test scripts, manual testing on the phone
Change-Id: I24c390f67f20baa8109902099359ca6e34eebcfd
- Remove unused dependencies on libnbaio and libnblog;
- Move dependencies on libaudiohal and libsonic to libaudioprocessing
as AudioMixer implementation does not use them.
Test: make
Change-Id: I258a450725bdacb4fcf437b6f86582d51d40e622
The implementation files are in libaudioprocessing,
thus the header files also belong there.
Test: make
Change-Id: I78ba4ed480413c0a1b871e80971ef5ce1d0c6755
Required to ensure the RecordThread understands the true
number of frames consumed / available. Otherwise the RecordThread
thinks there are more frames than actually present, causing
a buffer provider underrun in the AudioResampler and the
resampler to reset.
Test: BT phone call, Tee sink
Bug: 130419319
Change-Id: I96fac6f52233e8519c0cc098329e5b9b89c1dd89
Combine adjust channels buffer provider and adjust channels non-destructive
buffer provider.
When contracting mono + haptic channels to mono, do not use
adjust_channels to avoid mixing haptic channel into audio channel.
Bug: 125915810
Test: play audio-haptic coupled files
Change-Id: I39916a3e0628a44ed4a148c265564af7135a2176
Use the constant from IExternalVibratorService.
Bug: 124318236
Test: play audio-haptic coupled file
Change-Id: Ice2ac13d0f6a6a749bb6243230524336144fa5f4
Use the same logic in VibrationEffect.scale to control the intensity of
haptic playback in audio framework. Note that as the maximum amplitude
of vibrator is 255, convert the haptic data to pcm_8_bit before doing
scaling.
Test: Manually
Change-Id: I6136d27c9255a215834b6e3092aa8ad696fbae04
It will make the track data disordered when adjusting channels non
destructive if the track is a static track.
Bug: 121047798
Test: Manually
Change-Id: Ibd9bc012ac9d36e0f19f6f6796753f9355cd3c97
When trying to play with haptic channel mask, use adjust channels
buffer provider to make the haptic channel the same as the output one.
If haptic playback is supported, use adjust channel non destructive
buffer provider to output haptic data to the end of the sink buffer.
Otherwise, haptic data will be ignored.
Test: Manually
Bug: 111454766
Change-Id: Ic5f780de48c1e71de6ba5c4774d1ed2e9c8c51a0
1. Add adjust channels buffer provider, which will expand or contract
sample data from one interleaved channel format to another. Expanded
channels are filled with zeros and put at the end of each frames.
Contracted channels are omitted from the end of each audio frame.
2. Add adjust channels non destructive buffer provider, which could
expand or contract sample data from one interleaved channel format to
another while not destructing the buffer. Extra expanded channels are
interleaved in from the end of the input buffer. Contracted channels are
copied to the end of the output buffer. Contracted channels could be
written to an output buffer with certain audio format.
Test: Manually
Bug: 111454766
Change-Id: I3f963307e73b3f7aa662d4127f78f0c61ac84510
See build/soong/README.md for more information
Test: cd frameworks/av/media/libaudioprocessing; mma
Test: atest resampler_tests
Change-Id: Icae927b3d4692f7cf15b296e6bf5529329b22325
Currently it gets included through utils/Log.h which includes
log/log.h which will usually be taken as:
system/core/liblog/include/log/log.h.
If on the other hand system/core/liblog/include_vndk/log/log.h gets
included instead, pthread.h will not be included.
Test: Manual - builds OK
Bug: 119390863
Change-Id: I64255f0812367a55996a7b64da65646fdf1743c2
Add FALLTHROUGH_INTENDED for clang compiler.
Bug: 112564944
Test: build with global -Wimplicit-fallthrough.
Change-Id: I8875bc7ed073aae84d5df97eb39c8c745ca627ef