Stub output stream is like a /dev/null audio device, however
for synchronous transfers it must block for the duration of
the audio chunk being transferred. Implement more accurate
accounting for the blocking time using the same approach as
employed by the remote submix stream implementation.
Bug: 356719263
Test: atest CtsNativeMediaAAudioTestCases
on aosp_cf_x86_64_auto target
Change-Id: I137aed397246bcf2b5ef6789aa4d2d27ead64467
It was noted that calling 'ABinderProcess_startThreadPool'
results in the audio HAL service having more Binder pool
threads than without it. This is preferred to having
just one thread via 'ABinderProcess_joinThreadPool'
as in the latter case clients may seemingly be blocked
instead of being served by a newly spawned thread from
the pool.
Bug: 357669241
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ia8ed52b3c5a95cea12d063a0e75ac908af9260f8
Add support for haptic scale factors introduced to the HapticScale
parcelable defined at HapticGenerator.aidl. These fields are used by the
platform to scale the haptic channel data before it's sent to the vibrator
motor.
The fields have a default negative value which will be interpreted as
undefined by the scale function and ignored. The VibratorScale enum will
still be supported by the platform when the scale factors are undefined.
Fix: 356406324
Fix: 356406686
Flag: EXEMPT HAL interface change
Test: VtsHalHapticGeneratorTargetTest
Change-Id: I9da0f6f2573722089efadb78ff96fc265bdad164
Move the cleanup of the stream worker thread from '~StreamCommonImpl'
up to concrete stream implementations. This is because when
the worker thread is stopping, it calls 'DriverInterface::shutdown'
method of the stream. At the time when '~StreamCommonImpl' is
running, the concrete stream class has already been destroyed.
The cleanup actually only happens in the case when the client
did not close the stream properly via 'IStreamCommon.close', or
when the stream creation has failed in the middle.
Bug: 355804294
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ie86f682af202976ed48d24338b2dffcfd20d9a76
Removing code repeatation and moving this method to base class.
Effect implementations can override enable, disable and reset methods.
Bug: 305866207
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: Iceb7ad51185d6f6bd2b6d70a5a1dd51e7bd37276
Calling 'stop' can cause the worker thread to terminate
before it handles the 'halReservedExit' command. This should
be avoided because a proper exit sequence may do cleanups.
Since all stream workers must handle the 'halReservedExit'
command, use of 'stop' should not be needed (if the thread
code gets stuck on a call to drivers, calling 'stop' will
not interrupt this), thus it is being replaced by 'join'.
Bug: 344482249
Test: atest CtsMediaAudioTestCases
Test: atest VtsHalAudioCoreTargetTest
Change-Id: If13f7239423657b80091239ff67e7fe350957e2e
Merged-In: If13f7239423657b80091239ff67e7fe350957e2e
In order to use the time interval for reading from the remote
submix pipe more efficiently, increase the deadline time
to the buffer duration minus a small amount. This should
minimize chances to have discontinuities in the remote submix
input.
Bug: 334363414
Test: atest --test-filter=".*RemoteSubmixTest#testRemoteSubmixRecordingContinuity" CtsMediaAudioTestCases
Change-Id: I02968d09afd8ecdad4d61e635393842d7280e55f
When translating supported channel counts into channel masks,
only use channel layouts for 1 and 2 channels: "mono" and
"stereo", while reporting all other counts via indexed
masks. This helps to support output to multichannel USB Audio
interfaces properly.
Bug: 329571487
Test: repro steps in the bug
Change-Id: Ibbbf71e7f04a6622cccaddeb3f4f140193d7f8fb
Some tests in `VtsHalAudioCoreTargetTest` may run for a long
time because they test all combinations of stream configurations.
As a result, the test was timing out on partners' devices.
The partner has confirmed that increasing the timeout to
30 minutes fixes the problem.
Bug: 350998390
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I5eddd19f14d49e88b71134d040ebfb06a1f2d375
Skip the data path tests for offloading reverb, as offloading
effects don't publish fmqs and don't actually process the data.
Test: VtsHalEnvironmentalReverbTargetTest
Bug: 351751648
Change-Id: Ib5f37c4568d405c6c597eb27fe216e6e345a2eae
1. add createMmapBuffer() for vendor to override and create mmap fd.
2. add refineMmapPosition() for vendor to override and update
latency in mmap case.
3. fix testcases position check in mmap case.
Bug: 274456992
Bug: 345591089
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ie63fdd47c0ddc563d84699dfdf6d4e9b72b5af43
- create buffer and check the fmq data with frameSize
- check effect state after open/close/command
Bug: 338040049
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts
Change-Id: I45af2faec3cdcef5307fbdcf600a63d7da759261