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=-0.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 58E53C432C0 for ; Mon, 18 Nov 2019 18:53:10 +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 DA513222ED for ; Mon, 18 Nov 2019 18:53:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="KEuLKAmS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA513222ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de 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 F1F501684; Mon, 18 Nov 2019 19:52:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F1F501684 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1574103188; bh=U9AphPABno8aT8ALbeiR82KE8hyt11xAbnuxzq+9ceM=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KEuLKAmSMKXmtwJVDF20zVYCBNehpLlpoxtMdE6x/e7fmvA/5bC/jbskgzGRt4WUG tZ9fuubL7eChPQdxPmtUJCH8e8vGdoXr4In4xMlpoqkyGbcK+Pc5ToRfcS64jD01/a al3Jt5WlBjUL2uZqNkhPZNhgyIMKQWCO9Nc0iFVI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 32089F800FF; Mon, 18 Nov 2019 19:52:17 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EB82DF8013B; Mon, 18 Nov 2019 19:52:15 +0100 (CET) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B60BDF800FF for ; Mon, 18 Nov 2019 19:52:08 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B60BDF800FF X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2E20BAD31; Mon, 18 Nov 2019 18:52:07 +0000 (UTC) Date: Mon, 18 Nov 2019 19:52:06 +0100 Message-ID: From: Takashi Iwai To: Pierre-Louis Bossart In-Reply-To: <3b407a02-b791-52a4-2335-e21d8ab732dd@linux.intel.com> References: <20191117085308.23915-1-tiwai@suse.de> <20191117085308.23915-8-tiwai@suse.de> <3b407a02-b791-52a4-2335-e21d8ab732dd@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") Cc: alsa-devel@alsa-project.org, Ranjani Sridharan Subject: Re: [alsa-devel] [PATCH 7/8] ALSA: pcm: Add card sync_irq field 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 Mon, 18 Nov 2019 17:38:49 +0100, Pierre-Louis Bossart wrote: > > > > On 11/17/19 2:53 AM, Takashi Iwai wrote: > > Many PCI and other drivers performs snd_pcm_period_elapsed() simply in > > its interrupt handler, so the sync_stop operation is just to call > > synchronize_irq(). Instead of putting this call multiple times, > > introduce the common card->sync_irq field. When this field is set, > > PCM core performs synchronize_irq() for sync-stop operation. Each > > driver just needs to copy its local IRQ number to card->sync_irq, and > > that's all we need. > > Maybe a red-herring or complete non-sense, but I wonder if this is > going to get in the way of Ranjani's multi-client work, where we could > have multiple cards created but with a single IRQ handled by the > parent PCI device? > > Ranjani, you may want to double-check this and chime in, thanks! The synchronize_irq() is fairly safe to call multiple times, and I don't think any problem by invoking it for multi-clients sharing the same IRQ. For example, Digigram miXart driver creates multiple card objects from a single PCI entry, and I already thought of that possibility; they set the same card->sync_irq value to all card objects, which eventually will call synchronize_irq() multiple times. From the performance POV, this shouldn't be a big problem, because the place calling this is only at hw_params, prepare and hw_free, neither are hot-path. thanks, Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel