Commit Graph

1839 Commits

Author SHA1 Message Date
Mikhail Naganov
a273cdde84 audio VTS: Update 7.0/PolicyConfig
The call to instantiate PolicyConfig was updated
in Iced9d665d018853c4b2a50f4471a545af7bf60bb, however
the version of PolicyConfig class for HIDL HAL 7.x
was not updated accordingly

Bug: 205884982
Bug: 281450557
Test: atest VtsHalAudioV7_0TargetTest
Test: atest HalAudioV7_0GeneratorTest
Change-Id: Ic7ed6b186e1d0f1ff853f84ad962c1e4acf17a68
2023-05-08 13:17:08 -07:00
Treehugger Robot
8182edb4ff Merge "Freeze Audio AIDL interfaces" 2023-05-02 23:28:26 +00:00
Treehugger Robot
5a9edcec4c Merge "audio: Use the canonical direction port direction in ModuleUsb" 2023-05-02 17:43:28 +00:00
Mikhail Naganov
9be1cde261 Merge "audio VTS: Update PolicyConfig after AudioPolicyConfig" 2023-05-02 16:34:46 +00:00
Shunkai Yao
dd6ec5291a Freeze Audio AIDL interfaces
Fix Visualizer and Volume type UUID

Bug: 279432911
Test: m
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I3e7d145aa37fb67d78cf05c06da22f74c0ea07ad
Merged-In: I3e7d145aa37fb67d78cf05c06da22f74c0ea07ad
2023-05-02 00:55:22 +00:00
Mikhail Naganov
64fd6bd779 audio: Use the canonical direction port direction in ModuleUsb
Instead of relying on the device type, use the 'AudioPort.flags'
field to determine the device direction.

Remove 'isUsbInputDeviceType' and 'isUsbOutputtDeviceType'
as they are too specific to particular device type and just
add a maintenance burden.

Bug: 266216550
Test: m
Change-Id: Ia1b9330c2b419a1a4048ed78d914d05c1caf523f
2023-05-01 13:34:51 -07:00
Mikhail Naganov
33a35b5ffb audio VTS: Update PolicyConfig after AudioPolicyConfig
Make necessary changes to use updated AudioPolicyConfig class.

Bug: 205884982
Test: m VtsHalAudioV6_0TargetTest
Test: atest HalAudioV6_0GeneratorTest
Change-Id: Iced9d665d018853c4b2a50f4471a545af7bf60bb
2023-05-01 13:24:05 -07:00
Jiabin Huang
cf210c83b2 AHAL: add more comment for IModule.disconnectExternalDevice
Bug: 277955540
Change-Id: I0d6a73884ab4bcfec62da45124024e8680155144
Test: TH
2023-04-27 23:06:57 +00:00
Treehugger Robot
fe4b88ab73 Merge "Add EventFlag for effect HAL thread processing" 2023-04-13 16:57:44 +00:00
jiabin
768c6f94d6 AHAL: use PCM_FORMAT_INVALID as the termination of format array.
Bug: 266216550
Test: make
Change-Id: Ibe2056eb4fdecb14c3e25daa3dbdd769d6433136
2023-04-12 23:46:55 +00:00
Shunkai Yao
41888a2f07 Add EventFlag for effect HAL thread processing
Bug: 261129656
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit

Change-Id: Ibe6052a8c2a182b33e6fe727b8606431dd2f5355
2023-04-11 00:10:50 +00:00
Mikhail Naganov
7b2d12b1f7 audio: Clarify profiles management for external devices
Clarify what should happen to mix port profiles after
connection of an external device. Add a test to verify
this behavior.

Also, add an XML file for the test runner for
VtsHalAudioCoreTargetTest.

Bug: 273252382
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I3381dd29c5922bf31fa3a8ae6fa273597e8333a1
Merged-In: I3381dd29c5922bf31fa3a8ae6fa273597e8333a1
2023-03-30 20:32:00 -07:00
Mikhail Naganov
d5536d9ac6 audio: Add some utility methods, improve logging
Add 'isDefaultAudioFormat' to Utils.h.

Print the module type in 'setModuleDebug'.

Align 'suggestDeviceAddressTag' with framework code.

Bug: 273252382
Test: m
Change-Id: I0248d2e866522a63a745d4af6132b7d2b6a01564
Merged-In: I0248d2e866522a63a745d4af6132b7d2b6a01564
2023-03-30 20:32:00 -07:00
Treehugger Robot
d14815472d Merge "DynamicsProcessing: Validate config params based on ranges advertised" 2023-03-30 04:03:07 +00:00
Treehugger Robot
a4ccb03efd Merge "Add utils for checking range limits of effect config params" 2023-03-29 03:38:28 +00:00
Ram Mohan
afdf90b679 DynamicsProcessing: Validate config params based on ranges advertised
Bug: 272195502
Test: atest VtsHalDynamicsProcessingTargetTest

