Commit graph

762 commits

Author SHA1 Message Date
Jooyung Han
e5596af7e1 Merge "Install bluetooth audio VINTF fragment in apex" into main am: 0cacd8c7f5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2949685

Change-Id: I043fbc9d39e21537b05e66d31d962addaaf8eb02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-06 01:20:20 +00:00
Shunkai Yao
7e2c3719ff Add backward compatibility in effect hal default implementation
Skipping the reopen sequence for unsupported version
Add member initialize for EffectContext

Bug: 322780092
Test: latest libAudioHal with V1 effect HAL
Test: atest VtsHalAudioEffectTargetTest

Change-Id: I597194e5ebf25566d5adda533e151da2e99781f4
2024-02-05 22:58:54 +00:00
Jooyung Han
92ca5545ca Install bluetooth audio VINTF fragment in apex
Previously, android.hardware.bluetooth.audio-impl was installed with no
use and the attached vintf was fulfilled by the
com.android.hardware.audio apex.

For cleanup, we no longer install android.hardware.bluetooth.audio-impl
separately (for cuttlefish) and install the VINTF inside the apex.

Bug: 312265159
Test: atest VtsHalBluetoothAudioTargetTest
Change-Id: I31e0ccd6a8c3c00565159f2be7fe3bf4d70e9ddf
2024-02-05 11:04:02 +09:00
Shunkai Yao
4221f8783d Merge "Effect: verify all AIDL IEffect versions are same as IFactory" into main am: 047484de60
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2945531

Change-Id: I4ca7e560dbe9a60dfb8b9420493edf5628e8560d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 20:39:08 +00:00
Mikhail Naganov
64edc33110 Merge "audio: Move stable libaudioclient tests to presubmit for the AIDL HAL" into main am: cb49cde0ad
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2893423

Change-Id: I2f827ef54fed5f2ed80cf64176bb7dd199f46de8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 20:36:44 +00:00
Shunkai Yao
047484de60 Merge "Effect: verify all AIDL IEffect versions are same as IFactory" into main 2024-02-02 20:23:29 +00:00
Mikhail Naganov
cb49cde0ad Merge "audio: Move stable libaudioclient tests to presubmit for the AIDL HAL" into main 2024-02-02 19:53:44 +00:00
Jooyung Han
3f23aa7523 Merge "Use LLNDK guard instead of builtin_available" into main am: 63b64e2995
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2943125

Change-Id: I85ae07b6cd65ac885f18dff099444573369dd528
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-02 02:19:53 +00:00
Jooyung Han
63b64e2995 Merge "Use LLNDK guard instead of builtin_available" into main 2024-02-02 01:58:22 +00:00
Shunkai Yao
910a8153b2 Effect: verify all AIDL IEffect versions are same as IFactory
Bug: 322780092
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: If47f70b9d8f72a45f3ecf927294fb93fda28851b
2024-02-02 01:46:09 +00:00
Mikhail Naganov
03761c7e8e audio: Move stable libaudioclient tests to presubmit for the AIDL HAL
These framework-side tests are helpful in detecting breakages
caused by changes in the HAL code.

Data from postsubmit runs:

Test module audioeffect_tests: Latency (p90): 3s, Flakiness: 0.00%
Test module trackplayerbase_tests: Latency (p90): 13s, Flakiness: 0.00%

Bug: 311830316
Test: presubmit
Test-Mapping-Slo-Bypass-Bug: b/318425155
Change-Id: I5c329239cd3890e98edc74283bc9edb83e7e7ba7
2024-02-01 10:47:21 -08:00
Jooyung Han
23e5bf2873 Use LLNDK guard instead of builtin_available
APEXSUPPORT_API was a workaround when we had no support for
__ANDROID_VENDOR_API__. Since we have it now, use it instead of
builtin_available(android APEXSUPPORT_API).

Bug: 302088370
Test: CtsMediaAudioTestCases
Change-Id: I28b0e0ebab5f357a2f5cc29f244ae5494e379fbe
2024-02-01 12:49:35 +09:00
Treehugger Robot
178592e696 Merge "AHAL: add default values for dynamic port config of hardcoded config." into main am: a64a264f2d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2941766

