From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Ujfalusi Subject: Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic() Date: Fri, 14 Sep 2012 12:28:28 +0300 Message-ID: <5052F8BC.4020102@ti.com> References: <1347543485-339-1-git-send-email-peter.ujfalusi@ti.com> <1347543485-339-4-git-send-email-peter.ujfalusi@ti.com> <5051FB4D.3000009@metafoo.de> <1347593217.1943.26.camel@vkoul-udesk3> <5052E72A.8040207@metafoo.de> <1347612630.1943.29.camel@vkoul-udesk3> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from na3sys009aog112.obsmtp.com (na3sys009aog112.obsmtp.com [74.125.149.207]) by alsa0.perex.cz (Postfix) with ESMTP id 1F7B7265CAA for ; Fri, 14 Sep 2012 11:27:48 +0200 (CEST) Received: by oagl20 with SMTP id l20so2671249oag.38 for ; Fri, 14 Sep 2012 02:27:47 -0700 (PDT) In-Reply-To: <1347612630.1943.29.camel@vkoul-udesk3> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Vinod Koul Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen , Janusz Krzysztofik , Tony Lindgren , Ricardo Neri , Mark Brown , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dan Williams , Russell King , linux-omap@vger.kernel.org, Liam Girdwood , Jarkko Nikula List-Id: alsa-devel@alsa-project.org Hi, On 09/14/2012 11:50 AM, Vinod Koul wrote: >> Well, the idea was that the driver would disable interrupts if there is = no >> callback to call, since there would be nothing to do in the interrupt >> handler anyway. But I guess the flags approach should work fine as well. > Yes we _could_ do that, but this relies on dmaengine driver to have this > implicit understanding. Anyone using dmaengine library in ASoC may or > may not be aware of this, so i would consider it hackish. > = > Using this flag explicitly makes everyone aware what the intended > behaviour is. I'm not sure about which flags should ASoC set for the two case we are going to have. I think it should be something like this: unsigned long flags =3D DMA_CTRL_ACK; if (!substream->runtime->no_period_wakeup) flags |=3D DMA_PREP_INTERRUPT; I'm not 100% sure of the role of DMA_CTRL_ACK in this case. Or should we on= ly handle the DMA_PREP_INTERRUPT flag, like this: unsigned long flags =3D 0; if (!substream->runtime->no_period_wakeup) flags |=3D DMA_PREP_INTERRUPT; What do you think? -- = P=E9ter From mboxrd@z Thu Jan 1 00:00:00 1970 From: peter.ujfalusi@ti.com (Peter Ujfalusi) Date: Fri, 14 Sep 2012 12:28:28 +0300 Subject: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic() In-Reply-To: <1347612630.1943.29.camel@vkoul-udesk3> References: <1347543485-339-1-git-send-email-peter.ujfalusi@ti.com> <1347543485-339-4-git-send-email-peter.ujfalusi@ti.com> <5051FB4D.3000009@metafoo.de> <1347593217.1943.26.camel@vkoul-udesk3> <5052E72A.8040207@metafoo.de> <1347612630.1943.29.camel@vkoul-udesk3> Message-ID: <5052F8BC.4020102@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On 09/14/2012 11:50 AM, Vinod Koul wrote: >> Well, the idea was that the driver would disable interrupts if there is no >> callback to call, since there would be nothing to do in the interrupt >> handler anyway. But I guess the flags approach should work fine as well. > Yes we _could_ do that, but this relies on dmaengine driver to have this > implicit understanding. Anyone using dmaengine library in ASoC may or > may not be aware of this, so i would consider it hackish. > > Using this flag explicitly makes everyone aware what the intended > behaviour is. I'm not sure about which flags should ASoC set for the two case we are going to have. I think it should be something like this: unsigned long flags = DMA_CTRL_ACK; if (!substream->runtime->no_period_wakeup) flags |= DMA_PREP_INTERRUPT; I'm not 100% sure of the role of DMA_CTRL_ACK in this case. Or should we only handle the DMA_PREP_INTERRUPT flag, like this: unsigned long flags = 0; if (!substream->runtime->no_period_wakeup) flags |= DMA_PREP_INTERRUPT; What do you think? -- P?ter From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759371Ab2INJ1w (ORCPT ); Fri, 14 Sep 2012 05:27:52 -0400 Received: from na3sys009aog118.obsmtp.com ([74.125.149.244]:56996 "EHLO na3sys009aog118.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759332Ab2INJ1s (ORCPT ); Fri, 14 Sep 2012 05:27:48 -0400 Message-ID: <5052F8BC.4020102@ti.com> Date: Fri, 14 Sep 2012 12:28:28 +0300 From: Peter Ujfalusi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120903 Thunderbird/15.0 MIME-Version: 1.0 To: Vinod Koul CC: Lars-Peter Clausen , Mark Brown , Liam Girdwood , Tony Lindgren , Russell King , Dan Williams , Jarkko Nikula , alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Janusz Krzysztofik , Ricardo Neri Subject: Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic() References: <1347543485-339-1-git-send-email-peter.ujfalusi@ti.com> <1347543485-339-4-git-send-email-peter.ujfalusi@ti.com> <5051FB4D.3000009@metafoo.de> <1347593217.1943.26.camel@vkoul-udesk3> <5052E72A.8040207@metafoo.de> <1347612630.1943.29.camel@vkoul-udesk3> In-Reply-To: <1347612630.1943.29.camel@vkoul-udesk3> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 09/14/2012 11:50 AM, Vinod Koul wrote: >> Well, the idea was that the driver would disable interrupts if there is no >> callback to call, since there would be nothing to do in the interrupt >> handler anyway. But I guess the flags approach should work fine as well. > Yes we _could_ do that, but this relies on dmaengine driver to have this > implicit understanding. Anyone using dmaengine library in ASoC may or > may not be aware of this, so i would consider it hackish. > > Using this flag explicitly makes everyone aware what the intended > behaviour is. I'm not sure about which flags should ASoC set for the two case we are going to have. I think it should be something like this: unsigned long flags = DMA_CTRL_ACK; if (!substream->runtime->no_period_wakeup) flags |= DMA_PREP_INTERRUPT; I'm not 100% sure of the role of DMA_CTRL_ACK in this case. Or should we only handle the DMA_PREP_INTERRUPT flag, like this: unsigned long flags = 0; if (!substream->runtime->no_period_wakeup) flags |= DMA_PREP_INTERRUPT; What do you think? -- Péter