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

Commit 7db57cbe authored by Andrew Chant's avatar Andrew Chant
Browse files

Add test for UsbDescriptorParser.java

Tests with descriptors from USB-C to 3.5mm adapter in four cases:
 - line level load connected, no microphone
 - low impedance load with microphone
 - low impedance load without microphone
 - no load attached.

Test: Ran tests without fix for bug 73813676, failed.
Ran tests with fix, all passed.

Change-Id: I067a15a122996e80c70bf287c6982611b6deee01
parent 0ef73801
Loading
Loading
Loading
Loading
+35 −0
Original line number Diff line number Diff line
The usbdescriptors_ files contain raw USB descriptors from the Google
USB-C to 3.5mm adapter, with different loads connected to the 3.5mm
jack.

usbdescriptors_nothing.bin:
 - The descriptors when the jack is disconnected.

usbdescriptors_headphones.bin:
 - The descriptors when the jack is connected to 32-ohm headphones,
   no microphone.
   The relevant output terminal is:
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            15
        wTerminalType      0x0302 Headphones
   
usbdescriptors_lineout.bin:
 - The descriptors when the jack is connected to a PC line-in jack.
   The relevant output terminal is:
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            15
        wTerminalType      0x0603 Line Connector

usbdescriptors_headset.bin:
 - The descriptors when a headset with microphone and low-impedance
   headphones are connected.
   The relevant input terminal is:
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Microphone
   The relevant output terminal is:
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            15
        wTerminalType      0x0302 Headphones

+180 B

File added.

No diff preview for this file type.

+305 B

File added.

No diff preview for this file type.

+180 B

File added.

No diff preview for this file type.

+52 B

File added.

No diff preview for this file type.

Loading