Commit Graph

1725 Commits

Author SHA1 Message Date
Mikhail Naganov
248e950798 audio: Accept I/O handle for mix ports from the client
The client can pass the I/O handle to the HAL as part of
the requested audio port config. The HAL can store that handle
and use it as a cookie to match the port config with other HALs
(for example, SoundTrigger).

Updated behavior of IModule.setAudioPortConfig to copy
the handle for mix ports, and pass it back with the applied
config. Enforced this behavior in VTS.

Bug: 269551518
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ibc3f9eea4169610f1680937c764de42b4fe5194a
2023-02-21 16:39:58 -08:00
Treehugger Robot
4cf91c5144 Merge "audio VTS: Consider device connection for external device address" 2023-02-16 23:20:17 +00:00
Shunkai Yao
d789add493 Merge "Effect AIDL: Add line change between parameters print for debug" 2023-02-16 18:39:49 +00:00
Mikhail Naganov
e1ad6497a9 Merge "audio: Move Microphone[Dynamic]Info structs from core" 2023-02-16 15:39:31 +00:00
Shunkai Yao
eea1994dad Effect AIDL: Add line change between parameters print for debug
Bug: 258124419
Test: atest AudioEffectTargetTest
Change-Id: I3a757e4fa8482176bf1f3e7142bb9f7c007451a7
2023-02-16 02:31:24 +00:00
Mikhail Naganov
4590949e12 audio VTS: Consider device connection for external device address
When generating an address for an external device, consider
the connection type and choose the appropriate variant of
the AudioDeviceAddress struct.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ic791ba7de80e482c7e721e082fc9678f0f564b62
2023-02-15 18:28:41 -08:00
Shunkai Yao
c2e1b5f7f1 Merge "Effect AIDL: Add default extension with vector<uint8_t>" 2023-02-16 02:24:38 +00:00
Steven Moreland
26ebfab53f Merge "audio: save vndbinder threads" 2023-02-16 02:12:57 +00:00
Shunkai Yao
85b0169fca Effect AIDL: Add default extension with vector<uint8_t>
Bug: 258124419
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I3fa7f78ed2227d00b999c7e594d1b1d205f585e7
2023-02-16 00:28:21 +00:00
Mikhail Naganov
6725ef536b audio: Move Microphone[Dynamic]Info structs from core
These parcelables are also used by the framework.

Bug: 263964254
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ib30b69c325040e474fb58a8e7e515912fccab4c7
Merged-In: Ib30b69c325040e474fb58a8e7e515912fccab4c7
2023-02-15 10:15:42 -08:00
Shraddha Basantwani
cac2e68b40 Audio AIDL : Add placeholder implementation and VTS test case for AGC1
Bug: 258124419
Test: atest VtsHalAGC1TargetTest
Change-Id: Ia9894ac21b284a554f8c2d66966d07e5e4621ccd
2023-02-15 23:36:06 +05:30
Shraddha Basantwani
84ea32e419 Audio AIDL : Rename AutomaticGainControl to AutomaticGainControlV2
Bug: 258124419
Test: atest VtsHalAGC2TargetTest
Change-Id: Ia3de57a109852e21d2f6e2b003e8f4286f8278b3
2023-02-15 18:11:11 +05:30
Shunkai Yao
0a0c45efa4 Effect AIDL: Refactor effect capability with Range vts test cases
Disable dynamicsProcessing in presubmit temporary because it's currently
not following the range definition, and needs customize inRange method
implementationm which will be a followup.

Bug: 258124419
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: Ib38145896d66b65c093c247c86a9fba76489ba84
2023-02-14 20:39:34 +00:00
Shunkai Yao
8781102d74 Effect AIDL: Refactor effect capability with Range implementation
Bug: 258124419
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: Ie76270e91471a30f7dda1883c510cd318745855f
2023-02-14 20:39:22 +00:00
Shunkai Yao
376dbd96d3 Effect AIDL: Refactor effect capability with Range
Bug: 258124419
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I608fb7654591fb46061ecd5edbff20ccc977c5dd
2023-02-14 20:38:17 +00:00
Steven Moreland
35bcd1cd41 audio: save vndbinder threads
Bug: 264617136
Test: boot
Change-Id: Ife224bbcf43e4fead359982b44c80e58b5c20726
2023-02-14 19:21:18 +00:00
Greg Kaiser
17927df5ef Effect AIDL: Fix a couple logging statements
Since the ternary conditional has lower precedence than "<<",
we need to add parentheses.

