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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0F2EC433EF for ; Mon, 18 Oct 2021 16:19:03 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5AEEE6108E for ; Mon, 18 Oct 2021 16:19:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5AEEE6108E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E208917E7; Mon, 18 Oct 2021 18:18:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E208917E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1634573940; bh=L17XbkjSgwOXy/oQhDPqcidWMraMNCwGfWE+iuBNDbk=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Suo2dAgYgfO3Z1li9qifwcVWcqoSWOWWEAcKBDpqhrOPVkcLSJcsIwfmCsVLtP7nL kIHeXPxIQFD8aqIrPjYzQFMdJiD/m/CVUFxE/B6YMxiNk3cMUcuzI6EJwHEmha/hDz 2vIaxlLROiizeypr3srr+7CdZbspHCGF96wnxAdY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6E6ECF80159; Mon, 18 Oct 2021 18:18:09 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7F13AF80224; Mon, 18 Oct 2021 18:18:08 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3B919F801DB for ; Mon, 18 Oct 2021 18:18:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3B919F801DB Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="mzxzQITa"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ctYIBvhx" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 003F821965; Mon, 18 Oct 2021 16:17:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1634573876; 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=tjYbLYL7z0m6nLPlETl40ptf5uotuordlLvSRSHiypY=; b=mzxzQITaCoiGpyWDVKtH8inS1A0pvEsHOCmrvQa5XZbs/hO9RRK2BUmzx1U+exauYnTSnU BD8MAYGLKEl/0cf/WdiO+MulfsZpEFf9j6SXO7WcHrm2MwNLkyvXUUglIn9AEAWi3h5y9g UYpy9xL1JhL4qZBq9CDPTqhTmGtDzeo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1634573876; 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=tjYbLYL7z0m6nLPlETl40ptf5uotuordlLvSRSHiypY=; b=ctYIBvhxcfvmnklOJ6h6eSbKWTyKBJqiQ5l5o3HKfOqZgeObkR5pXZ71Qa2t6/IOKyh/Gw vc6C18QjPxtCoECw== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id E52E0A3B81; Mon, 18 Oct 2021 16:17:55 +0000 (UTC) Date: Mon, 18 Oct 2021 18:17:55 +0200 Message-ID: From: Takashi Iwai To: Pierre-Louis Bossart Subject: Re: [PATCH v3 4/4] ASoC: SOF: Intel: add .ack support for HDaudio platforms In-Reply-To: <97cd3a79-bf2a-bb1a-7da1-89bc8bac2c13@linux.intel.com> References: <20211015195932.224925-1-pierre-louis.bossart@linux.intel.com> <20211015195932.224925-5-pierre-louis.bossart@linux.intel.com> <97cd3a79-bf2a-bb1a-7da1-89bc8bac2c13@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, broonie@kernel.org, P9ter Ujfalusi , Ranjani Sridharan , Kai Vehmanen X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, 18 Oct 2021 17:05:13 +0200, Pierre-Louis Bossart wrote: > > > > >> From: Ranjani Sridharan > >> > >> When we disable rewinds, then the .ack can be used to program SPIB > >> with the application pointer, which allows the HDaudio DMA to save > >> power by opportunistically bursting data transfers when the path to > >> memory is enabled (and conversely to shut it down when there are no > >> transfer requests). > >> > >> The SPIB register can only be programmed with incremental values with > >> wrap-around after the DMA RUN bits are set. For simplicity, we set the > >> INFO_NO_REWINDS flag in the .open callback when we already need to > >> program the SNDRV_PCM_INFO_EXPLICIT_SYNC flag. > > > > Using this flag itself isn't wrong, but if we need to check only > > appl_ptr updates, a more appropriate flag is > > SNDRV_PCM_INFO_SYNC_APPLPTR. This will still allow the mmap of status > > (i.e. hwptr update) while the mmap of control is disabled for > > appl_ptr. SNDRV_PCM_INFO_EXPLICIT_SYNC flag disables both, instead. > > I don't mind, but now we're officially out of INFO flags :-) > > NO_REWINDS took the last available bit... I mean only about the use EXPLICIT_SYNC flag. There has been already an info flag SYNC_APPLPTR, and this should suffice for your purpose. In a nutshell: EXPLICIT_SYNC = disable both control and status mmaps SYNC_APPLPTR = disable only control mmap Takashi