This CL adds the concept of Volume Group to the engine.
It generalizes the volume management today controled by stream types
and hard coded into AOSP.
The goal is to control the volume per attributes, being able to define
a group of attributes that follow the same volume curves.
It intends to replace the concept of aliases in AudioService.
Bug: 124767636
Test: build
Change-Id: Icd079374cc1680d074b01836eca0bceb0b0c5247
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
Implemented for threads that read/write PCM.
Test: audioflinger dumpsys Play Music, Movies, Video Recording
Bug: 114112762
Change-Id: I866a8b639d18426633088d6a03d9135f4ee09fd3
am: 172d4c505a -s ours
am skip reason: change_id I8d936f0f79540345d3e3675f6129bb942a08e423 with SHA1 704c577cce is in history
Change-Id: I5d57864d4a9401dcb6f8ec6ec110f253e37543e7
am: bd6dc46458 -s ours
am skip reason: change_id I8d936f0f79540345d3e3675f6129bb942a08e423 with SHA1 704c577cce is in history
Change-Id: I3c43fd09a0687b35dcd519dbbd822c4479d4ba66
When the Visualizer effect is released, synchronous wait for the CaptureThread can
cause ANR in an app. This is why an asynchronous 'release' method is introduced which
is used by Visualizer.release() method on the Java side. Since CaptureThread may still
be running while the the last reference to the Visualizer instance is released,
CaptureThread now holds a strong reference to the Visualizer, which it releases
upon exit from the thread loop.
The 'release' method does not check for 'enabled' status because setEnabled(false)
may fail due to audioserver calling AudioFlinger::EffectHandle::setControl to
hold control.
Bug: 124833084
Test: CTS VisualizerTest
Change-Id: I8d936f0f79540345d3e3675f6129bb942a08e423
Merged-In: I8d936f0f79540345d3e3675f6129bb942a08e423
Signed-off-by: zengjing <zengjing@xiaomi.com>
This CL removes the hard coded volume table in the engine and
use as a fallback for compatibility reason the apm config file
to load the volume tables.
Bug: 124767636
Test: dumpsys media.audio_policy & diff with previous version
Change-Id: I0392aad730c67ee79f898093fd1b4f64e26ab3fd
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
This CL moves the volume curves to the engine.
The configuration files of volume are now owned by the engine,
that is intended to become vendor specific.
Test: build, dumpsys media.audio_policy and checks the volume curves.
Bug: 124767636
Change-Id: I9e3b256d2eb89c8eac6b282db0e59ec3af47d76d
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
get/setMasterVolume are defined on IDevice, but DeviceHalHidl
was restricting calls to it only for IPrimaryDevice. This seems
like a bug lingering from the initial implementation of the shim.
Test: make
Change-Id: Ia028959690a5ab71aade14d12d5c12488dc83e41
Bypass systematic playback client route evaluation when connecting a
remote submix output device used by a recorder dysnamic policy as no
rerouting is needed in this case.
Bug: 115429872
Bug: 123986127
Test: play music with GPM on Android TV and use the BLE remote
Test: use the BLE remote on Android TV
Change-Id: I285d416f54ff398d23742086fcd8c9f511cd289b
MediaImage2 structure was initialized only for valid planes, but entire
structure was compared to signal change in output format.
This was resulting in multiple change in output formats signalled in
dequeueOutputBuffer()
Bug: 124799741
Test: Manually verified that only one ouput format changed is signalled\
per clip using AMediaCodec based decoder application
Change-Id: Ib4139fc80f3493e3cb2b019d3890c50b05076469