From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2FC81C61DA4 for ; Fri, 3 Feb 2023 16:22:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0416C82B; Fri, 3 Feb 2023 17:22:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0416C82B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1675441373; bh=c5Yb4CvieEMH6z1eaCXGEpKpzV4F17X6esawTPxH/LQ=; h=Date:From:To:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=Ad136ktV0sOOSCzGY0JjIMHAdjS3QZbBEwyPwwBIAEoyEyz4tQx+3ZHmaEAH/5uVY 4FTCfzz9xdYFscLYIlCbCB15ptC8SJf5+0IhjHX6UJDgy9jst9rPzFARvWMrmwfHSb dBDkMje/ho81HqXt4SNw4z7pCFyQ4X9A7z8+EL0M= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9C654F80169; Fri, 3 Feb 2023 17:22:02 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 175DDF80254; Fri, 3 Feb 2023 17:22:01 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 02702F80022 for ; Fri, 3 Feb 2023 17:21:57 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 02702F80022 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=K6MgkdOb; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=d/IRgZ4T Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7641C5C06B; Fri, 3 Feb 2023 16:21:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1675441317; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vtaRyUq6YHmzQI7kjvLWsZyU/TtCCYnveE1jpxfQ4R0=; b=K6MgkdObvsgBHkZVBXvIDRo+dbQqK4063CszwKPpb07eMIm4X2BpMqv+qbbwvzv9gRMDvT jFY1f5UoY4yozJp6efN5k+e51vSUIuF1IQWmcu0ewXZ2B81NNYbmCQ14I8F++PpclHz69c xMxbG9tC5llLUfDHR0p1h0cBm3eOebA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1675441317; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vtaRyUq6YHmzQI7kjvLWsZyU/TtCCYnveE1jpxfQ4R0=; b=d/IRgZ4T2sUpUKlyQzOebyGBbTuzeeOUq77zvIp97L5pcszlG5ZHu1yFooLzhsBq6iGv8q wvnrQBkm0h3X4UAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5AB3B1358A; Fri, 3 Feb 2023 16:21:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +0RBFaU03WPgVwAAMHmgww (envelope-from ); Fri, 03 Feb 2023 16:21:57 +0000 Date: Fri, 03 Feb 2023 17:21:56 +0100 Message-ID: <87h6w2n2hn.wl-tiwai@suse.de> From: Takashi Iwai To: Jaroslav Kysela Subject: Re: [PATCH v2] ALSA: hda: Fix the control element identification for multiple codecs In-Reply-To: <20230202092013.4066998-1-perex@perex.cz> References: <20230202092013.4066998-1-perex@perex.cz> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: ALSA development Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Thu, 02 Feb 2023 10:20:13 +0100, Jaroslav Kysela wrote: > > Some motherboards have multiple HDA codecs connected to the serial bus. > The current code may create multiple mixer controls with the almost > identical identification. > > The current code use id.device field from the control element structure > to store the codec address to avoid such clashes for multiple codecs. > Unfortunately, the user space do not handle this correctly. For mixer > controls, only name and index are used for the identifiers. > > This patch fixes this problem to compose the index using the codec > address as an offset in case, when the control already exists. It is > really unlikely that one codec will create 10 similar controls. > > This patch adds new kernel module parameter 'ctl_dev_id' to allow > select the old behaviour, too. The CONFIG_SND_HDA_CTL_DEV_ID Kconfig > option sets the default value. > > BugLink: https://github.com/alsa-project/alsa-lib/issues/294 > BugLink: https://github.com/alsa-project/alsa-lib/issues/205 > Fixes: 54d174031576 ("[ALSA] hda-codec - Fix connection list parsing") > Fixes: 1afe206ab699 ("ALSA: hda - Try to find an empty control index when it's occupied") > Signed-off-by: Jaroslav Kysela Applied now. Thanks. Takashi