From: Vinod Koul <vkoul@kernel.org>
To: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
lars@metafoo.de, Rodrigo Alencar <alencar.fmce@imbel.gov.br>
Subject: Re: [PATCH] dmaengine: axi-dmac: simple device_config operation implemented
Date: Mon, 14 Oct 2019 12:31:42 +0530 [thread overview]
Message-ID: <20191014070142.GB2654@vkoul-mobl> (raw)
In-Reply-To: <20190913145404.28715-1-alexandru.ardelean@analog.com>
On 13-09-19, 17:54, Alexandru Ardelean wrote:
> From: Rodrigo Alencar <alencar.fmce@imbel.gov.br>
>
> dmaengine_slave_config is called by dmaengine_pcm_hw_params when using
> axi-i2s with axi-dmac. If device_config is NULL, -ENOSYS is returned,
> which breaks the snd_pcm_hw_params function.
> This is a fix for the error:
and what is that?
>
> $ aplay -D plughw:ADAU1761 /usr/share/sounds/alsa/Front_Center.wav
> Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit
> Little Endian, Rate 48000 Hz, Mono
> axi-i2s 43c20000.axi-i2s: ASoC: 43c20000.axi-i2s hw params failed: -38
> aplay: set_params:1403: Unable to install hw params:
> ACCESS: RW_INTERLEAVED
> FORMAT: S16_LE
> SUBFORMAT: STD
> SAMPLE_BITS: 16
> FRAME_BITS: 16
> CHANNELS: 1
> RATE: 48000
> PERIOD_TIME: 125000
> PERIOD_SIZE: 6000
> PERIOD_BYTES: 12000
> PERIODS: 4
> BUFFER_TIME: 500000
> BUFFER_SIZE: 24000
> BUFFER_BYTES: 48000
> TICK_TIME: 0
>
> Signed-off-by: Rodrigo Alencar <alencar.fmce@imbel.gov.br>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> ---
>
> Note: Fixes tag not added intentionally.
>
> drivers/dma/dma-axi-dmac.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
> index a0ee404b736e..ab2677343202 100644
> --- a/drivers/dma/dma-axi-dmac.c
> +++ b/drivers/dma/dma-axi-dmac.c
> @@ -564,6 +564,21 @@ static struct dma_async_tx_descriptor *axi_dmac_prep_slave_sg(
> return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
> }
>
> +static int axi_dmac_device_config(struct dma_chan *c,
> + struct dma_slave_config *slave_config)
> +{
> + struct axi_dmac_chan *chan = to_axi_dmac_chan(c);
> + struct axi_dmac *dmac = chan_to_axi_dmac(chan);
> +
> + /* no configuration required, a sanity check is done instead */
> + if (slave_config->direction != chan->direction) {
slave_config->direction is a deprecated field, pls dont use that
> + dev_err(dmac->dma_dev.dev, "Direction not supported by this DMA Channel");
> + return -EINVAL;
So you intent to support slave dma but do not use dma_slave_config.. how
are you getting the slave address and other details?
Thanks
--
~Vinod
next prev parent reply other threads:[~2019-10-14 7:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-13 14:54 [PATCH] dmaengine: axi-dmac: simple device_config operation implemented Alexandru Ardelean
2019-10-14 7:01 ` Vinod Koul [this message]
2019-10-15 7:05 ` Ardelean, Alexandru
2019-10-15 10:43 ` Vinod Koul
2019-10-15 21:06 ` Lars-Peter Clausen
2019-10-16 5:08 ` Vinod Koul
2019-10-16 10:41 ` Ardelean, Alexandru
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=20191014070142.GB2654@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=alencar.fmce@imbel.gov.br \
--cc=alexandru.ardelean@analog.com \
--cc=dmaengine@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.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).