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 972B1C001DB for ; Mon, 14 Aug 2023 14:37:20 +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 9F4781F1; Mon, 14 Aug 2023 16:36:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9F4781F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692023838; bh=WJJZ5q1qz2smISX6cc6pjEmb9Ri2n0JxUS1RpVzF4cM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=H1e20D8duh45qlO2CMpLd+LuYEkNPDDfVKFU30fzCq9JuzhhkFIeNOn3ghAPUOz9Z DoXYKfoXuJc8Re4Adyrn3XSVHJt3wpNYQ8hjTLciETIn/L2UUGyBNG2jT8H+gVYxW2 2lXeUwEAiw8TlcUjWTieyYNlGnYqS/Y1nX4ZF4bg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1C2E3F8025F; Mon, 14 Aug 2023 16:35:57 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id AEF18F8025F; Mon, 14 Aug 2023 16:35:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 58ADEF8025F; Mon, 14 Aug 2023 16:35:53 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (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 C9FA5F800EE for ; Mon, 14 Aug 2023 16:35:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C9FA5F800EE 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=cfmh2tNc; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=EIoW2W7f 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-out1.suse.de (Postfix) with ESMTPS id 1316321984; Mon, 14 Aug 2023 14:35:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1692023749; 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=oI2tUdOC4luzSaN047qWHM6uupPC0FYciH10Bmvsy4I=; b=cfmh2tNcRDEh4NBweMef8VYBWpHBxE/Q3+6vGegvIyyLMgicYOSsvsA8vGbVHaectKhpJ1 HcRPPOrarocx+XVyBtcpRLLaF4mbQxSCVlI+iwStT0VlzbhRr2b1UHLw3ZRChZUS9QE10l fKBHJkdyG3JS/2rI7WIXCsjsR/araqA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1692023749; 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=oI2tUdOC4luzSaN047qWHM6uupPC0FYciH10Bmvsy4I=; b=EIoW2W7fpytGWXydnfdlNJ2MSzUCOBfquBhxliP/+6qio69UKFhtg0scG8e+AzSgs3+HIe HL/PiQNw0fWndJAw== 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 D0CFE138EE; Mon, 14 Aug 2023 14:35:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id d8H2McQ72mSvfQAAMHmgww (envelope-from ); Mon, 14 Aug 2023 14:35:48 +0000 Date: Mon, 14 Aug 2023 16:35:48 +0200 Message-ID: <87fs4l1ykb.wl-tiwai@suse.de> From: Takashi Iwai To: Cezary Rojewski Cc: broonie@kernel.org, tiwai@suse.com, perex@perex.cz, alsa-devel@alsa-project.org, amadeuszx.slawinski@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com Subject: Re: [RFC PATCH 01/17] ALSA: pcm: Introduce MSBITS subformat interface In-Reply-To: <20230811164853.1797547-2-cezary.rojewski@intel.com> References: <20230811164853.1797547-1-cezary.rojewski@intel.com> <20230811164853.1797547-2-cezary.rojewski@intel.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: ILNKS24NAYGADZOBAEOXIIFL3ETOXHZF X-Message-ID-Hash: ILNKS24NAYGADZOBAEOXIIFL3ETOXHZF 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 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 Fri, 11 Aug 2023 18:48:37 +0200, Cezary Rojewski wrote: > > --- a/sound/core/pcm_lib.c > +++ b/sound/core/pcm_lib.c > @@ -1706,6 +1706,36 @@ int snd_pcm_hw_param_last(struct snd_pcm_substream *pcm, > } > EXPORT_SYMBOL(snd_pcm_hw_param_last); > > +/** > + * params_bps - Get the number of bits per the sample. > + * @p: hardware parameters > + * > + * Return: The number of bits per sample based on the format, > + * subformat and msbits the specified hw params has. > + */ > +int params_bps(const struct snd_pcm_hw_params *p) It's a too generic name. Please put the suffix like snd_xxx_. There are a few params_xxx() in the current tree, but those are rather macros, and left so just for laziness to convert every piece. You don't need to follow that pattern. thanks, Takashi