Change-Id: I06ea348c29c0d4ed3055884f0151f2974b508f4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-02-01 02:16:04 +00:00
Treehugger Robot
a64a264f2d Merge "AHAL: add default values for dynamic port config of hardcoded config." into main 2024-02-01 01:42:36 +00:00
jiabin
129b145133 AHAL: add default values for dynamic port config of hardcoded config.
If the values(format, sample rate, channel mask) are left as unset, they
will be null. In that case, when using them will require checking
nullablitiy to avoid crash.

Bug: 323255506
Test: make and boot
Change-Id: Ic66bf0b6f53750ff8700e531cca13f03fbb72936
2024-01-31 23:56:26 +00:00
Treehugger Robot
8eb4b053f7 Merge "audio: Add tracing to audio I/O and effect processing" into main am: c02d38d7b7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2940231

Change-Id: I8628b1e11def48298f8f4adde20d49ebd9aaa05c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 23:49:06 +00:00
Shunkai Yao
bb110f463d Merge "BassBoost Process: Add tests to validate Bass Boost Process." into main am: 2d1e1bd332
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2923712

Change-Id: I063b9c8f0de2c67436a6093881026037f71eb118
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 23:48:11 +00:00
Treehugger Robot
c02d38d7b7 Merge "audio: Add tracing to audio I/O and effect processing" into main 2024-01-31 23:26:42 +00:00
Shunkai Yao
2d1e1bd332 Merge "BassBoost Process: Add tests to validate Bass Boost Process." into main 2024-01-31 23:25:28 +00:00
Mikhail Naganov
89a6bb7199 audio: Add tracing to audio I/O and effect processing
Emit trace events for audio reads and writes and effect
processing functions. This is to match the HIDL implementation.