Bug: 264618800
Change-Id: Idc10c0d231057a74e41d0a10bf20e1e28c1ce84e
Test: TreeHugger
2023-02-09 17:46:54 +00:00
Shunkai Yao
b49631f4c2 Effect AIDL: Move EffectThread process into mutex
To avoid the case of receive thread stop right before process, in this
case test case AudioEffectTest#ConsumeDataAfterRestart will fail.

Bug: 264618800
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I3c00361a537bc7010e6cd138f637f68b963e8033
2023-02-08 17:48:52 +00:00
Shunkai Yao
58aaf5bf0a Effect AIDL: Add back some effect parameters.
Bug: 258124419
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I4daeb8cec2a0c0e33a55a9ffaea3e78b362bc949
2023-02-07 23:13:29 +00:00
Treehugger Robot
9275a96448 Merge "AOSP AIDL USB audio HAL implementation." 2023-02-06 17:14:13 +00:00
Mikhail Naganov
d2ad3852e1 Merge "audio: Change log severity for audio I/O commands" 2023-02-03 23:28:56 +00:00
Mikhail Naganov
1f72fd4622 audio: Change log severity for audio I/O commands
To reduce log spam, change log severity of commands
for audio I/O to "verbose".

Bug: 205884982
Test: check logcat
Change-Id: I90dbf7d422064061f38d780f890407b24f787f5a
2023-02-03 12:14:42 -08:00
Shunkai Yao
41500c1261 Effect AIDL: Rename Flags.noProcessing to Flags.bypass
Bug: 258124419
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I3838fa71bed3aeb7824a7cdfb71d43041ddb4368
2023-02-03 01:39:23 +00:00
jiabin
253bd32b04 AOSP AIDL USB audio HAL implementation.
Bug: 266216550
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I82e053d3f6a918cafe0d43b030f724f63a99eb2a
2023-02-02 18:39:26 +00:00
Shunkai Yao
52ba4dc148 Effect AIDL: remove the shared_lib dependency for example binary
They will be dlopen so no need to add the shared_lib dependency.
But we need to add them as PRODUCT_PACKAGES in base_vendor.mk

Bug: 258124419
Test: build and boot cuttlefish, change effect lib path in Android.bp
and audio_effects_config.xml and bootup.

Change-Id: Ia3b9bef9b5ed86921d80adcc0ce2296f50939370
2023-02-02 03:19:53 +00:00
Pawan Wagh
f784df7cca Merge "Fixing null deference crash in audio service" 2023-02-01 23:02:12 +00:00
Pawan Wagh
6f57cd9778 Fixing null deference crash in audio service
Bug: 267517128
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I8949270b456d65e516946ffd294a5328da9de14b
2023-02-01 21:14:34 +00:00
Mikhail Naganov
5324db0668 Merge "audio: Match framework expectations for mic addresses" 2023-01-28 02:04:45 +00:00
Mikhail Naganov
b0f3d97f1a audio: Match framework expectations for mic addresses
The framework expects that "built-in mic" has address "bottom",
and the "buitl-in back mic" has address "back". This logic
will be incorporated into the XML to AIDL serializer later.

Bug: 205884982
Test: enable AIDL audio HAL on CF and run `atest CtsMediaAudioTestCases`
Change-Id: I5052b312b673e18e3148f917487b1f90a1e04ba6
2023-01-27 16:08:29 -08:00
Shunkai Yao
1d2d51a55d audio: Add API to get io handle
Add new API to fetch IO handle which is
used for offloaded effects.

Test: atest VtsHalAudioEffectFactoryTargetTest
Test: atest VtsHalAudioEffectTargetTest

Change-Id: I82abe76036507e770f0e2aed2feef7905d85a5c9
2023-01-26 18:18:32 +00:00
Shunkai Yao
ca10874012 AIDL effect: add AutomaticGainControlV1 AIDL
Bug: 261129656
Test: Compile and build, will add usage and test code in followup CL.
Change-Id: Ib20ff6e8f8fe9b7c3ac3286c5c05edc6880a44fe
2023-01-26 05:24:27 +00:00
Shunkai Yao
88b24b2dea AIDL effect: add Range for effect capabilities
Bug: 261129656
Test: Compile and build, will add usage in effect capabilities.
Change-Id: I29b80ee8b3e08fa3b6f0e5cf0e9349096adddb43
2023-01-25 19:46:10 +00:00
Treehugger Robot
0e1baf5c63 Merge "audio: Update README.md to add info about the AIDL version" 2023-01-23 18:15:31 +00:00
Shunkai Yao
32d8c29f51 AIDL effect: add VERY_HIGH level in NoiseSuppression
Bug: 261129656
Test: atest VtsHalAudioEffectTargetTest
Test: atest VtsHalNSTargetTest
Change-Id: I2afed63259f55b81101e4ae1239877d207fb740d
2023-01-21 00:37:26 +00:00
Mikhail Naganov
f3ef7fc9cb audio: Update README.md to add info about the AIDL version
Commit hashes mismatch is intentional, it seems that the previous
upstreaming left some of the downstream changes out.

