Add request to create tombstones of audio HAL servers before restarting
audioserver process when the watchdog triggers.
Add audio device factory HAL interface API to retrieve HAL process pids when
possible (on debug builds).
Add AudioFlinger service API to set audio HAL process pids from
JAVA AudioService.
Bug: 141528385
Test: Force watchdog and verify tombstone creation
Change-Id: I68c1e8fb4db23e5952ad0c93d7d0b9d121b8ec18
Merged-In: I68c1e8fb4db23e5952ad0c93d7d0b9d121b8ec18
Read log tag from request list under lock
to avoid use after free.
Bug: 142142406
Test: make
Change-Id: If4adab8c15a319dc84b7003adf3ac59a3980f075
Merged-In: If4adab8c15a319dc84b7003adf3ac59a3980f075
As audio device type can not be used as bit mask any more, refactoring
audio device type usages in conversion from/to HAL. Use a set of audio
device types instead of bit mask.
Bug: 135621476
Test: atest AudioPlaybackCapture
Test: play and capture audio with BT and usb headset
Change-Id: If4a5c5002d6d4ccb7aaf823111b371d417784b19
Merged-In: If4a5c5002d6d4ccb7aaf823111b371d417784b19
Type and address are used to distinguish a device, it makes more
sense to set device type and address when creating a DeviceDescriptor.
Bug: 135621476
Test: make, atest audiopolicy_tests
Change-Id: I5f9063bd8c756ace77c162e86a8c0dd685da79b4
Merged-In: I5f9063bd8c756ace77c162e86a8c0dd685da79b4
* changes:
Refactor audio device type in audio flinger.
Refactor opening output interface between AF and AP.
Move libmediahelper into a new folder.
Use AudioDeviceTypeAddr in DeviceDescriptorBase.
Move AudioDeviceTypeAddr to libaudiofoundation.
As audio device type must not be used as a bit mask, there is a
requirement to refactor the code in audio flinger. This CL includes:
1. Use DeviceTypeSet for recording output devices in Threads. The input
and output device types in Threads will only be updated when creating
an audio patch.
2. Use helper functions in audio flinger for checking whether an audio
device type is a certain category.
3. Use DeviceDescriptorBaseVector as vector of DeviceDescriptorBase.
DeviceDescriptorBaseVector will be used in RecordThread to record output
devices, which will be used in audio effect.
4. Do not use set parameters when communicating output devices to
RecordThread. Instead, adding a new event in Thread to update output
devices directly.
Bug: 135621476
Test: atest AudioTrackTest AudioRecordTest AudioPlaybackCaptureTest
Test: atest AudioHostTest AudioServiceHostTest RoutingTest
Test: atest AudioEffectTest BassBoostTest DynamicsProcessingTest
Test: atest AAudioTests
Test: audio smoke test, run OboeTester
Change-Id: I87f3e59fd01b0b100232d61a9abbc471c61110c4
Merged-In: I87f3e59fd01b0b100232d61a9abbc471c61110c4
Refactor interface between audio flinger and audio policy. Use device
descriptor instead of audio device type and address. DeviceDescriptor
can contain more information that may be useful when opening an output
stream.
In audio policy, if multiple audio devices are passed in when opening
an output stream, one device is extracted using the same strategy as
when selecting a device for volume application. When starting source,
audio policy manager will call audio flinger to create audio patch. In
that case, multiple devices will still be patched to the output stream.
Test: atest AudioTrackTest AudioPlaybackCaptureTest
Test: atest audiopolicy_tests, audio smoke test
Change-Id: I46dc2da621614f8716c6c73cf807fe7d2d672cda
Merged-In: I46dc2da621614f8716c6c73cf807fe7d2d672cda
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
AudioDeviceTypeAddr is moved to libaudiofoundation. In that case, it can
be used in DeviceDescriptorBase.
Bug: 135621476
Test: make, atest audiofoundation_parcelable_test
Test: play music, record audio
Change-Id: Ia66dce29c8fb9d25c40598d9bada6eb295313884
Merged-In: Ia66dce29c8fb9d25c40598d9bada6eb295313884
Move AudioDeviceTypeAddr from AudioPolicy.h to libaudiofoundation.
AudioDeviceTypeAddr is a class that contains audio device type and
address. It can be used not only in audio policy, but also other places.
Bug: 135621476
Test: make, atest AudioHostTest
Change-Id: Ib257859891c647c07f22771012efdada438a4ff5
Merged-In: Ib257859891c647c07f22771012efdada438a4ff5
* changes:
Add parcelable test for classes in libaudiofoundation.
Add export header lib headers to libaudiofoundation_headers.
Add equals functions for classes in libaudiofoundation.
Make audio stuff parcelable.
Clear up bit mask usage in audio policy.
Make AudioGain parcelable.
Add parcelable test by writing the objects to Parcel and then reading
the objects to check parcelable functions work as expected.
Test: atest audiofoundation_parcelable_test
Bug: 135621476
Change-Id: I1d2263f0fe91e80b9262501372fde5e104469988
Merged-In: I1d2263f0fe91e80b9262501372fde5e104469988
Add libaudio_system_headers, libaudioclient_headers, libmedia_headers
to export_header_lib_headers for libaudiofoundation_headers so that
there is not needed to add header lib when using libaudiofoundation.
Test: make
Bug: 135621476
Change-Id: Iaa2c8046f9bce4b69398795e162d1ee39cece24b
Merged-In: Iaa2c8046f9bce4b69398795e162d1ee39cece24b
Add equals functions that can be used to check if current object is the
same as the given object by checking if all members are the same.
Bug: 135621476
Test: make
Change-Id: Idcf09587f629e6719e9dcf2f0fb7d68a01eafef9
Merged-In: Idcf09587f629e6719e9dcf2f0fb7d68a01eafef9
Make some generic audio classes parcelable so that they can be easily
used in binder call, including AudioProfile, AudioPort, AudioPortConfig,
DeviceDescriptorBase.
Bug: 135621476
Test: make
Change-Id: I8bdcd0da13739fc53638c78aac133336b77fb9d2
Merged-In: I8bdcd0da13739fc53638c78aac133336b77fb9d2
This change includes:
1. Use DeviceTypeSet to represent a combination of audio device types.
2. Add helper functions for DeviceTypeSet
3. Stop using audio device type as a bit mask in DeviceVector
Test: atest AudioTrackTest AudioRecordTest AudioPlaybackCaptureTest
Test: atest AudioHostTest AudioServiceHostTest audiopolicy_tests
Test: audio smoke test
Change-Id: If80513b689848bcab6094f70a572f053856afa82
Merged-In: If80513b689848bcab6094f70a572f053856afa82
Make AudioGain parcelable so that it can be easier to use in binder
call.
Bug: 135621476
Test: make
Change-Id: I4159e92a27c6d99570ac2e2175c3d46fa7975059
Merged-In: I4159e92a27c6d99570ac2e2175c3d46fa7975059
DeviceDescriptorBase is a class that derives from AudioPort and
AudioPortConfig and contains extensions to describe a audio port that is
a hardware device. DeviceDescriptor derives from DeviceDescriptorBase
and contains policy related stuff.
Test: atest AudioTrackTest AudioRecordTest AudioManagerTest
Test: atest AudioPlaybackCaptureTest AudioHostTest audiopolicy_tests
Test: audio smoke test
Bug: 135621476
Change-Id: I70ebe6bca70a77bbfc8f6855de3fd4c4ffa1c487
Merged-In: I70ebe6bca70a77bbfc8f6855de3fd4c4ffa1c487
The file is copied from managerdefinition folder. Doing this to get a
better git history.
Test: make
Bug: 135621476
Change-Id: I9a6d6401e45102b5303730b4900b1899968ca267
Merged-In: I9a6d6401e45102b5303730b4900b1899968ca267
Make the file name consistent as the class name.
Test: make
Bug: 135621476
Change-Id: Icbde26fe1798e344c3746f4678db098688456654
Merged-In: Icbde26fe1798e344c3746f4678db098688456654
This patch aims to make the structure for libaudiofoundation and policy
stuff simpler, including:
1. Make AudioPortBase as AudioPort in libaudiofoundation. Create
PolicyAudioPort that contains policy related stuff, which is used by
audiopolicy.
2. Make AudioPortConfigBase as AudioPortConfig in libaudiofoundation.
Create PolicyAudioPortConfig that contains policy related stuff.
3. DeviceDescriptor derives from AudioPort, AudioPortConfig, PolicyAudioPort
and PolicyAudioPortConfig. IOProfile derives from AudioPort,
PolicyAudioPort. AudioInputDescriptor/AudioOutputDescriptor derives from
AudioPortConfig, PolicyAudioPortConfig.
Test: atest AudioTrackTest, AudioRecordTest, AudioManagerTest
Test: atest audiopolicy_tests, AudioHostTest
Test: audio smoke test
Bug: 135621476
Change-Id: I40299d95dda3b3fc0ea88b079f2fe38d8f7e5b31
Merged-In: I40299d95dda3b3fc0ea88b079f2fe38d8f7e5b31
Make AudioProfileVector only in libaudiofoundation. In policy part,
instead of having policy specific AudioProfileVector deriving from
AudioProfileVector in libaudiofoundation, make all the functions as
global functions. In that case, AudioPortBase does not need to be a
template class. That helps make the structure clearer.
Test: audio smoke test
Test: CTS for AudioTrack, AudioRecord, AudioManager
Test: audiopolicy_tests, AudioHostTest
Bug: 135621476
Change-Id: I36b12123cf52c3f82cef09a965403791dff74093
Merged-In: I36b12123cf52c3f82cef09a965403791dff74093
The purpose of this change is to make a generic AudioPort class that
could be used by vendor.
1. Add AudioPortFoundation and AudioPortBase. AudioPortFoundation
contains generic members of an audio port. AudioPortBase is a template
class that derives from AudioPortFoundation. It takes audio profile
vector as a template parameters. That makes it more feasible to use
customized audio profile stuff as needed. In audio policy, AudioPort
derives from AudioPortBase and contain policy related stuff.
2. Add AudioPortConfigBase. AudioPortConfigBase contains generic members
of an audio port config. AudioPortConfig derives from AudioPortConfigBase
and contains policy related stuff.
3. Use std::string instead of String8 in AudioPort and AudioPortConfig.
Bug: 135621476
Test: CTS for AudioRecord, AudioTrack, AudioManager, RoutingTest
Test: audiopolicy_tests, AudioServiceHostTest
audio smoke test
Test: dumpsys media.audio_policy
Change-Id: I05611b7067c18006660de2c678acd56bdd34010a
Merged-In: I05611b7067c18006660de2c678acd56bdd34010a
Copy AudioPort.h from audio policy to libaudiofoundation and name it as
AudioPortBase.h. Note that AudioPortBase has not been added into the
make file as it needs some more change to make it work. Doing this just
to make a cleaner diff for later change.
Bug: 135621476
Test: make
Change-Id: I6cd1a53e889340c7fefffdd5832854016cd733ee
Merged-In: I6cd1a53e889340c7fefffdd5832854016cd733ee
AudioProfile is a class that contains information for an audio profile.
AudioProfileVectorBase is a base class that contains operations for a
vector of audio profiles. AudioProfileVector derives from
AudioProfileVectorBase and contains policy related stuff.
Bug: 135621476
Test: CTS for AudioRecord, AudioTrack, AudioManager
Test: audio smoke test, audiopolicy_tests
Test: dumpsys media.audio_policy
Change-Id: Ic2e08efcc5efa99e499a931811b7042fbd5ddf04
Merged-In: Ic2e08efcc5efa99e499a931811b7042fbd5ddf04
Copy AudioProfile from audio policy to libaudiofoundation. Note that
AudioProfile in libaudiofoundation has not been added into the make
file as it needs some more change to make it work. Doing this just to
make a cleaner diff for later change.
Rename AudioProfile in managerdefinitions folder as AudioProfileVector
since AudioProfile will be moved to libaudiofoundation.
Bug: 135621476
Test: make
Change-Id: I13ac067317648bbfd8d3960d16a1ea56ded83011
Merged-In: I13ac067317648bbfd8d3960d16a1ea56ded83011
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
1. Create folder for libaudiofoudation.
2. Move AudioGain to libaudiofoudation. The goal is to make AudioGain
be able to use in binder call and be vendor-available later.
Bug: 135621476
Test: make, CTS for AudioTrack, AudioRecord, AudioManagerTest
Change-Id: Ibf16ad9cb7f2ac657a02632ccbe4f934b5a12731
Merged-In: Ibf16ad9cb7f2ac657a02632ccbe4f934b5a12731
Fix few inconsistencies w.r.t. usage of $OUT
Fix name of the apk to be installed
Bug: 140051680
Test: follow steps in README.md and run couple of benchmark tests
Change-Id: I29fd338bcc4cb127656c10c24af30fa98f656a14
Instead of allocating a fixed size output buffer, allocate it as per
width and height of the input being encoded. To ensure for very low
resolutions, this size doesn't become too small, use a minimum size of
512K Bytes.
Bug: 144928581
Test: h264 related tests in android.media.cts.VideoEncoderTest
Change-Id: I01c1aa03456043824354005f1708f07b3268d97e
Call IDevice.close when the client doesn't need the device.
Bug: 114451103
Test: adb shell stop
Change-Id: I486db716be59cd4ea0f6d75d0e366f802ee9b06d
Merged-In: I486db716be59cd4ea0f6d75d0e366f802ee9b06d
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
Because of 0-based indexing, we need to make sure the index is
not equal to the number of elements in the array.
Test: TreeHugger
Change-Id: I9662d4a67cdfebb0c890c65a35a2456cd3af001b
The APIs that are tagged with # vndk are actually for LLNDK libraries.
Although LLNDK is part of VNDK, calling those APIs 'vndk' has given
users a wrong perception that the APIs don't need to be kept stable
because that's the norm for most of the VNDK libraries that are not
LLNDK.
In order to eliminate the misunderstanding, rename the tag to 'llndk' so
that people introducing new such API will realize what they are signing
themselves up for.
Exempt-From-Owner-Approval: cherry-pick from internal gerrit
Bug: 143765505
Test: m
Merged-In: I6b48cf2091def384780ca91c32a0ddb738e70455
(cherry picked from commit 2299310926)
Change-Id: I6b48cf2091def384780ca91c32a0ddb738e70455
CDD requires that the track is the same for compability track and the
actual Dolby Vision track, so we need to pass that back to the app.
Bug: 129367182
Test: CTS
Change-Id: Iab1ad3c4a593923ec6fc4231a4208806bf0159b7
Merged-In: Iab1ad3c4a593923ec6fc4231a4208806bf0159b7
Test: push V6 to device and check audio works fine
Kill the audioserver and check that the HAL restarts
Bug: 134940862
Change-Id: I3347ee3aabe753d34c69dacbd707c60105d80a47
Merged-In: I3347ee3aabe753d34c69dacbd707c60105d80a47
Signed-off-by: Kevin Rocard <krocard@google.com>
Test: push V6 to device and check audio works fine
Bug: 134940862
Change-Id: Ied5aeccdf8f1e9a085ed9cac9d696271b7a1bb63
Merged-In: Ied5aeccdf8f1e9a085ed9cac9d696271b7a1bb63
Signed-off-by: Kevin Rocard <krocard@google.com>
Bug: 134940862
Test: run on target
Change-Id: Ia884d0e926569d983ba12952817d2cecc8d8d34f
Merged-In: Ia884d0e926569d983ba12952817d2cecc8d8d34f
Signed-off-by: Kevin Rocard <krocard@google.com>
When parsing the DESCRIBE response of an RTSP server, the end of the
URI is one character too long. This causes an additional space to be
copied into the authorization header, which some servers reject.
Example:
* DESCRIBE rtsp://10.0.0.1:1234/Streaming/Channels/202 RTSP/1.0
* Authorization: Digest nonce="[nonce]", username="[user]", uri="rtsp://10.0.0.1:1234/Streaming/Channels/202 ", response="[res]"
Change-Id: Idb4e201578a2a2a0e4c59abad609816641a4dd99
IEEE754 single precision cannot precisely represent
INT32_MAX/UINT_MAX/RAND_MAX.
IEEE754 double precision cannot precisely represent INT64_MAX.
As such, implicit conversions from operations with floating point and
integral operands may result in a loss of precision.
Accept the imprecision with by making the existing implicit casts
explicit.
Bug: 139945549
Test: mm
Merged-in: Ic66b3d3bbac9e644e27ad8233018f24dfce3209f
Change-Id: Ic5a40abbccb1bf4d78475a6f3d1d2835df603d0a
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
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
C2SoftVpxEnc uses NV12 input data but format is specified as I420,
which causes the recorded video messy.
The fix is using mConversionBuffer as input, whose format is I420.
Bug: 139906732
Test:
Change-Id: Ib94dd217a82b2bac57056cfc3af5344da78b47d7