Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030508Ab3HIQuI (ORCPT ); Fri, 9 Aug 2013 12:50:08 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40523 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968201Ab3HIQuH (ORCPT ); Fri, 9 Aug 2013 12:50:07 -0400 Date: Fri, 09 Aug 2013 18:51:33 +0200 Message-ID: From: Takashi Iwai To: Mark Brown Cc: "Felipe F. Tonello" , alsa-devel@alsa-project.org, Jaroslav Kysela , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] ALSA: Added jack detection KControl support In-Reply-To: <20130809163947.GK6427@sirena.org.uk> References: <1375430365-13232-2-git-send-email-eu@felipetonello.com> <1376029315-3217-1-git-send-email-eu@felipetonello.com> <20130809163947.GK6427@sirena.org.uk> 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/24.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1786 Lines: 47 At Fri, 9 Aug 2013 17:39:47 +0100, Mark Brown wrote: > > On Fri, Aug 09, 2013 at 03:52:04PM +0200, Takashi Iwai wrote: > > > Above all, the multiple indices don't work anyway with the snd_jack > > stuff in the current form. The index was introduced only for kjack, > > and for HD-audio, snd_jack is provided just for a compatibility > > reason, thus it doesn't matter much even if the multiple indices don't > > work with it. > > > That being said, before going further, we need to consider how to > > handle the input jack stuff with multiple indices. > > What's the big problem with indexes and input (hopefully also extcon...) > reporting? No big problem, but we haven't defined it. Should the index be embedded in the name string or handled in a different way? > > > - snprintf(jack->name, sizeof(jack->name), "%s %s", > > > + snprintf(jack->name, sizeof(jack->name), "%s %s Jack", > > > card->shortname, jack->id); > > > This breaks the compatibility with the existing code. > > You must not change the name of the existing input jack element. > > Some drivers create "Headphone" and some do "Headphone Jack", yes. > > It's bad, but too late to change. > > We can probably do something cheap like just check if there's a "Jack" > already in the name? Yes, I thought of it, too. But there are some funky names like "hook_switch". Also, there is "Headphones", too. So, IMO, the function should accept a special name for the input-jack for compatibility reason while creating standard names for kjack, or so... Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/