From: Rajeev kumar <rajeev-dlh.kumar@st.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Mark Brown <broonie@kernel.org>,
Stephen Warren <swarren@nvidia.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Stephen Warren <swarren@wwwdotorg.org>
Subject: Re: [PATCH 4/5] ASoC: SPEAr: remove custom DMA alloc compat function
Date: Tue, 10 Dec 2013 17:14:43 +0530 [thread overview]
Message-ID: <52A6FEAB.108@st.com> (raw)
In-Reply-To: <52A6D81E.2090302@metafoo.de>
On 12/10/2013 2:30 PM, Lars-Peter Clausen wrote:
> On 12/10/2013 09:53 AM, Rajeev kumar wrote:
>> On 12/10/2013 1:15 PM, Lars-Peter Clausen wrote:
>>> On 12/10/2013 07:30 AM, Rajeev kumar wrote:
>>>> On 12/10/2013 2:47 AM, Lars-Peter Clausen wrote:
>>>>> On 12/09/2013 09:24 PM, Stephen Warren wrote:
>>>>>> From: Stephen Warren<swarren@nvidia.com>
>>>>>>
>>>>>> spear_pcm_request_chan() is almost identical to
>>>>>> dmaengine_pcm_compat_request_channel(), with the exception that the
>>>>>> latter:
>>>>>>
>>>>>> a) Assumes that the DAI DMA data is a struct snd_dmaengine_dai_dma_data
>>>>>> pointer rather than some custom type.
>>>>>>
>>>>>> b) dma_data->filter_data rather than dma_data should be passed to
>>>>>> snd_dmaengine_pcm_request_channel() as the filter data.
>>>>>>
>>>>>> Make minor changes to the SPEAr DAI drivers so that those two conditions
>>>>>> are met. This allows removal of the custom .compat_request_channel().
>>>>>>
>>>>>> Signed-off-by: Stephen Warren<swarren@nvidia.com>
>>>>>> ---
>>>>>> include/sound/spear_dma.h | 1 -
>>>>>> sound/soc/spear/spdif_in.c | 10 +++++++---
>>>>>> sound/soc/spear/spdif_out.c | 10 +++++++---
>>>>>> sound/soc/spear/spear_pcm.c | 21 +++++++--------------
>>>>>> sound/soc/spear/spear_pcm.h | 4 +++-
>>>>>> 5 files changed, 24 insertions(+), 22 deletions(-)
>>>>>>
>>>>>> diff --git a/include/sound/spear_dma.h b/include/sound/spear_dma.h
>>>>>> index 1b365bfdfb37..65aca51fe255 100644
>>>>>> --- a/include/sound/spear_dma.h
>>>>>> +++ b/include/sound/spear_dma.h
>>>>>> @@ -29,7 +29,6 @@ struct spear_dma_data {
>>>>>> dma_addr_t addr;
>>>>>> u32 max_burst;
>>>>>> enum dma_slave_buswidth addr_width;
>>>>>> - bool (*filter)(struct dma_chan *chan, void *slave);
>>>>>> };
>>>>>
>>>>> Hm, that spear_dma_data struct looks pretty much like
>>>>> snd_dmaengine_dai_dma_data. It's a bit hard to say how it is used exactly
>>>>> since the receiver of that struct doesn't seem to be upstream. Rajeev, how
>>>>> is this used? The data in spear_dma_data looks like it should be passed to
>>>>> the DMA driver via dmaengine_slave_config() rather than while requesting
>>>>> the
>>>>> channel.
>>>>>
>>>>> - Lars
>>>>> .
>>>>>
>>>>
>>>> The structure spear_dma_data is used to initialize dma parameters
>>>> received from
>>>> platform data which is required for dma slave configuration.
>>>
>>> Those parameters look like they should be configured using
>>> dmaengine_slave_config(). And not by passing them to the filter function.
>>>
>>> - Lars
>>>
>>> .
>>>
>>
>> Yes these parameter will be configured through dmaengine_slave_config().
>
> Ok, but this happens in the filter callback? Or is this piece just missing
> from the upstream driver at the moment? Do you think the code can be
> rewritten to use the generic snd_dmaengine_dai_dma_data struct?
>
Passing complete spear_dma_data is wrong in the filter callback, This
needs to be modified. I will circulate a patch for this. The platform
code for this also needs to be upstreamed.
Regards
Rajeev
> Thanks,
> - Lars
>
> .
>
next prev parent reply other threads:[~2013-12-10 11:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 20:24 [PATCH 0/5] ASoC: remove dmaengine compat_request_channel Stephen Warren
2013-12-09 20:24 ` [PATCH 1/5] ASoC: ep93xx: get rid of ep93xx-pcm-audio struct device Stephen Warren
2013-12-09 20:44 ` Lars-Peter Clausen
2013-12-09 23:50 ` Stephen Warren
2013-12-10 7:47 ` Lars-Peter Clausen
2013-12-10 10:23 ` Mark Brown
2013-12-10 16:56 ` Stephen Warren
2013-12-10 17:02 ` Mark Brown
2013-12-10 11:57 ` Mark Brown
2013-12-10 10:26 ` Mark Brown
2013-12-10 16:58 ` Stephen Warren
2013-12-09 20:24 ` [PATCH 2/5] ASoC: ep93xx: remove custom DMA alloc compat function Stephen Warren
2013-12-10 10:26 ` Mark Brown
2013-12-09 20:24 ` [PATCH 3/5] ASoC: SPEAr: get rid of spear-pcm-audio struct device Stephen Warren
2013-12-09 20:48 ` Lars-Peter Clausen
2013-12-09 20:24 ` [PATCH 4/5] ASoC: SPEAr: remove custom DMA alloc compat function Stephen Warren
2013-12-09 21:17 ` Lars-Peter Clausen
2013-12-10 6:30 ` Rajeev kumar
2013-12-10 7:45 ` Lars-Peter Clausen
2013-12-10 8:53 ` Rajeev kumar
2013-12-10 9:00 ` Lars-Peter Clausen
2013-12-10 11:44 ` Rajeev kumar [this message]
2013-12-09 20:24 ` [RFC PATCH 5/5] ASoC: dmaengine: remove compat_request_channel Stephen Warren
2013-12-09 20:38 ` [PATCH 0/5] ASoC: remove dmaengine compat_request_channel Lars-Peter Clausen
2013-12-10 8:21 ` Lee Jones
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=52A6FEAB.108@st.com \
--to=rajeev-dlh.kumar@st.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).