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

Commit 73b6c963 authored by Eric Laurent's avatar Eric Laurent
Browse files

Revert "audio policy: implement routing policy for USB docking s..."

Revert "Add support for USB audio docks."

Revert submission 16691170-usb_doc

Reason for revert: 216248574
Reverted Changes:
I090e86b2e:Add support for USB audio docks.
I461661dd4:audio policy: implement routing policy for USB doc...

Change-Id: I5772d7701e48e42f2c054e654238f6d79c2a7a0b
parent 2d127716
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -71,10 +71,7 @@ status_t EngineBase::setDeviceConnectionState(const sp<DeviceDescriptor> devDesc
                                              audio_policy_dev_state_t state)
{
    audio_devices_t deviceType = devDesc->type();
    if ((deviceType != AUDIO_DEVICE_NONE) && audio_is_output_device(deviceType)
            && deviceType != AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET) {
        // USB dock does not follow the rule of last removable device connected wins.
        // It is only used if no removable device is connected or if set as preferred device
    if ((deviceType != AUDIO_DEVICE_NONE) && audio_is_output_device(deviceType)) {
        mLastRemovableMediaDevices.setRemovableMediaDevices(devDesc, state);
    }

+2 −4
Original line number Diff line number Diff line
@@ -272,8 +272,7 @@ DeviceVector Engine::getDevicesForStrategyInt(legacy_strategy strategy,
        devices = availableOutputDevices.getFirstDevicesFromTypes(
                                          getLastRemovableMediaDevices());
        if (!devices.isEmpty()) break;
        devices = availableOutputDevices.getFirstDevicesFromTypes({
                AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET, AUDIO_DEVICE_OUT_EARPIECE});
        devices = availableOutputDevices.getDevicesFromType(AUDIO_DEVICE_OUT_EARPIECE);
    } break;

    case STRATEGY_SONIFICATION:
@@ -365,8 +364,7 @@ DeviceVector Engine::getDevicesForStrategyInt(legacy_strategy strategy,
                    AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET);
        }
        if (devices2.isEmpty()) {
            devices2 = availableOutputDevices.getFirstDevicesFromTypes({
                        AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET, AUDIO_DEVICE_OUT_SPEAKER});
            devices2 = availableOutputDevices.getDevicesFromType(AUDIO_DEVICE_OUT_SPEAKER);
        }
        DeviceVector devices3;
        if (strategy == STRATEGY_MEDIA) {