Merge changes from topic "AidlAudioHalModuleConfig" into main am: 43543bda62

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2770886

Change-Id: I2d0a4c3bd8138dfbfc06c1194d3fb59c5a2d88c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/audio/aidl/default/AudioPolicyConfigXmlConverter.cpp b/audio/aidl/default/AudioPolicyConfigXmlConverter.cpp
index 5d06cb6..2f1282a 100644
--- a/audio/aidl/default/AudioPolicyConfigXmlConverter.cpp
+++ b/audio/aidl/default/AudioPolicyConfigXmlConverter.cpp
@@ -184,9 +184,15 @@
             // 'primary' in the XML schema used by HIDL is equivalent to 'default' module.
             const std::string name =
                     xsdcModule.getName() != "primary" ? xsdcModule.getName() : "default";
-            mModuleConfigurations->emplace_back(
-                    name, VALUE_OR_FATAL(convertModuleConfigToAidl(xsdcModule)));
+            if (name != "r_submix") {
+                mModuleConfigurations->emplace_back(
+                        name, VALUE_OR_FATAL(convertModuleConfigToAidl(xsdcModule)));
+            } else {
+                // See the note on the 'getRSubmixConfiguration' function.
+                mModuleConfigurations->emplace_back(name, nullptr);
+            }
         }
     }
 }
+
 }  // namespace aidl::android::hardware::audio::core::internal