Bug: 321233946
Test: `record_android_trace` with `audio` category enabled
Change-Id: I26907b09243fd3e5aaa470a0fb930b34addd3093
2024-01-31 14:19:08 -08:00
Aditya Choudhary
85d604d0db [DON'T BLOCK] Test ownership migration rules am: c5c6c62995
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2939799

Change-Id: I1046113ffdcd09649fa65e023aae0969262772e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 17:06:10 +00:00
Aditya Choudhary
c5c6c62995 [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
<add g3 doc link>

Bug: 304529413
Test: N/A
Change-Id: I3322344f595f974f730dc824af0110388076d838
2024-01-31 11:06:17 +00:00
Sneha Patil
e584923d98 BassBoost Process: Add tests to validate Bass Boost Process.
Added methods to set and validate parameters.
Added test to verify increasing strengths.

Bug:305866207
Test: atest VtsHalBassBoostTargetTest
Change-Id: I64e06deca199b3acc53eb15cf2007e6db27430f3
2024-01-31 14:13:02 +05:30
Shunkai Yao
e491392e99 vts: update SetCommonParameterAndReopen to DataPathTest am: d685aed029
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2937539

Change-Id: Iad2853dd3854db6a81cb991a9704941ec5191235
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-31 01:09:00 +00:00
Xin Li
763c473c3d Merge Android 24Q1 Release (ab/11220357)
Bug: 319669529
Merged-In: I976f80006aeb88bde2ae34ca4f9be72cea727d9e
Change-Id: Id94b25af52bd2e2847b6858697ab21cc6ce27aa3
2024-01-30 10:36:50 -08:00
Shunkai Yao
d685aed029 vts: update SetCommonParameterAndReopen to DataPathTest
Bug: 323010068
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I05519481b69bb752f515bd54cb1eab0996ad5433
2024-01-30 18:35:26 +00:00
Treehugger Robot
320ef27af2 Merge "audio: Reduce the interval between BT proxy registration retries" into main 2024-01-29 23:00:57 +00:00
Mikhail Naganov
19de94764d audio: Reduce the interval between BT proxy registration retries
A follow-up for aosp/2929441. The interval between retries
of connecting to BT proxy must be reduced significantly.
Otherwise, in situations when the BT is not connected
(that happens during tests), the resulting long delay causes
failures at the frameowork level due to resulting long
timeout.

Bug: 322820830
Test: atest audiosystem_tests --iterations 100
Change-Id: Idd84cb22b28d109151f98bb5883dca18a9ae928d
2024-01-29 13:40:27 -08:00
Shunkai Yao
db9b8f08da Merge "Update work buffer size with input/output frame size change" into main 2024-01-29 18:51:47 +00:00
Mikhail Naganov
3552515d70 Merge "audio: Add retries for BT proxy port registration" into main 2024-01-29 17:17:56 +00:00
Mikhail Naganov
a5c0437327 audio: Add retries for BT proxy port registration
When ModuleBluetooth::createProxy is invoked on BT device
connection, the BT stack may not be fully ready yet,
and port registration can fail. This is an intermittent
state and registration should succeed after retrying.

Bug: 320838889
Test: atest pts-bot:A2DP/SRC/REL/BV-02-I
Change-Id: I0c7cf7c1c6a8ee03ef55b004f89139e3b56ee9cd
2024-01-26 16:19:45 -08:00
Shunkai Yao
08c05dd017 Update work buffer size with input/output frame size change
call process with the minimal of input/output fmq data capacity

Bug: 321543210
Test: atest VtsHalAudioEffectTargetTest
Test: flash to pixel phone and test audio
Change-Id: I0c5087f541dc8526ac733a0c35f0d06f878d78a1
2024-01-26 18:59:13 +00:00
Bart Van Assche
5e7fcb4bbd Remove superfluous include directives
Remove #include "AudioHalBinderServiceUtil.h" from source files that do
not use the AudioHalBinderServiceUtil class directly.

Change-Id: Iff085856df91c2818dbd06bf790233cbb82a3379
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-01-23 14:19:27 -08:00
Deyao Ren
0874626d77 Create vendor apex for cuttlefish audio and audio effect
Test: launch cuttlefish, CtsMediaAudioTestCases
Bug: 295803971
Change-Id: I056c3e81662f90207702b47664c23b7ddd1db378
2024-01-17 07:12:07 +00:00
Shunkai Yao
78265377d9 Merge "Effect VTS: update VtsHalDownmixTargetTest for data validation" into main 2024-01-13 03:50:02 +00:00
Treehugger Robot
759fb98667 Merge "audio: Fix handling of a thread exit command with a bad cookie" into main 2024-01-13 00:40:04 +00:00
Mikhail Naganov
1850779bc4 audio: Fix handling of a thread exit command with a bad cookie
In case when the command was sent by the HAL itself (from another
thread), the worker thread must not post a reply. The only case
when a reply needs to be posted is in the case when the command
was sent from a VTS test. This case is identified by the fact that
the cookie has value '0'.

Bug: 300181540
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ifeb0722b5cf7346a694c5a938f6b324f5fa825f1
2024-01-12 13:59:24 -08:00
Shunkai Yao
1319e986ab Effect VTS: update VtsHalDownmixTargetTest for data validation
For downmix, the output buffer size can be diff with input

Bug: 318926783
Bug: 317946442
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I0dc0009e1779b842a4f3cdcc047d225310a304f9
Merged-In: I0dc0009e1779b842a4f3cdcc047d225310a304f9
2024-01-12 21:54:17 +00:00
Treehugger Robot
7f25c70740 Merge "audio: Skip AudioModuleRemoteSubmixTest on Android U" into main 2024-01-12 21:10:04 +00:00
Shunkai Yao
3eb2a2c14f Merge changes from topic "effect_reopen" into main
* changes:
  Effect AIDL: implement IEffect.reopen
  Effect AIDL: add IEffect.reopen to update the effect instances data FMQ
2024-01-12 21:06:08 +00:00
Mikhail Naganov
b2dab17b1e audio: Skip AudioModuleRemoteSubmixTest on Android U
This test was developed after Android U was cut, and it assumes
the new way of encoding of the remote submix device type.

Bug: 300181540
Test: run `atest VtsHalAudioCoreTargetTest` on UDC GSI
Change-Id: If53f92a55734e18a2acce6c790f9e5e259246684
2024-01-12 10:38:03 -08:00
Shunkai Yao
65c7c7051d Effect AIDL: implement IEffect.reopen
- add IEffect.reopen implementation
- now data MQs can update at runtime, sync
  EffectContext access
- add clang thread annotation

Bug: 302036943
Test: atest VtsHalAudioEffectTargetTest
Test: build and test audio effect on Pixel
Change-Id: I3e9fdc2d5eb50b8c1377e0da75573f0eba7ea3f1
Merged-In: I3e9fdc2d5eb50b8c1377e0da75573f0eba7ea3f1
2024-01-12 17:23:28 +00:00
Shunkai Yao
5b15e005a9 Effect AIDL: add IEffect.reopen to update the effect instances data FMQ
The effect instance may choose to reallocate the input data message
queue under specific conditions. For example, when the input format
changes, requiring an update to the data message queue allocated during
the open time.
In such cases, the effect instance can destroy the existing data message
queue, when the audio framework see a valid status MQ and invalid data MQ,
it call reopen to get the new data message queue.

Bug: 302036943
Test: m android.hardware.audio.effect-update-api, m
Change-Id: Ia245b154176f64bc3cc6e6049bca4f9c68ad482d
Merged-In: Ia245b154176f64bc3cc6e6049bca4f9c68ad482d
2024-01-12 17:23:14 +00:00
Mikhail Naganov
18fcb688bc Add android.virtualdevice.cts.VirtualAudioTest to postsubmit
These tests exercise audio playback and capture on CF and are
useful in spotting issues in the audio pipeline end-to-end.

Bug: 316017930
Test: atest CtsVirtualDevicesTestCases
Change-Id: If625cec5bc2d281f1e0d99b820f604f1bac7b621
2024-01-11 09:54:50 -08:00
Treehugger Robot
7fe11fd93d Merge "audio: Add libaudioclient tests to postsubmit for the AIDL HAL" into main 2024-01-10 23:02:04 +00:00
Mikhail Naganov
ff52e4fcba audio: Add libaudioclient tests to postsubmit for the AIDL HAL
These framework-side tests are helpful in detecting breakages
caused by changes in the HAL code.

Add to postsubmit first because the presubmit check does not
allow adding to presubmit without accumulating some history first.

Bug: 311830316
Test: atest
Change-Id: I1f946c71a89117d25f39fde34877988ea7e1d466
2024-01-10 13:47:57 -08:00
Mikhail Naganov
198e8f747c Merge "audio: Improve logging in remote submix module" into main 2024-01-10 17:53:05 +00:00
Treehugger Robot
a10d3c536f Merge "Audio Effect : Add checks to validate the channel count" into main 2024-01-10 01:46:59 +00:00
Mikhail Naganov
9eb3314a24 audio: Improve logging in remote submix module
Implement IModule::dump to display the current state in
the audioflinger dump.

Throttle repetitive logging when there is nothing to read.

Remove stale comment for already fixed b/307586684.

Bug: 307586684
Test: adb shell dumpsys media.audio_flinger
Change-Id: I1f1f6e1658d035d46af3a933a825b20a78c7f297
2024-01-09 14:13:15 -08:00
Shraddha Basantwani
a3d4847794 Audio Effect : Add checks to validate the channel count
Bug: 302036943
Test: atest audioeffect_analysis
Change-Id: Ic64394e646fa23e02e499c2f01ef3bd4490450d2
2024-01-09 10:37:54 +00:00
Mikhail Naganov
e3ed739865 Merge "audio: Fix the type used for timekeeping" into main 2024-01-04 01:26:12 +00:00
Shunkai Yao
d090afe1af Update comment about headTrackingSensorId
Bug: 317405349
Test: m, aidl-format
Change-Id: I5f4b0e931c073d87b1a30a55c39e614d24a63030
2024-01-03 19:50:15 +00:00
Mikhail Naganov
878afae8f8 audio: Fix the type used for timekeeping
On 32-bit builds, the 'long' type is 32 bit. Thus, it can not
be used to store the value returned from 'uptimeNanos'.

Bug: 318055805
Test: atest CtsMediaAudioTestCases
Change-Id: I4abf72415b7241728d3ddb1d11043dfd59a8d08a
2024-01-03 11:27:31 -08:00
Shunkai Yao
6b7784edfe Audio Effect VTS: run Dowmmix data path test only after HAL version 2
Bug: 315074570
Test: VtsHalDownmixTargetTest
Change-Id: Iaa17519521f136901ec217f7d5b5fd0d03889533
2024-01-03 18:46:00 +00:00
Mikhail Naganov
27719f12e8 Revert "Add remote submix direct paths"
This reverts commit ce9767a966.

Please see the comment on aosp/2832731. This configuration
leads to anomalous framework behavior.

Bug: 311830316
Test: atest audiorouting_tests
Change-Id: I5be3ac18819e297aa199c5a0f5d2e85758448b4b
2023-12-27 15:54:30 -08:00
Mikhail Naganov
b80de7bcd7 audio: Add test configs for effects VTS tests
The main purpose of the config is to shut down the framework
audioserver while the VTS test is running. This is achieved by
setting 'vts.native_server.on' to '1'. Without this, restarts
of the effects HAL process which are a normal part of tests
affect the audioserver and may lead to failures of framework
tests that run interleaved with these VTS tests.

Bug: 264712385
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts
Change-Id: I2515cb62e46ef8e93cbddb2c0219f4523d2ecda5
2023-12-27 15:54:30 -08:00
Mikhail Naganov
eafa78c929 Merge changes from topic "fix-aidl-mix-ports-and-bt" into main
* changes:
  audio: Fix BT AIDL HAL module implementation
  audio r_submix: Suggest configuration from the peer
  audio: Refactor configuration population
2023-12-27 03:42:02 +00:00
Mikhail Naganov
a88cf60b87 audio: Fix BT AIDL HAL module implementation
In order to align with legacy behavior, when opening a stream,
the module must suggest the current configuration of the BT session.
For that to work, the BT device proxy must be opened prior
to creating a stream, code moved to ModuleBluetooth.

Fix minor inconsistencies and bugs found during testing.

Bug: 301213930
Bug: 316027906
Test: atest pts-bot
Change-Id: I04ddaf73be82f872a3f32a789563c3cbd648eb61
2023-12-26 16:34:58 -08:00
Mikhail Naganov
3b732895a8 audio r_submix: Suggest configuration from the peer
When there is a pipe established for a remote submix
device, suggest the configuration of the peer when opening
the other end.

Refactor SubmixRoute management to move it out from
StreamRemoteSubmix so that ModuleRemoteSubmix could also
use it.

Bug: 294962274
Test: atest audiorouting_tests
Change-Id: Ib31a662e7b65b92c614dc441a01160cae3485f3a
2023-12-26 10:31:43 -08:00
jiabin
d470926597 AHAL: update doc for prepareToDisconnectExternalDevice.
Bug: 317405349
Test: make
Change-Id: If6c61a851c2e565ab16eb738b9dc0d42ebc04b05
2023-12-21 23:20:56 +00:00
Mikhail Naganov
a92039ac48 audio: Refactor configuration population
In 'Module::setAudioPortConfig' allow subclasses to provide
their own suggested configuration.

In 'Module::populateConnectedDevicePort' provide the ID of
the device port instance that will be created as a result
of connecting an external device.

Also, expose 'ModuleDebug' flags to subclasses so that they
can know when device connections are simulated.

Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Iceb2bdeb61c3470554b592fe197efa54d3b9e578
2023-12-20 14:31:47 -08:00
Shunkai Yao
52da94e290 Effect AIDL: cleanup dependencies
Bug: 316236907
Test: Enable AIDL and build
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts
Change-Id: Id1e28b5852a1a8c154f31f4918326de7df8bfc54
2023-12-19 00:37:36 +00:00
Shunkai Yao
1283685b4f Update VTS header includes
Bug: 273373363
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts
Change-Id: I2ad63f91b013db1ce2d3891216f1bd74606139c8
2023-12-19 00:36:49 +00:00
Shunkai Yao
f60fc373d9 Spatializer default implementatoin with VTS
Bug: 273373363
Test: atest VtsHalSpatializerTargetTest
Test: atest VtsHalAudioEffectTargetTest

Change-Id: I41218661ac7265723258303438dd01f704838188
2023-12-18 16:36:59 +00:00
Dean Wheatley
ce9767a966 Add remote submix direct paths
Explicitly reject remote submix non PCM input or output streams.

Bug: 311830316
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I3da9282d0f4ecb91dea65f784294e94436765538
2023-12-14 16:06:40 +11:00
Mikhail Naganov
6f69fb3608 Merge "audio: Fix remote submix behavior with multiple inputs" into main am: fb29f53f53 am: 06fef676a6 am: 6603708d1e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2871775

Change-Id: I5b12d76acfd7229554c730b0526685022688276d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-13 19:32:38 +00:00
Treehugger Robot
0d3349c717 Merge "AHAL: add API to notify the HAL module about disconnecting device." into main 2023-12-13 18:40:21 +00:00
Mikhail Naganov
fb29f53f53 Merge "audio: Fix remote submix behavior with multiple inputs" into main 2023-12-13 17:45:13 +00:00
Treehugger Robot
e91038dfc4 Merge "Audio AIDL : Pick PreProcessing library for 2 audio effects" into main am: 71f56141e7 am: d02973eac8 am: 56df6b5fa0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2870276

Change-Id: Iffa33b0a642d62d1d1a0cbebc1ea3320b1b4c237
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-13 08:44:13 +00:00
jiabin
dd23b0e58e AHAL: add API to notify the HAL module about disconnecting device.
When external device is about to disconnect, the audio framework will
notify the HAL module about the coming device disconnection so that the
HAL module could abort any active read/write operations on drivers to
avoid problems with the HW interfaces.

Bug: 279824103
Test: atest VtsHalAudioCoreModuleTargetTest
Change-Id: I9f960b8ae5df11a764e70bd63f98c0f8b8386c34
Merged-In: I9f960b8ae5df11a764e70bd63f98c0f8b8386c34
2023-12-13 01:02:21 +00:00
Mikhail Naganov
7b234d483f audio: Fix remote submix behavior with multiple inputs
Align the behavior of the new implementation with the legacy
implementation in the case when the client opens multiple
input streams on the same remote submix device.

Reduce the HAL buffer size to match legacy behavior.

Bug: 264712385
Test: atest CtsVirtualDevicesTestCases --test-filter=".*VirtualAudioTest.*"
(cherry picked from commit a83c8a5518)
Change-Id: I6f5e6a2c133059c66269b1bdd8a30392db282c4d
2023-12-12 15:55:22 -08:00
Shunkai Yao
0347f0eff0 Revert "audio: Fix remote submix behavior with multiple inputs"
Revert submission 2862771-cuttlefish_aidl_audio-2

Reason for revert: b/316027906

Reverted changes: /q/submissionid:2862771-cuttlefish_aidl_audio-2

Change-Id: I68932be8dad4b4fd4214d0ae6fc01202727f1658
2023-12-12 22:55:59 +00:00
jiabin
bc79ff19e8 AHAL: add API to notify the HAL module about disconnecting device.
When external device is about to disconnect, the audio framework will
notify the HAL module about the coming device disconnection so that the
HAL module could abort any active read/write operations on drivers to
avoid problems with the HW interfaces.

Bug: 279824103
Test: atest VtsHalAudioCoreModuleTargetTest
Change-Id: I9f960b8ae5df11a764e70bd63f98c0f8b8386c34
2023-12-12 17:44:28 +00:00
Sneha Patil
71b814c4b7 Audio AIDL : Pick PreProcessing library for 2 audio effects
Bug: 305866207
Test: atest VtsHalAECTargetTest
Test: atest VtsHalNSTargetTest
Change-Id: I4fcd95abe6834dec13e570ad2ecb5cd4f1bdc1d3
2023-12-12 17:51:00 +05:30
Mikhail Naganov
a83c8a5518 audio: Fix remote submix behavior with multiple inputs
Align the behavior of the new implementation with the legacy
implementation in the case when the client opens multiple
input streams on the same remote submix device.

Reduce the HAL buffer size to match legacy behavior.

Bug: 264712385
Test: atest CtsVirtualDevicesTestCases --test-filter=".*VirtualAudioTest.*"
Change-Id: Ia86a8480495693595dbb501ec58e5d1d238abab2
2023-12-08 09:37:41 -08:00
Yi Kong
62b951e58b Fix -Wunused-variable compiler warning am: 810d41a774 am: 4eeda91a4a am: 76705af803
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2861356

Change-Id: I00242599f1a67f59a8e2f415ffa52231d54007dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 13:50:56 +00:00
Yi Kong
810d41a774 Fix -Wunused-variable compiler warning
Test: presubmit
Change-Id: I146d3435fe76da7f300452a14b62ce430c38ae36
2023-12-06 14:03:58 +09:00
Shunkai Yao
bffdaa9d19 Merge "DownmixProcess: Add tests to validate the downmix process." into main am: ab269e2fc7 am: 947f4f776c am: 149564ad7e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2849236

Change-Id: I34f8bdbee50ae15145272544c5546f3ab6aaef15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 02:51:32 +00:00
Shunkai Yao
ab269e2fc7 Merge "DownmixProcess: Add tests to validate the downmix process." into main 2023-12-06 00:35:39 +00:00
Mikhail Naganov
04b72a2c81 Merge "audio: Adjust after "bus" device type change" into main am: a0df73110e am: 727289b30d am: 2f397365a6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2858026

Change-Id: I50e5c1f17014823891bf59542066bc13547c2198
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-05 21:01:11 +00:00
Sneha Patil
f533b50925 DownmixProcess: Add tests to validate the downmix process.
Added methods to set and validate parameters.
Added test to verify multichannel to stereo conversion for STRIP type.
Added test to verify multichannel to stereo conversion for FOLD type.

Bug:314953788
Test: atest VtsHalDownmixTargetTest
Change-Id: I31ee4df3eac6ae42e3e3cabebd1622e860581eab
2023-12-05 22:09:05 +05:30
Mikhail Naganov
43269bc713 audio: Adjust after "bus" device type change
The `CONNECTION_BUS` constant is deprecated.
`{IN|OUT}_BUS` should be used instead of `{IN|OUT}_DEVICE`
for clarity.

Bug: 303926380
Test: m
Change-Id: I73365abbcc16550875cf307eafa46b1200698df4
2023-12-04 14:51:49 -08:00
Mikhail Naganov
992921a9af Merge "audio: Fix remote submix module I/O timing and atomicity" into main am: 5260337cbb am: 73ddfafe34 am: bede03bbdf
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2855474

Change-Id: Ic6f8482082084dc5652218473f472a8371c984b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-04 06:16:01 +00:00
Mikhail Naganov
0608545377 audio: Fix remote submix module I/O timing and atomicity
Similar to the primary module implementation, align the time
spent in the transfer operation with the duration of audio.

Change the read operation to ingest as much data as possible
during the audio burst duration.

Ensure that checking the existence of a SubmixRoute and adding
a new one is an atomic operation.

Minor improvements to avoid extra synchronization.

In the configuration, change the limit of max open streams to 10
to match the legacy implementation.

Bug: 302132812
Test: atest CtsMediaAudioTestCases --test-filter=".*AudioPlaybackCaptureTest#testPlaybackCaptureDoS"
Change-Id: Iccb6aaac46c039551c3d5f7760b1459168d9cfe5
2023-12-01 16:39:52 -08:00
Shunkai Yao
59e3c1da45 Merge "Effect AIDL: add AudioTrack metadata as a common parameter for effects" into main am: 4181e7db41 am: cbc5cad748 am: 578ecd2f20
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2850160

Change-Id: I0f274ef3f864d7dae8b57ec1894f11642a552ff5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-01 19:24:58 +00:00
Shunkai Yao
4181e7db41 Merge "Effect AIDL: add AudioTrack metadata as a common parameter for effects" into main 2023-12-01 18:29:21 +00:00
Devin Moore
855a857014 Merge "Register bluetooth.audio in the audioservice AIDL example" into main am: 6504238fd7 am: 506464d703 am: 125806ada7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2850408

Change-Id: I8cbe16fe22be353ffbf80fb72b35778bd88cea6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 20:02:55 +00:00
Devin Moore
6504238fd7 Merge "Register bluetooth.audio in the audioservice AIDL example" into main 2023-11-29 18:15:31 +00:00
Shunkai Yao
421ca19c14 Effect AIDL: add AudioTrack metadata as a common parameter for effects
Bug: 307368176
Test: m android.hardware.audio.effect-update-api
Test: atest --test-mapping hardware/interfaces/audio/aidl
Change-Id: I5affc96c09445a425361f326f728b8ef9b04daee
2023-11-29 17:04:58 +00:00
Mikhail Naganov
d1db3a1d56 Merge "audio: Fix parsing of I/O flags from XML config" into main am: 1a7cdeef2b am: bac3fc05df am: b0accaec4a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2850161

Change-Id: I99b1146da9b728c8a23aa6ff1e4a932776b9a687
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 04:59:19 +00:00
Mikhail Naganov
1a7cdeef2b Merge "audio: Fix parsing of I/O flags from XML config" into main 2023-11-29 03:12:06 +00:00
Mikhail Naganov
37fe9e84b5 audio: Fix parsing of I/O flags from XML config
The XML parser was missing a step to convert a value
from legacy domain into AIDL.

Bug: 293384960
Test: parse config with AUDIO_OUTPUT_FLAG_VOIP_RX
Change-Id: I1e7778cbf093c2a393e9b2431c9a72b6020cf7be
2023-11-28 17:12:25 -08:00
Devin Moore
0b2b93dccd Register bluetooth.audio in the audioservice AIDL example
android.hardware.bluetooth.audio should really be registered in its own
process, but this is a temporariy solution that is similar to the
old HIDL example.

Test: launch_cvd
Bug: 312265159
Change-Id: Ib60e2654d3b751bedf256d90de72921210174fe4
2023-11-29 00:13:18 +00:00
Mikhail Naganov
af29cd7e7e Fix after aosp/2836447 am: d664a63cf4 am: 4b200f5e55 am: b153b6e4c2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2848064

Change-Id: I5dc5d3f251911eba2b7a9b49781b88fadbb9a151
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-28 04:08:20 +00:00
Mikhail Naganov
d664a63cf4 Fix after aosp/2836447
Update 'memset' in StreamPrimary to fill the entire buffer.

Bug: 302132812
Bug: 302587331
Test: atest CtsMediaAudioTestCases
Change-Id: I6c2e0fc9ab49b35a9484ac3a900aefa9aa98315c
2023-11-27 17:31:04 -08:00
Shunkai Yao
a1d092a818 Merge "Effect AIDL: skip volume checking" into main 2023-11-27 20:03:49 +00:00
Mikhail Naganov
b6c97c04a3 Merge "audio: Adjust default impl for non-RT audio behavior of AVD" into main am: 8062a77307 am: 3bb96fe48b am: ccbb3e1ad7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2836447

Change-Id: Ic8ea353189b17d77be70906fce8ebc1e0553f1a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-27 19:46:12 +00:00
Mikhail Naganov
8062a77307 Merge "audio: Adjust default impl for non-RT audio behavior of AVD" into main 2023-11-27 18:50:48 +00:00
David Li
1a56fdda2d Effect AIDL: skip volume checking
Bug: 310751043
Test: atest VtsHalAudioEffectTargetTest
Change-Id: I1b8b32ba7cd33ac3c00637ca86e041f1f58c69f3
Merged-In: I1b8b32ba7cd33ac3c00637ca86e041f1f58c69f3
2023-11-27 16:52:54 +00:00
David Li
942498c7b5 Merge "Effect AIDL: skip volume checking" into main 2023-11-21 08:25:00 +00:00