From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: About snd_dmaengine_pcm_trigger() Date: Tue, 04 Mar 2014 21:20:47 -0800 (PST) Message-ID: <87eh2hql03.wl%kuninori.morimoto.gx@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pb0-f52.google.com (mail-pb0-f52.google.com [209.85.160.52]) by alsa0.perex.cz (Postfix) with ESMTP id EDDFE261A1A for ; Wed, 5 Mar 2014 06:20:49 +0100 (CET) Received: by mail-pb0-f52.google.com with SMTP id rr13so576528pbb.39 for ; Tue, 04 Mar 2014 21:20:48 -0800 (PST) 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: Mark Brown , Lars-Peter Clausen Cc: Linux-ALSA , Simon , Liam Girdwood , Kuninori Morimoto , Kuninori Morimoto List-Id: alsa-devel@alsa-project.org Hi Mark, Lars and all I need your opinion Now, I'm working for ${LINUX}/sound/soc/sh/fsi and ${LINUX}/sound/soc/sh/rcar drirvers. These drivers are supporting DMAEngine transfer, but it is using original DMAEngine method, not using snd_dmaengine_pcm_trigger() or snd_dmaengine_pcm_register(). I was requested to use it from Mark. The reason why I couldn't use it was our DMAEngine didn't have "cyclic" tranfer support which is used on dmaengine_pcm_prepare_and_submit() But now, I created cyclic support on our DMA driver (on my local PC at this point) Then, I noticed our drivers still can't use snd_dmaengine_pcm_xxx() method. 1st, our device needs PIO tranfer support too. Current PIO/DMA transfer are sharing many methods/functions. Code will become difficult to read if it is separated forcibly. (to using snd_dmaengine_pcm_xxx()) 2nd, our device DMA ON/OFF timing has relation ship to other register settings. Unfortunately, our device is picky, it needs like this HW init setting -> DMA ON -> HW start setting It can be solved if snd_dmaengine_pcm_xxx() has callbacks, but many callbacks are needed... 3rd, our device needs special method on snd_pcm_ops int the future. >>From my point of view, our driver can replace to use "cyclic" DMA transfer instead of current original DMAEngine method. I guess, it is not difficult. But, using snd_dmaengine_pcm_xxx() is difficult. But, what do you think ?