Bug: 205884982
Test: N/A
Change-Id: Ia1a7879ae538a4e90aee62f9050b9d22ffa64fe7
Merged-In: Ia627e3845a078e6a4c545b13a723a6c5a038c53b
2023-01-20 21:54:17 +00:00
jiabin
b309d8dd36 Stub implementation for USB audio HAL.
Bug: 266216550
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ida4b3dbdb684dfc880a907651ae0fc398addbffc
2023-01-20 21:43:52 +00:00
jiabin
b76981e2a7 Add interfaces to query aaudio hardware information.
Add interfaces to query aaudio hardware information. The new interfaces
are supposed to replace the system properties. The information includes
aaudio mixer burst count and aaudio hardware burst minimum usec.

Bug: 193275465
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Id3442dae15937baba84f053f2e244bc294f4d718
2023-01-19 18:06:22 +00:00
Treehugger Robot
91ca65c35c Merge "audio: Add supportsBluetoothVariableLatency API to IModule" 2023-01-19 10:08:36 +00:00
Mikhail Naganov
5f477d864b audio VTS: Limit mix ports that route to attached devices
In tests that do not request and activate simulation of
connection of external devices, limit the mix port query to
return ports that can be routed to attached device ports only.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I7e77b269c07b763a5080f42ebf7ec7d0fcaee195
2023-01-17 15:34:25 -08:00
Eric Laurent
e2432ea1a7 audio: Add supportsBluetoothVariableLatency API to IModule
Add API to query if the Module supports control of variable latency over
playback paths.

Bug: 197823000
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I3a08d682a1a639d8373869725e12702fff962d53
2023-01-16 11:32:02 +01:00
Treehugger Robot
c3a910776f Merge "Add API to query mmap policy information." 2023-01-14 01:43:09 +00:00
jiabin
9a8e686628 Add API to query mmap policy information.
Bug: 193275465
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I8374a6e7942d68259d820b5de1f4ec597f1b6473
2023-01-13 22:57:34 +00:00
Andy Hung
5332cc7528 Effect: Move thread priority updates from threadLoop
Now updated in prepareForProcessing(), which avoids race
with close().

Test: atest AudioEffectTest
Test: Run spatial audio
Test: adb shell 'uclampset -a -p $(pgrep -of android.hardware.audio.service)'
Bug: 265055114
Merged-In: I31de38d54aa42d7ae3cc87d0afc4a410fc3336ad
Change-Id: I31de38d54aa42d7ae3cc87d0afc4a410fc3336ad
2023-01-13 13:48:48 -08:00
Mikhail Naganov
04ae822302 audio: Remove android.hardware.audio.core.AudioMode type
I missed that there is already android.media.audio.common.AudioMode.
However, due to use by the framework, it contains more values
(all of them are SYS_RESERVED), thus the implementation and VTS
have to be updated as well.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
Change-Id: If260413b1f774a69514de978792d5ad2eb46481a
Merged-In: If260413b1f774a69514de978792d5ad2eb46481a
2023-01-12 17:42:02 +00:00
Shunkai Yao
f1f15a1e86 Merge "Audio AIDL : Add libeffects reverb implementation uuids" 2023-01-11 19:06:32 +00:00
Shunkai Yao
5df4e6c4b0 AIDL effect: update AudioDeviceDescription to list
Bug: 261129656
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I424afb287fa97a6bf39221ba64d6af50c1d697eb
2023-01-11 17:02:21 +00:00
Shunkai Yao
b490783ad7 Merge "AIDL effect: add dynamic libraries open check" 2023-01-11 04:44:51 +00:00
Treehugger Robot
98319e92a6 Merge changes I97fd41f8,Iab3c970b
* changes:
  audio: Generalize stream implementations
  audio: Plumb IStreamOutEventCallback to the stream
2023-01-10 21:43:27 +00:00
Mikhail Naganov
f429c03d49 audio: Generalize stream implementations
This allows for more code reuse and composability when
implementing streams for a particular audio "backend."

The existing "stub" code has been moved to StreamStub* files.

Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I97fd41f87eb6d01e1d57f0d70a86d3b2b3555837
2023-01-10 19:18:42 +00:00
Shunkai Yao
e221e712f9 AIDL effect: add dynamic libraries open check
Bug: 258124419
Test: atest VtsHalAudioEffectFactoryTargetTest
Change-Id: Id6fbb7b47422eed65635e137d1b97218d6b18a91
2023-01-10 17:31:50 +00:00