[alsa-devel] Jack detection in Lenovo OneLink+ and other docks

Takashi Iwai tiwai at suse.de
Sun Sep 15 11:36:25 CEST 2019


On Fri, 13 Sep 2019 18:15:46 +0200,
Benjamin Berg wrote:
> 
> Hi,
> 
> I have a Lenovo OneLink+ and TB3 docks here. The USB audio adapter on
> these docks work fine. However, Jack detection is not functional
> unfortunately which is somewhat annoying.
> 
> There are HID devices available on the docking stations which seem to
> report the jack sensing information. Assuming we can decode this
> information correctly, does anyone have an idea how this can be hooked
> up so that the information will be available on the audio device
> itself?

I'm afraid that we won't do plumbing in the kernel side, but rather
the combination is checked in the user-space side.  Maybe we can
extend the UCM profile to adapt the external input device (or
whatever) for corresponding to the HID device.


Takashi


> 
> Benjamin
> 
> The OneLink+ dock exposes the following interfaces:
>         |__ Port 1: Dev 90, If 0, Class=Hub, Driver=hub/4p, 480M
>             |__ Port 3: Dev 92, If 1, Class=CDC Data, Driver=cdc_ether, 480M
>             |__ Port 3: Dev 92, If 0, Class=Communications, Driver=cdc_ether, 480M
>             |__ Port 4: Dev 94, If 2, Class=Audio, Driver=snd-usb-audio, 12M
>             |__ Port 4: Dev 94, If 0, Class=Audio, Driver=snd-usb-audio, 12M
>             |__ Port 4: Dev 94, If 3, Class=Human Interface Device, Driver=usbhid, 12M
>             |__ Port 4: Dev 94, If 1, Class=Audio, Driver=snd-usb-audio, 12M
> 
> Similar on the TB 3 Dock from Lenovo:
> /:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
>     |__ Port 1: Dev 2, If 0, Class=Audio, Driver=snd-usb-audio, 12M
>     |__ Port 1: Dev 2, If 1, Class=Audio, Driver=snd-usb-audio, 12M
>     |__ Port 1: Dev 2, If 2, Class=Audio, Driver=snd-usb-audio, 12M
>     |__ Port 1: Dev 2, If 3, Class=Human Interface Device, Driver=usbhid, 12M
>     |__ Port 4: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
> 
> On each of these devices, plugging/unplugging will fire various HID
> events, seemingly with some sensing information.
> 
> On the OneLink Plus:
> D: 0
> R: 69 05 0c 09 01 a1 01 85 01 15 00 25 01 09 e9 09 ea 75 01 95 02 81 42 09 e2 95 01 81 06 06 01 ff 09 01 95 09 81 06 05 0c 09 cd 09 b7 09 b5 09 b6 95 04 81 06 06 07 ff 09 01 75 08 95 0d 81 06 09 00 95 0f 91 02 c0
> N: C-Media Electronics Inc. ThinkPad OneLink Plus Dock Audio
> P: usb-0000:00:14.0-4.1.4/input3
> I: 3 17ef 3055
> # Plug Headphone
> D: 0
> E: 0.000000 16 01 00 06 00 00 20 83 ab 08 00 08 c0 10 00 00 00
> E: 3.103810 16 01 00 0a 00 00 20 83 ab 08 00 03 80 10 00 00 00
> # Unplug headphone
> E: 9.951613 16 01 00 08 00 00 20 83 ab 08 00 03 80 00 00 00 00
> E: 10.016073 16 01 00 04 00 00 20 83 ab 08 00 03 80 10 00 00 00
> # Plug Microphone
> E: 17.824186 16 01 00 06 00 00 20 83 ab 08 00 03 80 00 00 00 00
> E: 20.928234 16 01 00 0a 00 00 20 83 ab 08 00 03 80 10 00 00 00
> # Unplug Microphone
> E: 26.734048 16 01 00 08 00 00 20 83 ab 08 00 08 c0 10 00 00 00
> E: 26.784007 16 01 00 04 00 00 20 83 ab 08 00 03 80 10 00 00 00
> # Plug headset
> E: 44.160216 16 01 00 06 00 00 20 83 ab 08 00 03 80 00 00 00 00
> # Unplug headset
> E: 56.687367 16 01 00 04 00 00 20 83 ab 08 00 08 c0 10 00 00 00
> 
> 
> On the TB 3 dock:
> D: 0
> R: 120 05 0c 09 01 a1 01 85 01 15 00 25 01 09 e9 09 ea 75 01 95 02 81 02 09 e2 95 01 81 06 09 00 95 02 81 03 09 36 a1 02 05 09 19 01 29 02 75 02 95 01 15 01 25 02 81 40 c0 05 0c 09 00 15 00 25 01 75 01 95 01 81 03 85 02 05 0c 09 00 95 10 81 02 85 03 09 00 91 02 85 04 09 00 75 08 95 26 91 02 85 05 09 00 95 22 81 02 85 06 09 00 95 24 91 02 85 07 09 00 95 20 81 02 c0
> N: Lenovo ThinkPad Thunderbolt 3 Dock USB Audio
> P: usb-0000:0a:00.0-1/input3
> I: 3 17ef 306a
> # Plug in headphone
> D: 0
> E: 0.000000 3 02 00 80
> # Unplug headphone
> E: 16.480011 3 02 00 00
> # Plug in microphone
> E: 34.224331 3 02 00 80
> # Unplug microphone
> E: 46.960128 3 02 00 00
> # Plug in headset
> E: 62.592182 3 02 00 80
> E: 63.120449 3 02 00 c0
> # Unplug headset
> E: 72.608250 3 02 00 80
> E: 72.624253 3 02 00 00
> 
> [1.2 This is a digitally signed message part <application/pgp-signature (7bit)>]
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel


More information about the Alsa-devel mailing list