Commit graph

361 commits

Author SHA1 Message Date
jiabin
29e72cf30c AHAL: fix StreamUsb crash. am: fdee322c96 am: 1befadd762 am: 99e1788db0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2504016

Change-Id: Ia2af7dc363ab89f52eb7a25488678e16b8ffd98b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-23 02:36:53 +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
91687e88b5 Merge "AHAL: fix USB HAL issues with reporting device capabilities." am: b3602ca092 am: abf4b3becc am: ada4a74c2c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2501017

Change-Id: I1bb0ad29b7c221d26115421aad8842cb6a8919ca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22 17:43:05 +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
4b3434f96e 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-20 01:48:10 +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
Mikhail Naganov
fd0e4b68d5 Merge "Update visibility of libaudioserviceexampleimpl" am: 1120ee5603 am: f9199100ac am: 93c8497361
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2490615

Change-Id: Icddae265b5c7e8b634079501bd1e8bc49e0caf91
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 18:45:14 +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
Vlad Popa
34f4c1d5d7 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
2023-03-16 19:37:18 +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
Shunkai Yao
9dcf22d093 Merge "Add some Effect type UUID and offload indicater in common parameter" am: 54cec778ee am: 7062a4849b am: 3c7c189ae4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2485228

Change-Id: I2908c76ca911dbd985f0cbfba7d5116c6c938638
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-14 21:23:13 +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
b003b30bda Merge "audio: Put audio/aidl/common/include/Utils.h into 'aidl' NS" am: 7260130baf am: 99e5af4b2f am: 881ed49811
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2480537

Change-Id: Icdfb08048b1a56772b14d88e090e1e57f2d36a00
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-13 12:31:38 +00:00
Mikhail Naganov
866765cd38 Merge "audio: Add offload reconfiguration event to IBluetoothLe" am: b708d292d3 am: 104c4286f5 am: 8a4322c223
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2480536

Change-Id: Iedde53678fb2f1652673ff85ad33726b3ad63a0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 22:50:26 +00:00
Treehugger Robot
669161cd04 Merge "audio test service guaranteed log" am: 6b466603c6 am: 0f3597e7d5 am: d12b7385ce
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2472165

Change-Id: I6c283d308071b3b67a3f5bfdd234b92a09289c69
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-10 22:50:08 +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
b708d292d3 Merge "audio: Add offload reconfiguration event to IBluetoothLe" 2023-03-10 22:06:22 +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
3b05ed321c Merge "Add sleep in EffectThread to avoid busy wait" am: ac46ddb969 am: 94c87272b2 am: 8252228622
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2478089

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

Change-Id: I95ecf848c34686c81b766dc9ba6d0e46b60db23f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 20:13:52 +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
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
Mikhail Naganov
4fae319d0a 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
2023-03-07 15:17:59 -08:00
Mikhail Naganov
a2145b3994 Merge "audio: Make I/O operations in default stub more realistic" am: b862e6e20b am: 7c0a635b6d am: b91c536372
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2473366

Change-Id: Id9488d2642f7303211cf2fa108ac694a7c393b6d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 20:44:21 +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
Mikhail Naganov
389ba3fa57 Merge "audio: Add IStreamCommon.prepareToClose method" into udc-dev 2023-03-07 17:12:16 +00:00
Mikhail Naganov
b862e6e20b Merge "audio: Make I/O operations in default stub more realistic" 2023-03-07 17:11:05 +00:00
Treehugger Robot
7bda5e0fc8 Merge "Add vendor extension effect example" am: 9e741d67b5 am: 449402300f am: 6e7b5f0698
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2470400

Change-Id: Ib8423d2dbe8162f7d4d014fda0877832419128c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 04:20:38 +00:00
Mikhail Naganov
e48e5737f3 audio: Make I/O operations in default stub more realistic
1. Increase the minimum buffer size to 256 frames. This is
   more realistic than 16 frames: 256 frames is ~5ms @ 48 kHz.

2. Make transfer delay in the stub module dependent on the frame
   count for synchronous transfers.

Bug: 270154517
Test: atest VtsHalAudioCoreTargetTest
Test: atest android.media.audio.cts.LoudnessEnhancerTest (w/AIDL enabled)
Change-Id: If968e30d145b52220f4dc3c33af48dbc163c78cd
2023-03-06 18:51:03 -08:00
Treehugger Robot
9e741d67b5 Merge "Add vendor extension effect example" 2023-03-07 02:22:08 +00:00
Mikhail Naganov
d0641b0d5a 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
2023-03-06 15:44:05 -08:00
Steven Moreland
705c39b274 audio test service guaranteed log
The logs in this service and others disappear sometimes.

Bug: 210919187
Test: logd_integration_test
Change-Id: I63b88ec4b88048ed64907df21d5a049a3abda2ec
2023-03-06 14:30:49 +00:00
Treehugger Robot
b3a5c66d4c Merge "Do not include internal GTest header." am: 1a6e2031fc am: 453240f61f am: da5022e6f5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2469730

Change-Id: I36f5c75a6e053144acceabb88da92b135c9bdef4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-04 08:27:11 +00:00
Treehugger Robot
1a6e2031fc Merge "Do not include internal GTest header." 2023-03-04 02:14:36 +00:00
Shunkai Yao
b2325e55e9 Add vendor extension effect example
Update Parameter.id from int to ParcelableHolder

Bug: 271601435
Test: Build, atest VtsHalAudioEffectTargetTest
Change-Id: I5450fa90e95bdebe931c222f6bb177dbdef35c69
2023-03-04 02:01:33 +00:00
Krzysztof Kosiński
a3a78a688d Do not include internal GTest header.
Only the headers gtest.h and gtest-spi.h are public.  This
inclusion is causing a build break when upgrading googletest
to version 1.13.0.

Bug: 271622675
Test: local build, presubmit
Change-Id: I698e4d4464c131e9dad73a23a6f65908a07e9f60
2023-03-04 00:58:52 +00:00
Mikhail Naganov
93a950ecd1 Merge "audio: Make libaudioserviceexampleimpl just 'library'" am: 79cb295819 am: 95ba30ccbb am: bc6c55f5a0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2464079

Change-Id: I03db50ce15077d031d7d26e7bfcf23989c663f18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-03 17:31:23 +00:00
Mikhail Naganov
79cb295819 Merge "audio: Make libaudioserviceexampleimpl just 'library'" 2023-03-03 00:00:08 +00:00
Mikhail Naganov
d48a13b1bd audio: Make libaudioserviceexampleimpl just 'library'
Remove the '_static' suffix to allow vendors compile
it as a dynamic library if needed.

Add missing dependency on SoundDose interface libs.

Bug: 205884982
Test: m
Change-Id: Id85945c7c680d1a718e2d692ffd435f30c029521
2023-03-02 14:14:05 -08:00
Treehugger Robot
aee7c9ea29 Merge "AHAL: support volume control for USB audio HAL." am: 0abca2170b am: d8b77aef82 am: 3c0a057026
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2461293

Change-Id: Ief3a45a4aca47fdfab780a80e03480a4de019eef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-02 19:13:49 +00:00
Treehugger Robot
0abca2170b Merge "AHAL: support volume control for USB audio HAL." 2023-03-02 17:19:36 +00:00