Thread (55 messages) 55 messages, 12 authors, 2012-05-02
STALE5165d

[PATCH 01/11] dma: imx-sdma: make channel0 operations atomic

From: Richard Zhao <hidden>
Date: 2012-04-27 11:26:56
Also in: alsa-devel, linux-i2c

On Fri, Apr 27, 2012 at 03:52:10PM +0530, Vinod Koul wrote:
On Fri, 2012-04-27 at 16:41 +0800, Richard Zhao wrote:
quoted
On Fri, Apr 27, 2012 at 01:51:40PM +0530, Vinod Koul wrote:
quoted
On Fri, 2012-04-27 at 15:02 +0800, Richard Zhao wrote:
quoted
device_prep_dma_cyclic may be call in audio trigger function which is
atomic context, so we make it atomic too.
No this is wrong behavior. You should not call dma prepare functions in
any of the sound trigger calls. It would make sense to move this in
sound prepare callback.
Then, could you please doc it somewhere? I think I'm not the only one
confused.
See the soc-dmaengine.c for correct behavior!
Do you mean sound/soc/soc-dmaengine-pcm.c ? It's where it calls dma
prepare in trigger function.
snd_dmaengine_pcm_trigger --> dmaengine_pcm_prepare_and_submit -->
dmaengine_prep_dma_cyclic
I can document only dmaengine behavior (which is already there)
Sure, I mean, can you doc in include/linux/dmaengine.h that
dmaengine_prep_xxx may sleep?
and not
how each subsystem should use this. People is subsystems need to see how
to use the dmaengine APIs sanely
Thanks
Richard

-- 
~Vinod
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help