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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 8CAF7C48BCF for ; Thu, 10 Jun 2021 03:15:57 +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 0781F61375 for ; Thu, 10 Jun 2021 03:15:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0781F61375 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 9DCB516BA; Thu, 10 Jun 2021 05:15:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9DCB516BA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1623294953; bh=wlyPyXAeVQYHxXQdYSvYP78PRZXV5UEMcJOvD7o0Ymw=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aLZx5tQ2urok4UrpEH9Uwvt3khOdzv+x3UnmMEvIlm2vQ8QRsCx9E8nto3AFHEIzb 0JNZyMHcbSIsw13Tk2dRaRLrtd1fiF9GsN5E2nB1HCTgGYXe2qEmm41v0bqMpXriID 8iKqjTQoY0Zj5pcsNcMDWJ+r64F42MP2tY2IWQEc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 923A2F8020D; Thu, 10 Jun 2021 05:15:02 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0608EF80218; Thu, 10 Jun 2021 05:15:00 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 245E1F80149 for ; Thu, 10 Jun 2021 05:14:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 245E1F80149 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="2Fb939B4"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="BpbhlU4E" Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id E9DC05C01A5; Wed, 9 Jun 2021 23:14:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 09 Jun 2021 23:14:49 -0400 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=fm1; bh=jz8NgmdbfpiT78FJMt4VTeaVp9v scgv8jebtDwUG6Qc=; b=2Fb939B47m3swCKWfmR2kCkY72I5sQlJodhL1HJh0gn UUI9Zgi35Iubdp6MNG+QErDx4hg2fzArAGP6+kslsTkrvAlKpogiVL0+pjLUXil+ NIgIlatDUQk7k5r5JfKZH3151apPiSnKyS8UpXUzX0kQxk1ISMlBj+fkcg1IPC0/ G57ee9Npn05F41Nab0iHOJMHqoanHR9KdunM6d9I7zY0AEVo3uFH0QSoqLlS/I6J wq4HydSpRyGUT0lTArKANs4cCcXohX+41LC6Ol8ldPT4P1DNglsagRJDgvrPHo25 JPR0VaARryjlDwERodNdqW8q+FpRa3p2fhvRiGBN8kw== 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=fm3; bh=jz8Ngm dbfpiT78FJMt4VTeaVp9vscgv8jebtDwUG6Qc=; b=BpbhlU4EoZXx130mPnnU4c 7Ai9+AzfSOoWXzR2Ydtt6X9B16bjp06eVXfHzXxrFDXJNSu3UPAArH3/8fEd3uWf BDTHLSQdixv5Wwq8r0sPxUaYxMTxlJn+pZkCWKum8t8jjSE6/NMvM7M5RTA6CrIf 7f33DFKhg4dQMDdVlFn4nk5wAoYCSxsb8Jb38fKZAoMsLPSH35jWILfBslRvZ6HX 5ugG69gIlm9KUjjj5yE6w8YKa2SN2JCtqkA42x/xIK2mxnARM7VEhynItUg8lnBV BdS7IjeOWt3RruhgSkrcYF89GmjJVOc7S7Mpdj+jQwSOpjCk/FhUv2wvBOWrB4Qg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeduvddgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesthdtre dttddtvdenucfhrhhomhepvfgrkhgrshhhihcuufgrkhgrmhhothhouceoohdqthgrkhgr shhhihesshgrkhgrmhhotggthhhirdhjpheqnecuggftrfgrthhtvghrnhepjeegieefue evueefieeggeejledvgfejgeffjefgvdekleehgfdtfeetjeelkeejnecuffhomhgrihhn pehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehoqdhtrghkrghshhhisehsrghkrghmohgttghhihdrjhhp X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 9 Jun 2021 23:14:48 -0400 (EDT) Date: Thu, 10 Jun 2021 12:14:45 +0900 From: Takashi Sakamoto To: tiwai@suse.de Subject: Re: [PATCH v3 0/3] ALSA: pcm: add snd_pcm_period_elapsed() variant without acquiring lock of PCM substream Message-ID: <20210610031445.GA51001@workstation> Mail-Followup-To: tiwai@suse.de, alsa-devel@alsa-project.org, clemens@ladisch.de References: <20210609232230.5963-1-o-takashi@sakamocchi.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210609232230.5963-1-o-takashi@sakamocchi.jp> Cc: alsa-devel@alsa-project.org, clemens@ladisch.de 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" Hi, On Thu, Jun 10, 2021 at 08:22:27AM +0900, Takashi Sakamoto wrote: > Hi, > > This patchset is revised version of my previous one: > * https://lore.kernel.org/alsa-devel/20210609143145.146680-1-o-takashi@sakamocchi.jp/ > > All of drivers in ALSA firewire stack have two chances to process > isochronous packets of any isochronous context; in software IRQ context > for 1394 OHCI, and in process context of ALSA PCM application. > > In the process context, callbacks of .pointer and .ack are utilized. The > callbacks are done by ALSA PCM core under acquiring lock of PCM substream, > > In design of ALSA PCM core, call of snd_pcm_period_elapsed() is used for > drivers to awaken user processes from waiting for available frames. The > function voluntarily acquires lock of PCM substream, therefore it is not > called in the process context since it causes dead lock. As a workaround > to avoid the dead lock, all of drivers in ALSA firewire stack use workqueue > to delegate the call. > > This patchset is my attempt for the issue. A variant of > 'snd_pcm_period_elapsed()' without lock acquisition is going to be added, > named 'snd_pcm_period_elapsed_under_stream_lock()'. The call is available > in callbacks of .pointer and .ack of snd_pcm_ops structure. > > Changes from v2: > * delete context section from kernel API documentation > > Takashi Sakamoto (3): > ALSA: pcm: add snd_pcm_period_elapsed() variant without acquiring lock > of PCM substream > ALSA: firewire-lib: operate for period elapse event in process context > ALSA: firewire-lib: obsolete workqueue for period update > > include/sound/pcm.h | 1 + > sound/core/pcm_lib.c | 64 +++++++++++++++++++++++++++-------- > sound/firewire/amdtp-stream.c | 46 ++++++++----------------- > sound/firewire/amdtp-stream.h | 1 - > 4 files changed, 64 insertions(+), 48 deletions(-) > > -- > 2.27.0 Mmm. 4 hours past but the rest of patchset is not delivered. I'll resend them again just in case... Regards Takashi Sakamoto