From: Sebastien Guiriec <s-guiriec@ti.com>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: Vinod Koul <vinod.koul@intel.com>,
Markus Pargmann <mpa@pengutronix.de>,
alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] ASoC: dmaengine_pcm: add snd_dmaengine_generic_pcm_open()
Date: Fri, 22 Mar 2013 09:07:21 +0100 [thread overview]
Message-ID: <514C1139.6050309@ti.com> (raw)
In-Reply-To: <20130321145258.GC23109@S2101-09.ap.freescale.net>
On 03/21/2013 03:53 PM, Shawn Guo wrote:
> On Thu, Mar 21, 2013 at 03:27:18PM +0530, Vinod Koul wrote:
>> On Fri, Mar 15, 2013 at 11:36:41AM +0800, Shawn Guo wrote:
>>> With generic DMA device tree binding and helper function
>>> dma_request_slave_channel() in place, dmaengine_pcm should support
>>> that in requesting DMA channel for users that support generic DMA
>>> device tree binding.
>>>
>>> Add a new API snd_dmaengine_generic_pcm_open() as the variant of
>>> snd_dmaengine_pcm_open(). It takes DMA client struct device pointer
>>> and slave channel name as arguments and calls generic DMA helper
>>> dma_request_slave_channel() to request DMA channel from dmaengine.
>> NAK
>>
>> This is why we have dma_request_slave_channel_compat() API. You dont need to
>> write two open handlers here, just pass all the arguments and if DT is set it
>> will allocate a channel using dma_request_slave_channel() otherwise will do
>> dma_request_channel which is what you need.
>
> I do not quite follow your comment. Let me try to understand it. Are
> you suggesting that instead of the current call path:
>
> snd_dmaengine_pcm_open()
> dmaengine_pcm_request_channel()
> dma_request_channel()
>
> we should change it as below?
>
> snd_dmaengine_pcm_open()
> dmaengine_pcm_request_channel()
> dma_request_slave_channel_compat()
>
> If that's the case, you are fundamentally requesting to change the
> fingerprint of API snd_dmaengine_pcm_open() from the existing:
>
> int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream,
> dma_filter_fn filter_fn, void *filter_data)
>
> to something like:
>
> int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream,
> dma_filter_fn filter_fn, void *filter_data,
> struct device *dev, const char *name)
>
> So every single user of snd_dmaengine_pcm_open() needs to adapt to the
> interface change.
>
> Is my understanding correct? Or have I misunderstood your comment?
This is what has been done on OMAP for other IPs. I have tested this
solution for Audio before you submit your first series and it is working.
Now I will wait Lars serie to check again on OMAP and let Mark comment
on the best approach. Whereas update current API like you propose or
wait Lars series and move on according to the different comments done on
open function. As OMAP audio DMA binding are depending on the chosen
solution.
Sebastien.
>
> Shawn
>
>
WARNING: multiple messages have this Message-ID (diff)
From: s-guiriec@ti.com (Sebastien Guiriec)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ASoC: dmaengine_pcm: add snd_dmaengine_generic_pcm_open()
Date: Fri, 22 Mar 2013 09:07:21 +0100 [thread overview]
Message-ID: <514C1139.6050309@ti.com> (raw)
In-Reply-To: <20130321145258.GC23109@S2101-09.ap.freescale.net>
On 03/21/2013 03:53 PM, Shawn Guo wrote:
> On Thu, Mar 21, 2013 at 03:27:18PM +0530, Vinod Koul wrote:
>> On Fri, Mar 15, 2013 at 11:36:41AM +0800, Shawn Guo wrote:
>>> With generic DMA device tree binding and helper function
>>> dma_request_slave_channel() in place, dmaengine_pcm should support
>>> that in requesting DMA channel for users that support generic DMA
>>> device tree binding.
>>>
>>> Add a new API snd_dmaengine_generic_pcm_open() as the variant of
>>> snd_dmaengine_pcm_open(). It takes DMA client struct device pointer
>>> and slave channel name as arguments and calls generic DMA helper
>>> dma_request_slave_channel() to request DMA channel from dmaengine.
>> NAK
>>
>> This is why we have dma_request_slave_channel_compat() API. You dont need to
>> write two open handlers here, just pass all the arguments and if DT is set it
>> will allocate a channel using dma_request_slave_channel() otherwise will do
>> dma_request_channel which is what you need.
>
> I do not quite follow your comment. Let me try to understand it. Are
> you suggesting that instead of the current call path:
>
> snd_dmaengine_pcm_open()
> dmaengine_pcm_request_channel()
> dma_request_channel()
>
> we should change it as below?
>
> snd_dmaengine_pcm_open()
> dmaengine_pcm_request_channel()
> dma_request_slave_channel_compat()
>
> If that's the case, you are fundamentally requesting to change the
> fingerprint of API snd_dmaengine_pcm_open() from the existing:
>
> int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream,
> dma_filter_fn filter_fn, void *filter_data)
>
> to something like:
>
> int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream,
> dma_filter_fn filter_fn, void *filter_data,
> struct device *dev, const char *name)
>
> So every single user of snd_dmaengine_pcm_open() needs to adapt to the
> interface change.
>
> Is my understanding correct? Or have I misunderstood your comment?
This is what has been done on OMAP for other IPs. I have tested this
solution for Audio before you submit your first series and it is working.
Now I will wait Lars serie to check again on OMAP and let Mark comment
on the best approach. Whereas update current API like you propose or
wait Lars series and move on according to the different comments done on
open function. As OMAP audio DMA binding are depending on the chosen
solution.
Sebastien.
>
> Shawn
>
>
next prev parent reply other threads:[~2013-03-22 8:08 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 3:36 [PATCH 0/2] ASoC: dmaengine_pcm: support generic DMA binding users Shawn Guo
2013-03-15 3:36 ` Shawn Guo
2013-03-15 3:36 ` [PATCH 1/2] dmaengine: add const for name parameter Shawn Guo
2013-03-15 3:36 ` Shawn Guo
2013-03-15 8:53 ` Markus Pargmann
2013-03-15 8:53 ` Markus Pargmann
2013-03-21 9:47 ` Vinod Koul
2013-03-21 9:47 ` Vinod Koul
2013-03-21 13:10 ` Markus Pargmann
2013-03-21 13:10 ` Markus Pargmann
2013-03-21 12:54 ` Vinod Koul
2013-03-21 12:54 ` Vinod Koul
2013-03-21 14:45 ` [PATCH] DMA: of: const name fixup Markus Pargmann
2013-03-21 14:45 ` Markus Pargmann
2013-03-21 14:57 ` [PATCH 1/2] dmaengine: add const for name parameter Shawn Guo
2013-03-21 14:57 ` Shawn Guo
2013-04-02 17:51 ` Vinod Koul
2013-04-02 17:51 ` Vinod Koul
2013-04-02 19:47 ` Mark Brown
2013-04-02 19:47 ` Mark Brown
2013-03-15 3:36 ` [PATCH 2/2] ASoC: dmaengine_pcm: add snd_dmaengine_generic_pcm_open() Shawn Guo
2013-03-15 3:36 ` Shawn Guo
2013-03-15 10:00 ` Sebastien Guiriec
2013-03-15 10:00 ` Sebastien Guiriec
2013-03-21 9:57 ` Vinod Koul
2013-03-21 9:57 ` Vinod Koul
2013-03-21 14:53 ` Shawn Guo
2013-03-21 14:53 ` Shawn Guo
2013-03-22 8:07 ` Sebastien Guiriec [this message]
2013-03-22 8:07 ` Sebastien Guiriec
2013-03-22 8:39 ` Shawn Guo
2013-03-22 8:39 ` Shawn Guo
2013-03-21 2:39 ` [PATCH 0/2] ASoC: dmaengine_pcm: support generic DMA binding users Shawn Guo
2013-03-21 2:39 ` Shawn Guo
2013-03-21 15:06 ` Lars-Peter Clausen
2013-03-21 15:06 ` [alsa-devel] " Lars-Peter Clausen
2013-03-21 15:22 ` Mark Brown
2013-03-21 15:22 ` [alsa-devel] " Mark Brown
2013-03-21 16:26 ` Lars-Peter Clausen
2013-03-21 16:26 ` [alsa-devel] " Lars-Peter Clausen
2013-03-21 16:47 ` Mark Brown
2013-03-21 16:47 ` [alsa-devel] " Mark Brown
2013-03-22 11:30 ` Russell King - ARM Linux
2013-03-22 11:30 ` [alsa-devel] " Russell King - ARM Linux
2013-03-22 11:39 ` Lars-Peter Clausen
2013-03-22 11:39 ` [alsa-devel] " Lars-Peter Clausen
2013-03-22 11:17 ` Russell King - ARM Linux
2013-03-22 11:17 ` [alsa-devel] " Russell King - ARM Linux
2013-03-22 11:28 ` Mark Brown
2013-03-22 11:28 ` [alsa-devel] " Mark Brown
2013-03-22 11:42 ` Lars-Peter Clausen
2013-03-22 11:42 ` [alsa-devel] " Lars-Peter Clausen
2013-03-22 11:48 ` Mark Brown
2013-03-22 11:48 ` [alsa-devel] " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=514C1139.6050309@ti.com \
--to=s-guiriec@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mpa@pengutronix.de \
--cc=shawn.guo@linaro.org \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.