mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
audio: Fix remote submix module device ports handling
- remove the default address "0" for IN_SUBMIX and OUT_SUBMIX; - remove the profiles in the device port and assign profiles when connecting; - make remote submix input to use "virtual" connection type, same as the output; - fix ModuleConfig in VTS to avoid returning devices with virtual connections as "external devices" because they can actually be connected even when connection simulation is disabled; - fix TryConnectMissingDevice VTS test to disconnect the device if the operation has unexpectedly succeeded. Bug: 286914845 Bug: 294976817 Test: atest VtsHalAudioCoreTargetTest Change-Id: Ife11c9c356d1b5dc587d08cef47294e3b29f65c5
This commit is contained in:
committed by
Mikhail Naganov
parent
76d87305d5
commit
b089c0cfee
@@ -1627,14 +1627,17 @@ TEST_P(AudioCoreModule, TryConnectMissingDevice) {
|
||||
if (ports.empty()) {
|
||||
GTEST_SKIP() << "No external devices in the module.";
|
||||
}
|
||||
AudioPort ignored;
|
||||
WithDebugFlags doNotSimulateConnections = WithDebugFlags::createNested(*debug);
|
||||
doNotSimulateConnections.flags().simulateDeviceConnections = false;
|
||||
ASSERT_NO_FATAL_FAILURE(doNotSimulateConnections.SetUp(module.get()));
|
||||
for (const auto& port : ports) {
|
||||
AudioPort portWithData = GenerateUniqueDeviceAddress(port);
|
||||
EXPECT_STATUS(EX_ILLEGAL_STATE, module->connectExternalDevice(portWithData, &ignored))
|
||||
<< "static port " << portWithData.toString();
|
||||
AudioPort portWithData = GenerateUniqueDeviceAddress(port), connectedPort;
|
||||
ScopedAStatus status = module->connectExternalDevice(portWithData, &connectedPort);
|
||||
EXPECT_STATUS(EX_ILLEGAL_STATE, status) << "static port " << portWithData.toString();
|
||||
if (status.isOk()) {
|
||||
EXPECT_IS_OK(module->disconnectExternalDevice(connectedPort.id))
|
||||
<< "when disconnecting device port ID " << connectedPort.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user