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 X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 759E4C2D0DB for ; Thu, 30 Jan 2020 23:57:51 +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 EB45420409 for ; Thu, 30 Jan 2020 23:57:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="khgoiwpT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="32HdEVxb"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="L7ys8uRc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB45420409 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@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 4618A1665; Fri, 31 Jan 2020 00:56:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4618A1665 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1580428669; bh=8nbN/7isnAEO/qb23amRkl37gzW7Cn7GBQKc+CAvMvQ=; h=Date:From:To:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=khgoiwpTZrHlvKaP4CTYHDdQ5U1uwyIiZ0k9NpMKm2yCQCMe+WmVMfANFN+B2Uur/ p65F6kcCtzx+tu2Q6IbRGQ036ya/TaISlC+QGqsSeXEjcVtuoJX2gjyaoaqj9f41Qa I953IZVw7R91wKv5nW2/t46ysmRzP5CLyZZbfRlc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AA98CF8014B; Fri, 31 Jan 2020 00:56:58 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D15B6F80150; Fri, 31 Jan 2020 00:56:56 +0100 (CET) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8B17AF800F1 for ; Fri, 31 Jan 2020 00:56:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8B17AF800F1 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="32HdEVxb"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="L7ys8uRc" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 46F666CC; Thu, 30 Jan 2020 18:56:44 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 30 Jan 2020 18:56:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=hb7qhwjpIqE9X+tTLLCywpipOJm K8farzkMjIXsOWK4=; b=32HdEVxbgVZHFQXKb6e9rNryzU9QKSB2zJVGgpiL3yd j7MnKODJl/eOboFquZDP0Q1xwXQRktHwu80YMufOgJA+IO7yNetUiI/2S3HERULF jLs3jNyEYBBHQ5N06pk1vlEK6LWUCR1eGfZ6O/BNbAt2R2dxyWBewq7JOzlEzSpq NxAu8HyLDEBTc6xfeIcZmoye15nHIPS9M1oh1KsJtfKwZuL1bKjmURrRYij1LR16 0Q9M0CU2BVTmSIv1Q7HUtmOJEZ2E6/exNQ8wooR3lC4BZuFnAOLSQvyV2W28vwBm /Uf4JmbJi3OoBmyAnPTK/DecurpqlDE6U9xX1z8QSXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=hb7qhw jpIqE9X+tTLLCywpipOJmK8farzkMjIXsOWK4=; b=L7ys8uRcMke0MzDwtW4zSC PtqdW48PnRx4Z3LbQazBl8gOL6gjVpJcsFGfletFXMb5zsZjlIdFkmm8fl9LQlvv wKj3SG0zyybBmwoBUKwBl0RE8rrfFeJPHRWbvFCFqodc8lCpX5JIFmqzMzUIqrv/ usWVlKMwXsFW+wLqfGNVC9ZpA5qSQ/6P/ewbBqEWBVfS9OuB3yo/ZBB2Et4Pzbwf 70LYFXuS9VpMcKCjTwyFKucj1FNrO+xXpmZ2/4YBDgcHpcF8hV3GF0U95DKzM0YM AUESw3n/MNeWcJ/WUPi74qi/EeJLLO2DAX8AGBiHVmZ154YxnhLEoDGE8kX9Tj/A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrfeelgddufecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujggfsehttdertddtredvnecuhfhrohhmpefvrghkrghs hhhiucfurghkrghmohhtohcuoehoqdhtrghkrghshhhisehsrghkrghmohgttghhihdrjh hpqeenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppedugedrfedrjeegrddu ieeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepoh dqthgrkhgrshhhihesshgrkhgrmhhotggthhhirdhjph X-ME-Proxy: Received: from workstation (ae074168.dynamic.ppp.asahi-net.or.jp [14.3.74.168]) by mail.messagingengine.com (Postfix) with ESMTPA id 1076B3060A88; Thu, 30 Jan 2020 18:56:41 -0500 (EST) Date: Fri, 31 Jan 2020 08:56:39 +0900 From: Takashi Sakamoto To: Pierre-Louis Bossart Message-ID: <20200130235639.GA3796@workstation> Mail-Followup-To: Pierre-Louis Bossart , Jaroslav Kysela , sylvain.bertrand@gmail.com, alsa-devel@alsa-project.org References: <20200129232340.GA23769@freedom> <20200130070642.GA7741@workstation> <857505b9-2375-7d73-5c1a-644dff952cdd@perex.cz> <9cbee940-05b9-e7ea-d51f-a6ef9e0cf1bb@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9cbee940-05b9-e7ea-d51f-a6ef9e0cf1bb@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: alsa-devel@alsa-project.org, sylvain.bertrand@gmail.com Subject: Re: [alsa-devel] no period wakeup support 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Thu, Jan 30, 2020 at 07:22:00AM -0600, Pierre-Louis Bossart wrote: > On 1/30/20 1:46 AM, Jaroslav Kysela wrote: > > Dne 30. 01. 20 v 8:06 Takashi Sakamoto napsal(a): > > > On Wed, Jan 29, 2020 at 05:43:19PM -0600, Pierre-Louis Bossart wrote: > > > > > Nowadays, is this reasonable to consider disabling the > > > > > period wakeup as default > > > > > instead of expecting period wakeup by default? > > > > > > > > I'd say yes - it's been nearly 10 years since this capability > > > > was added, and > > > > it's quite common across HDaudio, Chrome, Android plaforms. > > > > > > > > But considering this as a default doesn't mean it's available in > > > > 100% of the > > > > cases, you still you need to check that > > > > > > > > a) the driver is capable of disabling the period wakeup > > > > b) the driver is capable of providing a precise position outside > > > > of period > > > > elapsed events (usually marked with the INFO_BATCH capability). > > > > > > > > alsa-lib gives you the means to query both cases. > > > > > > > > Note that you also have the case where you cannot disable > > > > interrupts but can > > > > still use timer-based solutions (e.g. for USB audio). > > > > > > I suspect this advice. > > > > > > In design of ALSA PCM core, runtime of PCM substream is configured for > > > the mode of no-period-wakeup just in a case that userspace application > > > requests it[1]. > > > > > > As long as developers take enough care of compatibility for existent > > > applications, it's better to support period wakeup for each IRQ as a > > > default, then support no-period-wakeup mode as an option. > > > > > > > > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/tree/sound/core/pcm_native.c#n715 > > > > > > > I agree. We should not break the basic part of the API. > > I think you misunderstood my point. I was suggesting an approach similar to > that of PulseAudio/CRAS/Android, where you first try and use the > no-period-wakeup, and fallback to the traditional interrupt-based mode if > it's not possible. The idea is that the no-period-wakeup should work now in > a majority of the cases, so should be the primary mode recommended, not to > deprecate or break the period-based solution. Although I've expected your assumption on the above (of cource), I think it is not reasonable since it misleads people toward the localized solution with limited number of applications and purposes. It ignores actual design of ALSA PCM core even if it just satisfies the use cases in your and his work. Regards Takashi Sakamoto _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel