Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28B88C4CECC for ; Sun, 15 Sep 2019 09:37:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7D8320830 for ; Sun, 15 Sep 2019 09:37:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="HoaRGwC/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7D8320830 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8F7B7847; Sun, 15 Sep 2019 11:36:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8F7B7847 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1568540241; bh=Nq9S9i/FH7SDRg+t3oghRCen3u5MALH2DMqTB/L2bpw=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HoaRGwC/gHr9osBgOj3UleOuoy341Cd7+ap8muHJdAJuXfzmJl7OCnsDmjzXkK+D8 H+2/gSC3cd3yfO7riSd3qpLJEuazubnNnIV3L/UGF1U/xa4bob5e/8O/rUYQIXHBoW o/2HdNK+9/9EZzuUsdJjBmedpr6UIbQ2EmfQffk0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1D7A7F80137; Sun, 15 Sep 2019 11:36:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 88F0DF80307; Sun, 15 Sep 2019 11:36:29 +0200 (CEST) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A1963F801DA for ; Sun, 15 Sep 2019 11:36:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A1963F801DA X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9A8CFB623; Sun, 15 Sep 2019 09:36:25 +0000 (UTC) Date: Sun, 15 Sep 2019 11:36:25 +0200 Message-ID: From: Takashi Iwai To: Benjamin Berg In-Reply-To: <6609a4e875ed6828d052d338b0bedbacb024a07f.camel@sipsolutions.net> References: <6609a4e875ed6828d052d338b0bedbacb024a07f.camel@sipsolutions.net> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: alsa-devel@alsa-project.org Subject: Re: [alsa-devel] Jack detection in Lenovo OneLink+ and other docks X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 ] > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > https://mailman.alsa-project.org/mailman/listinfo/alsa-devel _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel