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 64FEEC77B73 for ; Tue, 2 May 2023 14:07:22 +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 C259E18B0; Tue, 2 May 2023 16:06:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C259E18B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683036439; bh=2xDnmX3Uc6EFNXOE0IhbH1wp1LGXv2ZBUw1AZRP0SqM=; 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=tx1OQRlvTzAYtWcO7/4ztdWVHy7Qu7kcAqSIg1KUKDbgBz6ygp0jVLyKZt1R3GR2+ dn8HUiU3TABTXNBbVbNIv710t03n/8akjP/a5ehGkWv/M3mVTZFHQwXocovloO4yNK CT3p/0uljRwhkMv2x1VniTJnEwiyk+tUY+gl6670= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 721E2F804B1; Tue, 2 May 2023 16:06:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C9D3DF804B1; Tue, 2 May 2023 16:06:00 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) (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 CF968F80137 for ; Tue, 2 May 2023 16:05:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CF968F80137 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=Z4HeiI4W; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=AbKBSYmk 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 8E85E22207; Tue, 2 May 2023 14:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683036350; 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=n7qfm/BIliifniRZh2fWTDyVdcB2OVXA92MJl5ux5ys=; b=Z4HeiI4W7lfkU/KiTU30oBWCvKxbLyFIB4GDo/O8MsBA4iSKM1ZpVFI4qEBkezYbLeh7Dq 6Arc98Vq4uOzpw/jsQrxBEsud0XFUnquavAh32IRqQAnUI0BOx3nSVYN4m/9laXqUSLmdv Plr+kWgbQ47e1+fFzWw9d6iYp5mvfXw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683036350; 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=n7qfm/BIliifniRZh2fWTDyVdcB2OVXA92MJl5ux5ys=; b=AbKBSYmkFNIeB/GUvkQHdfBlindPfn9DQCVOvzXrcAkGpj0z0uLO/WB+WrXUT9RxHz+Wge DrixlclT2p0ZIlBg== 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 72BB1139C3; Tue, 2 May 2023 14:05:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id c1cLG74YUWQLcgAAMHmgww (envelope-from ); Tue, 02 May 2023 14:05:50 +0000 Date: Tue, 02 May 2023 16:05:49 +0200 Message-ID: <87ttwuomki.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: 7W6XQSJTVPI3LSXSZ3XRGPWN4O73VAJ7 X-Message-ID-Hash: 7W6XQSJTVPI3LSXSZ3XRGPWN4O73VAJ7 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 Looks good to me. Will apply once after 6.5 devel branch is opened. thanks, Takashi