From: Bo Shen <voice.shen@atmel.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mark Brown <broonie@kernel.org>,
alsa-devel@alsa-project.org, richard.genoud@gmail.com,
Nicolas Ferre <nicolas.ferre@atmel.com>,
linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [alsa-devel] [PATCH 2/2] ASoC: atmel-pcm: use generic dmaengine framework
Date: Wed, 3 Jul 2013 09:33:59 +0800 [thread overview]
Message-ID: <51D37F87.2010008@atmel.com> (raw)
In-Reply-To: <51D2F306.7040603@metafoo.de>
Hi Lars-Peter,
On 7/2/2013 23:34, Lars-Peter Clausen wrote:
> On 07/02/2013 11:04 AM, Bo Shen wrote:
> [...]
>> -/*--------------------------------------------------------------------------*\
>> - * DMAENGINE operations
>> -\*--------------------------------------------------------------------------*/
>> -static bool filter(struct dma_chan *chan, void *slave)
>> -{
>> - struct at_dma_slave *sl = slave;
>> -
>> - if (sl->dma_dev == chan->device->dev) {
>> - chan->private = sl;
>> - return true;
>> - } else {
>> - return false;
>> - }
>> -}
>
> I'm wondering why is filtering no longer required?
Now this is handled by at_dma_filter in at_hdmac driver. More
information, you can reference: <driver/dma/at_hdmac.c> file
> [...]
>> + slave_config->dst_addr = (dma_addr_t)ssc->phybase + SSC_THR;
> [...]
>> + slave_config->src_addr = (dma_addr_t)ssc->phybase + SSC_RHR;
>
> Change the type of phybase to dma_addr_t
It should be:
slave_config->dst_addr = (dma_addr_t)(ssc->phybase + SSC_THR);
slave_config->src_addr = (dma_addr_t)(ssc->phybase + SSC_RHR);
> [...]
>> }
>>
>> -static int atmel_pcm_dma_prepare(struct snd_pcm_substream *substream)
>> -{
>> - struct snd_soc_pcm_runtime *rtd = substream->private_data;
>> - struct atmel_pcm_dma_params *prtd;
>> -
>> - prtd = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
>> -
>> - ssc_writex(prtd->ssc->regs, SSC_IER, prtd->mask->ssc_error);
>> - ssc_writex(prtd->ssc->regs, SSC_CR, prtd->mask->ssc_enable);
>
> These writes are also completely lost
This will be moved to DAI driver startup callback function.
>> -
>> - return 0;
>> -}
>
> I think it would also be good to get rid of any references to the ssc struct
> from the DMA driver and move them over to the DAI driver.
I will try to implement this in next version patch.
Thanks.
> - Lars
>
Best Regards,
Bo Shen
WARNING: multiple messages have this Message-ID (diff)
From: Bo Shen <voice.shen@atmel.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mark Brown <broonie@kernel.org>,
alsa-devel@alsa-project.org, richard.genoud@gmail.com,
Nicolas Ferre <nicolas.ferre@atmel.com>,
linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [alsa-devel] [PATCH 2/2] ASoC: atmel-pcm: use generic dmaengine framework
Date: Wed, 03 Jul 2013 01:33:59 +0000 [thread overview]
Message-ID: <51D37F87.2010008@atmel.com> (raw)
In-Reply-To: <51D2F306.7040603@metafoo.de>
Hi Lars-Peter,
On 7/2/2013 23:34, Lars-Peter Clausen wrote:
> On 07/02/2013 11:04 AM, Bo Shen wrote:
> [...]
>> -/*--------------------------------------------------------------------------*\
>> - * DMAENGINE operations
>> -\*--------------------------------------------------------------------------*/
>> -static bool filter(struct dma_chan *chan, void *slave)
>> -{
>> - struct at_dma_slave *sl = slave;
>> -
>> - if (sl->dma_dev = chan->device->dev) {
>> - chan->private = sl;
>> - return true;
>> - } else {
>> - return false;
>> - }
>> -}
>
> I'm wondering why is filtering no longer required?
Now this is handled by at_dma_filter in at_hdmac driver. More
information, you can reference: <driver/dma/at_hdmac.c> file
> [...]
>> + slave_config->dst_addr = (dma_addr_t)ssc->phybase + SSC_THR;
> [...]
>> + slave_config->src_addr = (dma_addr_t)ssc->phybase + SSC_RHR;
>
> Change the type of phybase to dma_addr_t
It should be:
slave_config->dst_addr = (dma_addr_t)(ssc->phybase + SSC_THR);
slave_config->src_addr = (dma_addr_t)(ssc->phybase + SSC_RHR);
> [...]
>> }
>>
>> -static int atmel_pcm_dma_prepare(struct snd_pcm_substream *substream)
>> -{
>> - struct snd_soc_pcm_runtime *rtd = substream->private_data;
>> - struct atmel_pcm_dma_params *prtd;
>> -
>> - prtd = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
>> -
>> - ssc_writex(prtd->ssc->regs, SSC_IER, prtd->mask->ssc_error);
>> - ssc_writex(prtd->ssc->regs, SSC_CR, prtd->mask->ssc_enable);
>
> These writes are also completely lost
This will be moved to DAI driver startup callback function.
>> -
>> - return 0;
>> -}
>
> I think it would also be good to get rid of any references to the ssc struct
> from the DMA driver and move them over to the DAI driver.
I will try to implement this in next version patch.
Thanks.
> - Lars
>
Best Regards,
Bo Shen
WARNING: multiple messages have this Message-ID (diff)
From: voice.shen@atmel.com (Bo Shen)
To: linux-arm-kernel@lists.infradead.org
Subject: [alsa-devel] [PATCH 2/2] ASoC: atmel-pcm: use generic dmaengine framework
Date: Wed, 3 Jul 2013 09:33:59 +0800 [thread overview]
Message-ID: <51D37F87.2010008@atmel.com> (raw)
In-Reply-To: <51D2F306.7040603@metafoo.de>
Hi Lars-Peter,
On 7/2/2013 23:34, Lars-Peter Clausen wrote:
> On 07/02/2013 11:04 AM, Bo Shen wrote:
> [...]
>> -/*--------------------------------------------------------------------------*\
>> - * DMAENGINE operations
>> -\*--------------------------------------------------------------------------*/
>> -static bool filter(struct dma_chan *chan, void *slave)
>> -{
>> - struct at_dma_slave *sl = slave;
>> -
>> - if (sl->dma_dev == chan->device->dev) {
>> - chan->private = sl;
>> - return true;
>> - } else {
>> - return false;
>> - }
>> -}
>
> I'm wondering why is filtering no longer required?
Now this is handled by at_dma_filter in at_hdmac driver. More
information, you can reference: <driver/dma/at_hdmac.c> file
> [...]
>> + slave_config->dst_addr = (dma_addr_t)ssc->phybase + SSC_THR;
> [...]
>> + slave_config->src_addr = (dma_addr_t)ssc->phybase + SSC_RHR;
>
> Change the type of phybase to dma_addr_t
It should be:
slave_config->dst_addr = (dma_addr_t)(ssc->phybase + SSC_THR);
slave_config->src_addr = (dma_addr_t)(ssc->phybase + SSC_RHR);
> [...]
>> }
>>
>> -static int atmel_pcm_dma_prepare(struct snd_pcm_substream *substream)
>> -{
>> - struct snd_soc_pcm_runtime *rtd = substream->private_data;
>> - struct atmel_pcm_dma_params *prtd;
>> -
>> - prtd = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
>> -
>> - ssc_writex(prtd->ssc->regs, SSC_IER, prtd->mask->ssc_error);
>> - ssc_writex(prtd->ssc->regs, SSC_CR, prtd->mask->ssc_enable);
>
> These writes are also completely lost
This will be moved to DAI driver startup callback function.
>> -
>> - return 0;
>> -}
>
> I think it would also be good to get rid of any references to the ssc struct
> from the DMA driver and move them over to the DAI driver.
I will try to implement this in next version patch.
Thanks.
> - Lars
>
Best Regards,
Bo Shen
WARNING: multiple messages have this Message-ID (diff)
From: Bo Shen <voice.shen@atmel.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mark Brown <broonie@kernel.org>, <alsa-devel@alsa-project.org>,
<richard.genoud@gmail.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
<linux-kernel@vger.kernel.org>, <linux-sound@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [alsa-devel] [PATCH 2/2] ASoC: atmel-pcm: use generic dmaengine framework
Date: Wed, 3 Jul 2013 09:33:59 +0800 [thread overview]
Message-ID: <51D37F87.2010008@atmel.com> (raw)
In-Reply-To: <51D2F306.7040603@metafoo.de>
Hi Lars-Peter,
On 7/2/2013 23:34, Lars-Peter Clausen wrote:
> On 07/02/2013 11:04 AM, Bo Shen wrote:
> [...]
>> -/*--------------------------------------------------------------------------*\
>> - * DMAENGINE operations
>> -\*--------------------------------------------------------------------------*/
>> -static bool filter(struct dma_chan *chan, void *slave)
>> -{
>> - struct at_dma_slave *sl = slave;
>> -
>> - if (sl->dma_dev == chan->device->dev) {
>> - chan->private = sl;
>> - return true;
>> - } else {
>> - return false;
>> - }
>> -}
>
> I'm wondering why is filtering no longer required?
Now this is handled by at_dma_filter in at_hdmac driver. More
information, you can reference: <driver/dma/at_hdmac.c> file
> [...]
>> + slave_config->dst_addr = (dma_addr_t)ssc->phybase + SSC_THR;
> [...]
>> + slave_config->src_addr = (dma_addr_t)ssc->phybase + SSC_RHR;
>
> Change the type of phybase to dma_addr_t
It should be:
slave_config->dst_addr = (dma_addr_t)(ssc->phybase + SSC_THR);
slave_config->src_addr = (dma_addr_t)(ssc->phybase + SSC_RHR);
> [...]
>> }
>>
>> -static int atmel_pcm_dma_prepare(struct snd_pcm_substream *substream)
>> -{
>> - struct snd_soc_pcm_runtime *rtd = substream->private_data;
>> - struct atmel_pcm_dma_params *prtd;
>> -
>> - prtd = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
>> -
>> - ssc_writex(prtd->ssc->regs, SSC_IER, prtd->mask->ssc_error);
>> - ssc_writex(prtd->ssc->regs, SSC_CR, prtd->mask->ssc_enable);
>
> These writes are also completely lost
This will be moved to DAI driver startup callback function.
>> -
>> - return 0;
>> -}
>
> I think it would also be good to get rid of any references to the ssc struct
> from the DMA driver and move them over to the DAI driver.
I will try to implement this in next version patch.
Thanks.
> - Lars
>
Best Regards,
Bo Shen
next prev parent reply other threads:[~2013-07-03 1:33 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 9:04 [PATCH 0/2] ASoC: atmel-pcm: use generic dmaengine framework Bo Shen
2013-07-02 9:04 ` Bo Shen
2013-07-02 9:04 ` Bo Shen
2013-07-02 9:04 ` [PATCH 1/2] ASoC: atmel_ssc_dai: move set dma data to startup callback Bo Shen
2013-07-02 9:04 ` Bo Shen
2013-07-02 9:04 ` Bo Shen
2013-07-02 15:25 ` [alsa-devel] " Lars-Peter Clausen
2013-07-02 15:25 ` Lars-Peter Clausen
2013-07-02 15:25 ` Lars-Peter Clausen
2013-07-03 1:20 ` Bo Shen
2013-07-03 1:20 ` Bo Shen
2013-07-03 1:20 ` Bo Shen
2013-07-03 1:20 ` Bo Shen
2013-07-03 5:22 ` Bo Shen
2013-07-03 5:22 ` Bo Shen
2013-07-03 5:22 ` Bo Shen
2013-07-02 9:04 ` [PATCH 2/2] ASoC: atmel-pcm: use generic dmaengine framework Bo Shen
2013-07-02 9:04 ` Bo Shen
2013-07-02 9:04 ` Bo Shen
2013-07-02 9:04 ` Bo Shen
2013-07-02 15:34 ` [alsa-devel] " Lars-Peter Clausen
2013-07-02 15:34 ` Lars-Peter Clausen
2013-07-02 15:34 ` Lars-Peter Clausen
2013-07-03 1:33 ` Bo Shen [this message]
2013-07-03 1:33 ` Bo Shen
2013-07-03 1:33 ` Bo Shen
2013-07-03 1:33 ` Bo Shen
2013-07-03 7:36 ` Lars-Peter Clausen
2013-07-03 7:36 ` Lars-Peter Clausen
2013-07-03 7:36 ` Lars-Peter Clausen
2013-07-03 7:57 ` Bo Shen
2013-07-03 7:57 ` Bo Shen
2013-07-03 7:57 ` Bo Shen
2013-07-03 7:57 ` Bo Shen
2013-07-03 8:08 ` Lars-Peter Clausen
2013-07-03 8:08 ` Lars-Peter Clausen
2013-07-03 8:08 ` Lars-Peter Clausen
2013-07-03 8:13 ` Bo Shen
2013-07-03 8:13 ` [alsa-devel] " Bo Shen
2013-07-03 8:13 ` Bo Shen
2013-07-03 8:13 ` Bo Shen
-- strict thread matches above, loose matches on Subject: below --
2013-07-02 7:55 [PATCH 0/2] " Bo Shen
2013-07-02 7:55 ` Bo Shen
2013-07-02 7:55 ` [PATCH 1/2] ASoC: atmel_ssc_dai: move set dma data to startup callback Bo Shen
2013-07-02 7:55 ` Bo Shen
2013-07-02 7:55 ` [PATCH 2/2] ASoC: atmel-pcm: use generic dmaengine framework Bo Shen
2013-07-02 7:55 ` Bo Shen
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=51D37F87.2010008@atmel.com \
--to=voice.shen@atmel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=richard.genoud@gmail.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.