Extract code interacting with tinyALSA which is not
specific to USB into "abstract" module and stream
implementations ModuleAlsa and StreamAlsa. Also, move
utility code which does not need module or stream
context into Utils.
This facilitates implementation of the CF core HAL which
also uses tinyALSA, allowing to share common code.
Bug: 264712385
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I2134b15e970c78e8a48b254e15199b8207a8ab34
(cherry picked from commit c337a8799b)
Merged-In: I2134b15e970c78e8a48b254e15199b8207a8ab34
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
(cherry picked from commit 64fd6bd779)
Merged-In: Ia1b9330c2b419a1a4048ed78d914d05c1caf523f
Since specializations of the 'Module' class likely need
to provide their own specializations for streams, provide
virtual methods for them.
Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Merged-In: Iddb1bff9f11bc867aba61897ea2f8b9bc3c27544
Change-Id: Iddb1bff9f11bc867aba61897ea2f8b9bc3c27544
(cherry picked from commit 9d16a6ac10)
Make interface methods protected so that subclasses can
augment them.
Provide getters for private fields.
Bug: 282568751
Test: atest VtsHalAudioCoreTargetTest
Merged-In: I0e4810f8a4c816c4f673139816e9768f6dc8da7c
Change-Id: I0e4810f8a4c816c4f673139816e9768f6dc8da7c
(cherry picked from commit 57f0dcf78d)
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
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
Use mixer control to support master mute, master volume and hardware
volume for USB audio HAL.
Bug: 266216550
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Iad544ba517cbfc778ebdf96dd161944886383b73