From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Ujfalusi Subject: Re: [PATCH v2 04/15] dmaengine: Pass no_wakeup parameter via device_prep_dma_cyclic() callback Date: Fri, 14 Sep 2012 10:07:23 +0300 Message-ID: <5052D7AB.1090804@ti.com> References: <1347543485-339-1-git-send-email-peter.ujfalusi@ti.com> <1347543485-339-5-git-send-email-peter.ujfalusi@ti.com> <1347593040.1943.24.camel@vkoul-udesk3> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1347593040.1943.24.camel@vkoul-udesk3> Sender: linux-omap-owner@vger.kernel.org To: Vinod Koul Cc: 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 , Lars-Peter Clausen , Nicolas Ferre , Barry Song , Srinidhi Kasagar , Russell King - ARM Linux , Vista Silicon , Zhangfei Gao , Shawn Guo , Laxman Dewangan List-Id: alsa-devel@alsa-project.org On 09/14/2012 06:24 AM, Vinod Koul wrote: > On Thu, 2012-09-13 at 16:37 +0300, Peter Ujfalusi wrote: >> Change the parameter list of device_prep_dma_cyclic() so the DMA dri= vers >> can receive the no_wakeup request coming from client drivers. >> This feature can be used during audio operation to disable all audio >> related interrupts. > We already have a flag to indicate this, see=20 > * @DMA_PREP_INTERRUPT - trigger an interrupt (callback) upon completi= on of > * this transaction I have also noticed this flag. It is not really a direct match for our = case since the notion of "completion of this transfer" is not applicable for= cyclic mode, but it is close enough. > Unfortunately, the addition of cyclic API missed having this flag. So > right way would be to add flag argument in the API. I have not looked at the non cyclic APIs, but I think I can modify the dmaengine_prep_dma_cyclic() to pass the flags instead of the 'bool no_w= akeup'. If the DMA_PREP_INTERRUPT is not set dma drivers can interpret it in a = way that they will disable all interrupts during cyclic mode. None of the dma drivers in cyclic mode cares about the flags AFAIK or t= hey can just ignore this parameter for now (as they did with my no_wakeup param= eter). Will resend the series soon with this change. --=20 P=C3=A9ter -- To unsubscribe from this list: send the line "unsubscribe linux-omap" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: peter.ujfalusi@ti.com (Peter Ujfalusi) Date: Fri, 14 Sep 2012 10:07:23 +0300 Subject: [PATCH v2 04/15] dmaengine: Pass no_wakeup parameter via device_prep_dma_cyclic() callback In-Reply-To: <1347593040.1943.24.camel@vkoul-udesk3> References: <1347543485-339-1-git-send-email-peter.ujfalusi@ti.com> <1347543485-339-5-git-send-email-peter.ujfalusi@ti.com> <1347593040.1943.24.camel@vkoul-udesk3> Message-ID: <5052D7AB.1090804@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 09/14/2012 06:24 AM, Vinod Koul wrote: > On Thu, 2012-09-13 at 16:37 +0300, Peter Ujfalusi wrote: >> Change the parameter list of device_prep_dma_cyclic() so the DMA drivers >> can receive the no_wakeup request coming from client drivers. >> This feature can be used during audio operation to disable all audio >> related interrupts. > We already have a flag to indicate this, see > * @DMA_PREP_INTERRUPT - trigger an interrupt (callback) upon completion of > * this transaction I have also noticed this flag. It is not really a direct match for our case since the notion of "completion of this transfer" is not applicable for cyclic mode, but it is close enough. > Unfortunately, the addition of cyclic API missed having this flag. So > right way would be to add flag argument in the API. I have not looked at the non cyclic APIs, but I think I can modify the dmaengine_prep_dma_cyclic() to pass the flags instead of the 'bool no_wakeup'. If the DMA_PREP_INTERRUPT is not set dma drivers can interpret it in a way that they will disable all interrupts during cyclic mode. None of the dma drivers in cyclic mode cares about the flags AFAIK or they can just ignore this parameter for now (as they did with my no_wakeup parameter). Will resend the series soon with this change. -- 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 S1752243Ab2INHGr (ORCPT ); Fri, 14 Sep 2012 03:06:47 -0400 Received: from na3sys009aog103.obsmtp.com ([74.125.149.71]:48250 "EHLO na3sys009aog103.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754569Ab2INHGp (ORCPT ); Fri, 14 Sep 2012 03:06:45 -0400 Message-ID: <5052D7AB.1090804@ti.com> Date: Fri, 14 Sep 2012 10:07:23 +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: 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 , Lars-Peter Clausen , Nicolas Ferre , Barry Song , Srinidhi Kasagar , Russell King - ARM Linux , Vista Silicon , Zhangfei Gao , Shawn Guo , Laxman Dewangan Subject: Re: [PATCH v2 04/15] dmaengine: Pass no_wakeup parameter via device_prep_dma_cyclic() callback References: <1347543485-339-1-git-send-email-peter.ujfalusi@ti.com> <1347543485-339-5-git-send-email-peter.ujfalusi@ti.com> <1347593040.1943.24.camel@vkoul-udesk3> In-Reply-To: <1347593040.1943.24.camel@vkoul-udesk3> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/14/2012 06:24 AM, Vinod Koul wrote: > On Thu, 2012-09-13 at 16:37 +0300, Peter Ujfalusi wrote: >> Change the parameter list of device_prep_dma_cyclic() so the DMA drivers >> can receive the no_wakeup request coming from client drivers. >> This feature can be used during audio operation to disable all audio >> related interrupts. > We already have a flag to indicate this, see > * @DMA_PREP_INTERRUPT - trigger an interrupt (callback) upon completion of > * this transaction I have also noticed this flag. It is not really a direct match for our case since the notion of "completion of this transfer" is not applicable for cyclic mode, but it is close enough. > Unfortunately, the addition of cyclic API missed having this flag. So > right way would be to add flag argument in the API. I have not looked at the non cyclic APIs, but I think I can modify the dmaengine_prep_dma_cyclic() to pass the flags instead of the 'bool no_wakeup'. If the DMA_PREP_INTERRUPT is not set dma drivers can interpret it in a way that they will disable all interrupts during cyclic mode. None of the dma drivers in cyclic mode cares about the flags AFAIK or they can just ignore this parameter for now (as they did with my no_wakeup parameter). Will resend the series soon with this change. -- Péter