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 635F8C77B73 for ; Mon, 1 May 2023 07:03:41 +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 86B9D175C; Mon, 1 May 2023 09:02:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 86B9D175C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1682924618; bh=nKgG1imx9UreIxQdgBkBIGgTo5FCnsp7BxD7AGjwctc=; h=Date:From:To:Subject:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=fFoZnQE1ywSIaUzEGYJnO906G1+d19TMVEdAu5l3v/rDwCl7SLuCefIx+nXt8EiEd 1wI4moafYMNi9JbRdPnyeBUYF24Pr8X6j76Faidgb4M88UL4pJfD2sgliukufrD+5F wpjPDbRYNsuG3uiTT0wqcGx6viQN3Q8DA70Y4FDA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 8FF0FF8032B; Mon, 1 May 2023 09:02:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C1B40F8032B; Mon, 1 May 2023 09:02:19 +0200 (CEST) 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 13C1BF80114 for ; Mon, 1 May 2023 09:02:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 13C1BF80114 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=aOOoF4vs; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=izE8NTdl 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 67480205DD; Mon, 1 May 2023 07:02:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1682924537; 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=RVD+bDRUziRmcnlCJugyMwMeK+xLTveoOrOww/ccp3g=; b=aOOoF4vsEsu4/OGqELhUcGizAwzeeEVQBZIaSnQG86wyL6D4eqbMiphop3NunysTBej+Sf RdRduJFJSM5D39KQk0NfdOn0gtBiBz3GxEn6ndm2+c0afGHPoe5ov9Ydi0SV0iDloxc/Xn 8fqpsjMlApAwF2eMq0rG1KoeFXQ9tZQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1682924537; 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=RVD+bDRUziRmcnlCJugyMwMeK+xLTveoOrOww/ccp3g=; b=izE8NTdlnKsbcWp7d7AGiqEzjAum4H6P7N3EsWZkcLmHmtoVG5XWyFH5xfKuEVsVlZ16fT 8U26T7n2HUWMi3CQ== 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 4AED913580; Mon, 1 May 2023 07:02:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id hRxgEfljT2SdYQAAMHmgww (envelope-from ); Mon, 01 May 2023 07:02:17 +0000 Date: Mon, 01 May 2023 09:02:16 +0200 Message-ID: <87mt2opm9z.wl-tiwai@suse.de> From: Takashi Iwai To: Ivan Orlov Subject: Re: Question regarding ALSA modules parameters In-Reply-To: <26624923-3529-d161-ae62-7e5ece7b0e3f@gmail.com> References: <26624923-3529-d161-ae62-7e5ece7b0e3f@gmail.com> 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 Message-ID-Hash: YUHRBC3UUGEWMUFJV5AJXCJ46I2QDGDL X-Message-ID-Hash: YUHRBC3UUGEWMUFJV5AJXCJ46I2QDGDL X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: alsa-devel@alsa-project.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Sat, 29 Apr 2023 20:35:19 +0200, Ivan Orlov wrote: > > Hello! > > I have a question about the typical ALSA driver parameters, and maybe > someone can answer me. Why it is necessary for ALSA module to have > "index", "id" and "enable" parameters? They are mentioned as required > in the "Writing an ALSA driver" and "Advanced Linux Sound Architecture > - Driver Configuration guide" articles and used in many ALSA drivers, > but for what purpose? It's for either specifying the order of instances or controlling enable/disable of each one when there are multiple devices bound with the same driver. One of typical use cases would be the HD-audio driver; there are many machines that have two HD-audio controllers, one for HDMI/DP audio and another for onboard analog. In most cases, the second one (onboard analog) is the primary usage, and people would like to assign this as the first appearing card. Then you can pass the option like "index=1,0" to swap the assignment slot. Nowadays with the sound backend like PA or PW that supports dynamic configuration, it's little use, but that was a help for static configuration in the past. HTH, Takashi