Change-Id: I05233c1e56cc35c4936f0a36e92aaf7a12dda49f
2023-03-28 21:08:51 +05:30
Ram Mohan
9c47719bf7 Add utils for checking range limits of effect config params
Bug: 272195502
Test: Build

Change-Id: I1ff5af7d25e9410c58f323b6d12dbe6764e40073
2023-03-28 20:28:04 +05:30
Shraddha Basantwani
b76f5abdcb Audio : Fix ASAN crash in VTS test cases
Effect Helper should not try to access min/max values of a tag
when it is not defined.

Bug: 271912230
Test: atest VtsHalAECTargetTest.cpp (with ASAN enabled)

Change-Id: Idf47a521fbd594c83ab0fc21f2750673652b3aee
2023-03-27 17:18:18 +05:30
Shunkai Yao
ff16dd1f7b Merge "AIDL effect: Effect factory add EffectProxy information in proxy" 2023-03-24 22:54:11 +00:00
jiabin
fdee322c96 AHAL: fix StreamUsb crash.
1. By default, the DriverUsb should be standby. When there is data
   transfer request, it will exit standby.
2. Initialize alsa device profile before reading device info.
3. Open the alsa device proxy after the preparation succeed.

Bug: 266216550
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I1f0425036df176c52220320135079e7c98daa2d0
2023-03-22 22:16:13 +00:00
Jiabin Huang
b3602ca092 Merge "AHAL: fix USB HAL issues with reporting device capabilities." 2023-03-22 16:18:49 +00:00
jiabin
118c261010 AHAL: fix USB HAL issues with reporting device capabilities.
1. The card and device must be specified before reading device info.
2. Map PcmType::FIXED_Q_8_24 to PCM_FORMAT_S24_LE.
   Map PcmType::INT_24_BIT to PCM_FORMAT_S24_3LE.

Bug: 266216550
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ib48538d01bc980524e2c4c5b221f6d7e479beba6
2023-03-21 23:07:40 +00:00
Shunkai Yao
b1b8b68316 Merge "Update EffectUUID initialization" 2023-03-18 23:36:42 +00:00
Vlad Popa
429e51f4e7 Merge "CSD: rename get/setOutputRs2 to include upper bound" 2023-03-17 19:12:45 +00:00
Shunkai Yao
f8be1acde7 Update EffectUUID initialization
Avoid dynamic initialization global UUID variables

Bug: 271500140
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I7574c1fe1ba0aaff1d9d29a9eed10de1aef33806
2023-03-17 18:16:22 +00:00
Mikhail Naganov
1120ee5603 Merge "Update visibility of libaudioserviceexampleimpl" 2023-03-17 16:55:05 +00:00
Vlad Popa
4d7aa9279b CSD: rename get/setOutputRs2 to include upper bound
RS2 represents an interval of power levels. This is why it is clearer to
specify upper bound in the naming to make it clear that we refer to the
upper limit which when exceeded will trigger a momentary exposure.

Test: atest VtsHalAudioCoreTargetTest
Bug: 273961110
Change-Id: If4e065deeedb32c3e5e81caf4cd6924fb5815dc0
Merged-In: If4e065deeedb32c3e5e81caf4cd6924fb5815dc0
2023-03-17 02:57:47 +01:00
Mikhail Naganov
776e65e35f Update visibility of libaudioserviceexampleimpl
In order for vendors to be able to use this library
it needs to have public visibility.

Bug: 205884982
Test: m
Change-Id: Idd47c942ee1e97372047ec1b44bcd996d454e3e2
2023-03-15 09:29:16 -07:00
Xin Li
82e0eca1c4 Merge "Merge Android 13 QPR2" 2023-03-14 21:40:25 +00:00
Shunkai Yao
d30ff8fb80 Add some Effect type UUID and offload indicater in common parameter
Bug: 271500140
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I61ebf268600564cb5abddc90979070b675a85541
2023-03-14 16:07:25 +00:00
Treehugger Robot
99e5af4b2f Merge "audio: Put audio/aidl/common/include/Utils.h into 'aidl' NS" am: 7260130baf
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2480537

Change-Id: If989453ea55808d193adca90d73b779605376831
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 23:08:37 +00:00
Treehugger Robot
7260130baf Merge "audio: Put audio/aidl/common/include/Utils.h into 'aidl' NS" 2023-03-10 22:31:37 +00:00
Mikhail Naganov
104c4286f5 Merge "audio: Add offload reconfiguration event to IBluetoothLe" am: b708d292d3
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2480536

Change-Id: I9494995912345c8ad775ecb477a271f254b64d6a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 22:14:47 +00:00
Mikhail Naganov
b708d292d3 Merge "audio: Add offload reconfiguration event to IBluetoothLe" 2023-03-10 22:06:22 +00:00
Treehugger Robot
0f3597e7d5 Merge "audio test service guaranteed log" am: 6b466603c6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2472165

