* changes:
Add AudioPortFoundation, AudioPortBase and AudioPortConfigBase.
Copy AudioPort.h to libaudiofoundation.
Make AudioProfile as a common class and create AudioProfileVectorBase.
Preparation for moving AudioProfile to libaudiofoundation.
Return DeviceDescriptor or DeviceVector in Engine.
Add unit test for dyanmic policy. Including:
1. Use bp file instead of mk file
2. Test (un)registering policy mixes
3. Test dynamic policy playback rerouting
4. Test dynamic policy mix record injection
The idea of 3. and 4. is from pa/1201282.
Test: atest audiopolicy_tests
Bug: 135621476
Change-Id: Ic95c6f9193c2448168897c5441554cff735f401d
Merged-In: Ic95c6f9193c2448168897c5441554cff735f401d
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
To remove the limit on the number of audio device types, there is a
need to remove the return value as a combination of audio_devices_t.
Using DeviceDescriptor or DeviceVector in Engine is a starting point.
Test: audiopolicy_tests, smoke test
Test: CTS for AudioTrack, AudioRecord, AudioManager
Bug: 135621476
Change-Id: I0d87fd76385629e6e6b74cdd37dbd334ae02c04f
Merged-In: I0d87fd76385629e6e6b74cdd37dbd334ae02c04f
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
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
Till now, file_contexts has been treated differently that other input
src files. Now it is tagged as `android:"path"` because it is.
Bug: 144732805
Test: m
Change-Id: I9d842958da500900e83a95b7d194c9d8a46feee0
Remove copyControlVector, extendedData and decryptInfo from DecryptHandle,
since none of these were actually used.
Test: atest cts/tests/tests/drm/src/android/drm/cts/DRMTest.java
Change-Id: I499bf4884e467b53d05e1317e3dbe0bd85537577
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