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 8EBD6C77B75 for ; Mon, 8 May 2023 13:25:38 +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 4292B1231; Mon, 8 May 2023 15:24:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4292B1231 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683552335; bh=vK1cIzX5qfHeam9HmUz2m8nrGysBqCd2fTr6GZ7sOsM=; 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=WwShBL+aWm0lpZjk2+JAMZIQBk7/nQgP4NjwEZAASoiYcGGgtmJMo8z6MtUKmu3IA 3fppKaSbnsR5nnZ9QfxDkQCLadvF4u2N6/bj/tBHLaW6Qjd9bDJ2RG1YhI4QjX3qcw pNCn0Sr4yIjjaoj2E8czoOMtbPtbbtRLYWL7p4xo= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 186A1F80087; Mon, 8 May 2023 15:24:20 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 66B00F8032D; Mon, 8 May 2023 15:24:15 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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 EF2BDF8014C for ; Mon, 8 May 2023 15:24:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EF2BDF8014C 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=OzK7c4u+; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ynOeDDoh 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 0AEF01FEE2; Mon, 8 May 2023 13:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683552248; 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=5T18QIZW4sDdaGVRJF2dLBy39nmIoPoJB/qXR0i4utw=; b=OzK7c4u+e4quSIo2SG0ZCtPZLNzhXUTsdv4WUbzgXgY4BHJXwsUvmVJIARzNmOTfA3T3ig pQ148EI3b+CLNPq1VjGedFgBDK+LqF1z0RVu3pxyzyRAYj4mZvlvTgtuHT5vKSoId6rjSg 0zHjD4Z/fCfgEKVNU8uahkRddasjh5o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683552248; 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=5T18QIZW4sDdaGVRJF2dLBy39nmIoPoJB/qXR0i4utw=; b=ynOeDDohFMaHICXW8TfJOMZ48bnJNgSHb+3GoTDiuJp6xh7zTijx32tI96duRfWZev+Hju 5wr9WJQrh3kedSDg== 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 E082913499; Mon, 8 May 2023 13:24:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id dQDoNff3WGR5aQAAMHmgww (envelope-from ); Mon, 08 May 2023 13:24:07 +0000 Date: Mon, 08 May 2023 15:24:07 +0200 Message-ID: <87r0rr6jns.wl-tiwai@suse.de> From: Takashi Iwai To: Jaroslav Kysela Subject: Re: [PATCH] ALSA: uapi: pcm: control the filling of the silence samples for drain In-Reply-To: <20230502115536.986900-1-perex@perex.cz> References: <20230502115536.986900-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 Message-ID-Hash: LIWE5PWXXZNKORMPCVWSQSXYVCIBFYB2 X-Message-ID-Hash: LIWE5PWXXZNKORMPCVWSQSXYVCIBFYB2 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 development 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 Tue, 02 May 2023 13:55:36 +0200, Jaroslav Kysela wrote: > > Introduce SNDRV_PCM_INFO_PERFECT_DRAIN and SNDRV_PCM_HW_PARAMS_NO_DRAIN_SILENCE > flags to fully control the filling of the silence samples in the drain ioctl. > Actually, the configurable silencing is going to be implemented in the user > space [1], but drivers (hardware) may not require this operation. Those flags > do the bidirectional setup for this operation: > > 1) driver may notify the presence of the perfect drain > 2) user space may not require the filling of the silence samples to inhibit clicks > > If we decide to move this operation to the kernel space in future, the > SNDRV_PCM_INFO_PERFECT_DRAIN flag may handle this situation without > double "silence" processing (user + kernel space). > > The ALSA API should be universal, so forcing the behaviour (modifying of > the ring buffer with any samples) for the drain operation is not ideal. > > [1] https://lore.kernel.org/alsa-devel/20230502115010.986325-1-perex@perex.cz/ > > Signed-off-by: Jaroslav Kysela Now applied to for-next branch (with a typo fix in the comment). thanks, Takashi