hidl: usb: Correct supportedModes
authorTim Zimmermann <tim@linux4.de>
Mon, 9 May 2022 18:07:05 +0000 (20:07 +0200)
committerTim Zimmermann <tim@linux4.de>
Mon, 9 May 2022 18:07:05 +0000 (20:07 +0200)
* DRP is not supported, switch back to what we had with our old 1.1-typec HAL
* Restores support for external display

Change-Id: I0792a629bb082ceb95582bc28447d7cdea757f2e

hidl/usb/Usb.cpp

index 1b494ac76970f1b6d4b179bd7d1b09e39329bde2..b25a8ad1d66af588b965bd7a44251c08357e59d0 100644 (file)
@@ -521,13 +521,13 @@ Status getPortStatusHelper(hidl_vec<PortStatus> *currentPortStatus_1_2, HALVersi
 
             if (version == HALVersion::V1_0) {
                 ALOGI("HAL version V1_0");
-                (*currentPortStatus_1_2)[i].status_1_1.status.supportedModes = V1_0::PortMode::DRP;
+                (*currentPortStatus_1_2)[i].status_1_1.status.supportedModes = V1_0::PortMode::DFP;
             } else {
                 if (version == HALVersion::V1_1)
                     ALOGI("HAL version V1_1");
                 else
                     ALOGI("HAL version V1_2");
-                (*currentPortStatus_1_2)[i].status_1_1.supportedModes = 0 | PortMode_1_1::DRP;
+                (*currentPortStatus_1_2)[i].status_1_1.supportedModes = PortMode_1_1::UFP | PortMode_1_1::DFP;
                 (*currentPortStatus_1_2)[i].status_1_1.status.supportedModes = V1_0::PortMode::NONE;
                 (*currentPortStatus_1_2)[i].status_1_1.status.currentMode = V1_0::PortMode::NONE;
             }