Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-14 Thread Peter Ujfalusi
Hi, On 09/13/2012 06:27 PM, Lars-Peter Clausen wrote: On 09/13/2012 03:37 PM, Peter Ujfalusi wrote: The dmaengine_prep_dma_cyclic() function primarily used by audio for cyclic transfer required by ALSA. With this new parameter it is going to be possible to enable the

Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-14 Thread Peter Ujfalusi
On 09/13/2012 06:38 PM, Russell King - ARM Linux wrote: On Thu, Sep 13, 2012 at 05:27:09PM +0200, Lars-Peter Clausen wrote: Hm... Do you think it would work as well if we implement this by setting the callback for the descriptor to NULL? If the callback is NULL there is nothing to at the end

Re: [alsa-devel] [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-14 Thread Peter Ujfalusi
On 09/14/2012 06:26 AM, Vinod Koul wrote: On Thu, 2012-09-13 at 17:27 +0200, Lars-Peter Clausen wrote: Hi, Hm... Do you think it would work as well if we implement this by setting the callback for the descriptor to NULL? If the callback is NULL there is nothing to at the end of a

Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-14 Thread Lars-Peter Clausen
On 09/14/2012 05:26 AM, Vinod Koul wrote: On Thu, 2012-09-13 at 17:27 +0200, Lars-Peter Clausen wrote: Hi, Hm... Do you think it would work as well if we implement this by setting the callback for the descriptor to NULL? If the callback is NULL there is nothing to at the end of a

Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-14 Thread Vinod Koul
On Fri, 2012-09-14 at 10:13 +0200, Lars-Peter Clausen wrote: On 09/14/2012 05:26 AM, Vinod Koul wrote: On Thu, 2012-09-13 at 17:27 +0200, Lars-Peter Clausen wrote: Hi, Hm... Do you think it would work as well if we implement this by setting the callback for the descriptor to NULL? If

Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-14 Thread Peter Ujfalusi
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

Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-14 Thread Vinod Koul
On Fri, 2012-09-14 at 12:28 +0300, Peter Ujfalusi wrote: 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

Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-14 Thread Russell King - ARM Linux
On Fri, Sep 14, 2012 at 12:28:28PM +0300, Peter Ujfalusi wrote: 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 |=

[PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-13 Thread Peter Ujfalusi
The dmaengine_prep_dma_cyclic() function primarily used by audio for cyclic transfer required by ALSA. With this new parameter it is going to be possible to enable the SNDRV_PCM_INFO_NO_PERIOD_WAKEUP mode on platforms where it is possible. This patch only changes the public API first. Followup

Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-13 Thread Lars-Peter Clausen
On 09/13/2012 03:37 PM, Peter Ujfalusi wrote: The dmaengine_prep_dma_cyclic() function primarily used by audio for cyclic transfer required by ALSA. With this new parameter it is going to be possible to enable the SNDRV_PCM_INFO_NO_PERIOD_WAKEUP mode on platforms where it is possible. This

Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-13 Thread Russell King - ARM Linux
On Thu, Sep 13, 2012 at 05:27:09PM +0200, Lars-Peter Clausen wrote: Hm... Do you think it would work as well if we implement this by setting the callback for the descriptor to NULL? If the callback is NULL there is nothing to at the end of a transfer/period and the dma engine driver may choose

Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-13 Thread Vinod Koul
On Thu, 2012-09-13 at 17:27 +0200, Lars-Peter Clausen wrote: Hi, Hm... Do you think it would work as well if we implement this by setting the callback for the descriptor to NULL? If the callback is NULL there is nothing to at the end of a transfer/period and the dma engine driver may

Re: [PATCH v2 03/15] dmaengine: Add no_wakeup parameter to dmaengine_prep_dma_cyclic()

2012-09-13 Thread Vinod Koul
On Thu, 2012-09-13 at 16:38 +0100, Russell King - ARM Linux wrote: On Thu, Sep 13, 2012 at 05:27:09PM +0200, Lars-Peter Clausen wrote: Hm... Do you think it would work as well if we implement this by setting the callback for the descriptor to NULL? If the callback is NULL there is nothing