Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc35ca3d authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

audio: Use hardcoded r_submix configuration with XML

There are several reasons why parsing the canonical XML
configuration for the remote submix module will not work
correctly (see the commend in the code).

Since de facto all vendors use the canonical configuration
XML for the remote submix, substitute parsing it with
a correct hardcoded version.

Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
(cherry picked from commit ea604d50)
Change-Id: Ib9d9da25d315ff4ce36c1870241fb61d95fcca88
parent f7492518
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -184,9 +184,15 @@ void AudioPolicyConfigXmlConverter::init() {
            // 'primary' in the XML schema used by HIDL is equivalent to 'default' module.
            // 'primary' in the XML schema used by HIDL is equivalent to 'default' module.
            const std::string name =
            const std::string name =
                    xsdcModule.getName() != "primary" ? xsdcModule.getName() : "default";
                    xsdcModule.getName() != "primary" ? xsdcModule.getName() : "default";
            if (name != "r_submix") {
                mModuleConfigurations->emplace_back(
                mModuleConfigurations->emplace_back(
                        name, VALUE_OR_FATAL(convertModuleConfigToAidl(xsdcModule)));
                        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
}  // namespace aidl::android::hardware::audio::core::internal