This change mainly aims at refactoring libmediahelper. Libmediahelper
doesn't need to be stored in media folder. In that case, move
libmediahelper related file to a new folder. In the meantime, move
AudioParameter.h from libaudioclient to libmediahelper. There is no
need to keep AudioParameter.h in libaudioclient while AudioParameter.cpp
is in libmediahelper.
Test: make
Bug: 135621476
Change-Id: Icce6615b7e3a68be8b7492f2a91922ab04464ca2
Merged-In: Icce6615b7e3a68be8b7492f2a91922ab04464ca2
1. Add SampleRateSet, FormatSet, ChannelMaskSet, FormatVector
using std::vector and std::set in libaudiofoundation.
2. Use SampleRateSet, FormatSet, ChannelMaskSet, FormatVector in
audio framework.
Bug: 135621476
Test: make, CTS for AudioRecord, AudioTrack, AudioManagerTest
Test: play and record audio
Change-Id: Ic04e637bcc6ba9df84c5e7561ec3c03f18a7d242
Merged-In: Ic04e637bcc6ba9df84c5e7561ec3c03f18a7d242
DrmInitialization only needs to be called on PlayerServiceFileSource
and PlayerServiceMediaHTTP, so just have those initialize the forward
lock engine automatically, which removes the need to have this in the
IDataSource interface.
Test: atest cts/tests/tests/drm/src/android/drm/cts/DRMTest.java
Change-Id: I344f46b65b5c473930b16b9b4041e4897384dc18
Merged-In: I344f46b65b5c473930b16b9b4041e4897384dc18
This removes libaudioeffect_jni's dependency on libmedia and removes
libmedia's dependency on libaudioutils.
Test: build
Change-Id: Iabd4835f2d09e403ebed8b8ba2e42ac1fa86b044
Merged-In: Iabd4835f2d09e403ebed8b8ba2e42ac1fa86b044
Visualizer gets stuck in mCaptureThread::requestExitAndWait due to a
deadlock between mCaptureThread::mRunning and mCaptureLock.
Temporarily release mCaptureLock upon mCaptureThread::requestExitAndWait.
Test: Clarity -> Response, rapidly toggle visualizer enable, disable
Bug: 135326776
authored-by: Weiyin Jiang <wjiang@codeaurora.org>
Change-Id: If32431c4d7b271b7ea61168cb1a5a42f3a1cd66e
JetPlayer.cpp was only used by the JetPlayer JNI code, so move
it to the same library.
Test: atest JetPlayerTest
Change-Id: I14b8241c5eb6c789ebc5d6725db716b9b0f8f31f
Merged-In: I14b8241c5eb6c789ebc5d6725db716b9b0f8f31f
MidiIoWrapper's DataSourceUnwrapper doesn't need to inherit from
DataSourceBase, and removing that inheritance saves a little bit
of space too.
Test: build
Change-Id: I9f560ef57b76b624cf323d75872395a39f65ed1f
Since AudioParameter.h is vendor-available, some vendors may
still use the old parameters. Leave the old parameters there
but mark as deprecated.
Bug: 138868195
Test: make
Change-Id: I6d12b7ac360309014a240a321c3cd32b39d8f740
Merged-In: I6d12b7ac360309014a240a321c3cd32b39d8f740
During the transition to Treble, "device connect" / "disconnect"
parameter was erroneously attributed to audio streams. This
issue got fixed in Audio HAL V4.0, but AudioParameter file
was still using incorrect name for the constant.
Test: make
Change-Id: I4056ad9e98af6dadd017d22bc4bde031cac75631
Merged-In: I4056ad9e98af6dadd017d22bc4bde031cac75631
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I6cc85a91afb603e31b85090917f9f3b59d82a4d1
- Fix ResourceManagerSerivce handling of adding same-type
resource in multiple calls, combine entries with the same
<type, subtype>. This is not required in existing usage,
bug could be required if we allow same type to be added
incrementally (eg. memory usage).
- Add api for removing some resources. Currently we can
add resources in multiple calls, but removeResource always
remove all resources of that client. We need this to toggle
battery stat On/Off based on actual usage of the codec.
- Add unit tests for the above.
bug: 138381810
test: ResourceManagerService_test; CTS ResourceManangerTest.
Change-Id: Icdba6c6b4c517755291668c52764169aac3071ea
We can't track video stats accurately if it's reported from
app side MediaCodec. If the app dies, video stats get stuck
in On state forever. This can be easily triggered by forcefully
kill and app that uses MediaCodec from app side (instead of
through mediaserver's Recorder or Player service), eg.
launch GoogleCamera app and switch to Video tab, and kill it
from adb shell.
In order to track MediaCodec usage from apps we need to move
the battery stats reporting from MediaCodec into ResourceManager.
bug: 138381810
test:
1. test if app uses MediaCodec directly and it dies off, the video
off is received: launch GoogleCamera app, swipe to Video tab,
"dumpsys batterystats --history" and see +video; now adb shell
kill GoogleCamera, dumpsys should show -video.
2. test app that uses MediaCodec through mediaserver: use Chrome
(which uses MediaPlayer) to play some website with video, kills
Chrome from adb shell, and check -video is received.
In anycase it shouldn't stuck in On state.
3. ResourceManagerService_test
Change-Id: I164b31681c4e72e8cce02342641dbec14b8df374
(cherry picked from commit 47db2ff19c)
Move ExtendedAudioBufferProvider.h to libaudioclient. This is
a more appropriate location because EABP extends AudioBufferProvider.
Move SingleStateQueue.h to libnbaio_mono. This is a more appropriate
location because SSQ is a non-blocking queue.
This allows to remove the dependency of libnbaio on libmedia
which is a good thing because libnbaio provides more low-level
abstractions than libmedia.
Also, replace a dependency of libnbaio on libbinder with
a dependency on libaudiohal header library.
Test: make
Change-Id: Ie48b523790cd8230695ec2e4710e50981b616289
The file name and path of the media profiles can be changed by
media.settings.xml property. So befor test, we should check
media.settings.xml property.
Bug: 138413934
Test: vts-tradefed run vts -m VtsValidateMediaProfiles
Change-Id: Ib7070cca94b9d637b9a1a175d09baf7b78ec0fd9
Merged-In: Ib7070cca94b9d637b9a1a175d09baf7b78ec0fd9
(cherry picked from commit ef8695ed84)
The file name and path of the media profiles can be changed by
media.settings.xml property. So befor test, we should check
media.settings.xml property.
Bug: 138413934
Test: vts-tradefed run vts -m VtsValidateMediaProfiles
Change-Id: Ib7070cca94b9d637b9a1a175d09baf7b78ec0fd9