[alsa-devel] [PATCH 4/5] ASoC: SPEAr: remove custom DMA alloc compat function
Rajeev kumar
rajeev-dlh.kumar at st.com
Tue Dec 10 09:53:38 CET 2013
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 at 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 at 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().
~Rajeev
More information about the Alsa-devel
mailing list