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
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
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
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
Fix the issue with retrieving BluetoothA2dp and BluetoothLe
instances access.
In 'Module::connectExternalDevice', always call
'populateConnectedDevicePort' to allow the module implementation
to cancel device connection.
Move frame count calculation into Utils.
Clean up includes and 'using' directives.
Bug: 302132812
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I22f65b8bcdcdd9bcd67a8290520eb4a465d4c720
Some device ports are connected via ADSP which takes care
of the actual audio configuration (format, channels, SR),
for example the built-in speaker and mic ports, as well
as some external devices like analog headsets.
In the legacy implementation, such device ports did not have
any profiles specified. Allow the same behavior in the AIDL
implementation. To ensure correctness, device ports with no
profiles must be routable to mix ports that have profiles
specified. This requirement is fulfilled in legacy configs.
Bug: 266124463
Test: atest VtsHalAudioCoreTargetTest
Test: atest audiosystem_tests audiorouting_tests
Test: atest CtsMediaAudioTestCases
Change-Id: Iaccd1e8ef2a5af9a5f8bae453905d01c6b7fdc28
Rename DriverInterface::getPosition -> refinePosition. This reflects
the fact that the driver may provide more precise position, however
this is an optional operation.
Rename StreamIn/Out::mContext -> mContextInstance. This is
to emphasize that StreamIn/Out actually own the context and they
hold the real context instance, not just a reference/pointer
to it, like other classes involved in the inheritance chain.
Bug: 286914845
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Id7159f9bf3ee020dc7cf594ec35f5d59d23d7e31