Re: [PATCH] dma: pl330: Add support for DMA_PAUSE command

From: Tushar Behera
Date: Thu May 15 2014 - 08:01:20 EST


On 14 May 2014 17:54, Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:
> On 05/14/2014 02:07 PM, Tushar Behera wrote:
>>
>> On 14 May 2014 17:29, Jassi Brar <jassisinghbrar@xxxxxxxxx> wrote:
>>>
>>> On Wed, May 14, 2014 at 8:53 AM, Tushar Behera <tushar.behera@xxxxxxxxxx>
>>> wrote:
>>>>
>>>> While playing back audio, pmc_dmaengine requests the DMA channel to
>>>> stop DMA transmission through DMA_PAUSE command.
>>>>
>>>> Currently PL330 driver doesn't support DMA pause command, leaving
>>>> the DMA state inconsistent when the system resumes. Instead, it would
>>>> be better to terminate the DMA transfer during suspend and restart
>>>> again during resume.
>>>>
>>>> Tested with audio playback across a suspend-resume cycle.
>>>>
>>> What is pmc_dmaengine? How does DMA_PAUSE help, when there is no
>>> DMA_RESUME?
>>>
>>
>> Sorry, it is a typo.
>>
>> sound/core/pcm_dmaengine.c:snd_dmaengine_pcm_trigger() -->
>> dmaengine_pause() is called during system suspend.
>
>
> It is only called if the DMA driver has support for pausing and resuming DMA
> transfers. Or at least that is the intention.
>
> - Lars

During suspend, snd_dmaengine_pcm_trigger():SNDRV_PCM_TRIGGER_SUSPEND
is called which unconditionally calls dmaengine_pause(). Should we
update snd_dmaengine_pcm_trigger() to check for DMA pause/resume
support and call dmaengine_pause() or dmaengine_terminate_all()
accordingly?


--
Tushar Behera
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/