From: Takashi Iwai Subject: Re: [PATCH v3 1/2] ALSA: usb-audio: UAC2 jack detection Date: Sat, 24 Mar 2018 09:51:44 +0100 Message-ID: References: <20180324022524.227748-1-achant@google.com> <20180324022524.227748-2-achant@google.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 091AF266E07 for ; Sat, 24 Mar 2018 09:51:44 +0100 (CET) In-Reply-To: <20180324022524.227748-2-achant@google.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Andrew Chant Cc: alsa-devel@alsa-project.org, Ruslan Bilovol , Benson Leung List-Id: alsa-devel@alsa-project.org On Sat, 24 Mar 2018 03:25:23 +0100, Andrew Chant wrote: > > This implements UAC2 jack detection support, presenting > jack status as a boolean read-only mono mixer. > > The presence of any channel in the UAC2_TE_CONNECTOR > control for a terminal will result in the mixer saying > the jack is connected. > > Mixer naming follows the convention in sound/core/ctljack.c, > terminating the mixer with " Jack". > For additional clues as to which jack is being presented, > the name is prefixed with " - Input Jack" or " - Output Jack" > depending on if it's an input or output terminal. > > This is required because terminal names are ambiguous > between inputs and outputs and often duplicated - > Bidirectional terminal types (0x400 -> 0x4FF) > "... may be used separately for input only or output only. > These types require two Terminal descriptors. Both have the same type." > (quote from "USB Device Class Definition for Terminal Types") > > Since bidirectional terminal types are common for headphone adapters, > this distinguishes between two otherwise identically-named > jack controls. > > Tested with a UAC2 audio device with connector control capability. > > Signed-off-by: Andrew Chant Applied now, thanks. Takashi