diff --git a/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp b/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp index 96a83377e1..1f9b725a24 100644 --- a/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp +++ b/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp @@ -333,9 +333,10 @@ sp HwModuleCollection::getDeviceDescriptor(const audio_devices if (encodedFormat != AUDIO_FORMAT_DEFAULT) { moduleDevice->setEncodedFormat(encodedFormat); } - moduleDevice->setAddress(devAddress); if (allowToCreate) { moduleDevice->attach(hwModule); + moduleDevice->setAddress(devAddress); + moduleDevice->setName(String8(name)); } return moduleDevice; }