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

Commit 308d50bf authored by Eric Laurent's avatar Eric Laurent
Browse files

audio policy: fix regression in USB audio

Fix regression in audio device selection introduced by
commit 4e464707

Bug: 123500997
Test: play music over USB and BT A2DP
Change-Id: I9a86e1a8f34f3b02f0dbb53b719884ab6c567265
parent 0684bf1a
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -332,10 +332,8 @@ sp<DeviceDescriptor> HwModuleCollection::getDeviceDescriptor(const audio_devices
        if (moduleDevice) {
            if (encodedFormat != AUDIO_FORMAT_DEFAULT) {
                moduleDevice->setEncodedFormat(encodedFormat);
                if (moduleDevice->address() != devAddress) {
                    moduleDevice->setAddress(devAddress);
                }
            }
            moduleDevice->setAddress(devAddress);
            if (allowToCreate) {
                moduleDevice->attach(hwModule);
            }