audio AIDL: Consider `BUS` devices as attached
After analyzing Auto APM config files and checking with
the Auto team, it has turned out that `BUS` devices are
considered to be permanently attached. In the AIDL schema
that means, they must have an empty connection type.
A solution which seems to work well is to map AIDL types
`IN_|OUT_DEVICE` with no connection to legacy BUS devices.
Bug: 303926380
Test: atest audio_aidl_ndk_conversion_tests
(cherry picked from commit ef65be72c7828792165cc778632bd8e220e785e8)
Change-Id: Ie1b03a5c302d2fa0c176cd420f4156aaa2ed0257
diff --git a/media/audioaidlconversion/AidlConversionCppNdk.cpp b/media/audioaidlconversion/AidlConversionCppNdk.cpp
index 7ea51ff..5558259 100644
--- a/media/audioaidlconversion/AidlConversionCppNdk.cpp
+++ b/media/audioaidlconversion/AidlConversionCppNdk.cpp
@@ -562,8 +562,7 @@
GET_DEVICE_DESC_CONNECTION(IP_V4));
append_AudioDeviceDescription(pairs,
AUDIO_DEVICE_IN_BUS, AUDIO_DEVICE_OUT_BUS,
- AudioDeviceType::IN_DEVICE, AudioDeviceType::OUT_DEVICE,
- GET_DEVICE_DESC_CONNECTION(BUS));
+ AudioDeviceType::IN_DEVICE, AudioDeviceType::OUT_DEVICE);
append_AudioDeviceDescription(pairs,
AUDIO_DEVICE_IN_PROXY, AUDIO_DEVICE_OUT_PROXY,
AudioDeviceType::IN_AFE_PROXY, AudioDeviceType::OUT_AFE_PROXY);