Change-Id: I841237e0eac97aed4cd05cfac5d5005ea947b27d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 21:41:21 +00:00
Treehugger Robot
6b466603c6 Merge "audio test service guaranteed log" 2023-03-10 21:30:14 +00:00
Mikhail Naganov
b4f8e67e1c audio: Add offload reconfiguration event to IBluetoothLe
Since BT LE can also have offloaded codecs, it might need
a reconfiguration event similar to the one that BT A2DP
receives.

Bug: 272658632
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I04fb7c99f0457f87e1f4aaf7e77165317163387b
2023-03-10 12:44:52 -08:00
Mikhail Naganov
872d4a6518 audio: Put audio/aidl/common/include/Utils.h into 'aidl' NS
These utilities are for types generated from AIDL. Since
the types end up in the 'aidl' namespace (NDK backend), it makes
sense to keep the utilities in the same namespace.

While changing the namespace, I've found numerous useless
includes of 'Utils.h' and removing them, also reorganizing
lists of includes along the way to match the style guide.

Bug: 205884982
Test: m
Test: atest --test-mapping hardware/interfaces/audio/aidl/TEST_MAPPING
Change-Id: Ib23b47092364046f632f9503b92b9baff5b902f5
2023-03-10 11:34:31 -08:00
Shunkai Yao
94c87272b2 Merge "Add sleep in EffectThread to avoid busy wait" am: ac46ddb969
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2478089

Change-Id: Ia72d2a551b6875f7f41128432405015857f2fc5a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 02:47:03 +00:00
Shunkai Yao
ac46ddb969 Merge "Add sleep in EffectThread to avoid busy wait" 2023-03-10 02:18:30 +00:00
Treehugger Robot
431c0d4dff Merge "audio: Add vendor tags handling for AIDL" am: a3a1c665fb
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2479295

Change-Id: Ib4dfa979c57815a0cf203c6362492f5c5b44a4d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 18:54:21 +00:00
Treehugger Robot
a3a1c665fb Merge "audio: Add vendor tags handling for AIDL" 2023-03-09 18:22:51 +00:00
Shunkai Yao
eae5c56fb4 Add sleep in EffectThread to avoid busy wait
Bug: 261129656
Test: Enable AIDL and run YTM on pixel phone
Change-Id: If7ea5324b8a884e8f07b6855b70cb33b4c7868e4
2023-03-09 02:30:15 +00:00
Mikhail Naganov
817da7d0be audio: Add vendor tags handling for AIDL
Vendor tags are used in audio attributes and in
source/sink metadata. The definition for vendor tag
syntax is the same as it used to be in HIDL.

Bug: 205884982
Bug: 272188499
Test: m
Change-Id: Iffab15edaec10f0dfccff2512bbff9dff557725a
2023-03-08 17:40:35 -08:00
Mikhail Naganov
1202d57e63 audio: Add IBluetoothLe am: b5647da1ad
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2477536

Change-Id: I00c7d4d4114acd560ce77f302142aabf9e9ed426
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 19:09:25 +00:00
Mikhail Naganov
b5647da1ad audio: Add IBluetoothLe
Similar to IBluetooth and IBluetoothA2dp interfaces,
IBluetoothLe controls the LE profile. This interface
replaces the following string parameter:

"LeAudioSuspended"

Bug: 270731693
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I9df28053cd270fc2d446ba9a8ada4dd6ab761c7b
Merged-In: I9df28053cd270fc2d446ba9a8ada4dd6ab761c7b
2023-03-08 09:28:00 -08:00
Shunkai Yao
4c4f3cd153 AIDL effect: Effect factory add EffectProxy information in proxy
Effect factory have the knowledge of all effect configurations, in the
default implementation, this configuration defined in
audio_effects_config.xml.

Bug: 261129656
Test: Enable AIDL, atest
CtsMediaAudioTestCases: android.media.audio.cts.BassBoostTest
Test: atest VtsHalAudioEffectTargetTest
Change-Id: Ie9bd4070acdca53c4236bae533957b8fde6e9183
2023-03-08 01:53:05 +00:00
Treehugger Robot
1dbc39ea23 Merge "audio: Add IStreamCommon.prepareToClose method" am: 940ca8996a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2475087

Change-Id: Ie919fad86d8da35b0fa297bcf66e4322d0ae0611
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 21:15:55 +00:00
Mikhail Naganov
7c0a635b6d Merge "audio: Make I/O operations in default stub more realistic" am: b862e6e20b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2473366

Change-Id: Ife2fe1318f7603d61b7ff0d5e22a69a9348f7341
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 17:42:13 +00:00
Mikhail Naganov
6f3474a98e audio: Add IStreamCommon.prepareToClose method
This method is needed to implement HAL modules that
are proxies for other subsystems, for example
the "bluetooth" and "r_submix" modules. This method
replaces string parameters "exiting=1" and "closing=true"
which the framework sends to streams prior to closing
them in order to unblock the I/O thread of the stream.

Bug: 270731693
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I3d13fe34535ab853c9f8237a08c31cdafadbb390
Merged-In: I3d13fe34535ab853c9f8237a08c31cdafadbb390
2023-03-07 09:41:08 -08:00