History log of /linux-master/sound/soc/atmel/atmel-pcm-dma.c
Revision Date Author Comments
# 6547effc 11-Sep-2023 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: atmel: convert not to use asoc_xxx()

ASoC is now unified asoc_xxx() into snd_soc_xxx().
This patch convert asoc_xxx() to snd_soc_xxx().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r0n4qniq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 62e5d777 30-Sep-2020 Alexandre Belloni <alexandre.belloni@bootlin.com>

ASoC: atmel-pcm: remove unnecessary include

Since commit 95e0e07e710e ("ASoC: atmel-pcm: use generic dmaengine
framework"), the driver is using dmaengine and is not using any definition
from include/linux/platform_data/dma-atmel.h, stop including it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200930145330.3043528-1-alexandre.belloni@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# b1839ebf 19-Jul-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: atmel: use asoc_substream_to_rtd()

Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87blkb0ytd.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0bdaef8a 07-Jul-2020 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ASoC: atmel: fix kernel-doc

Fix W=1 warning

Kernel-doc is not used in one file and missing argument in the second.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200707190612.97799-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# b434d707 22-Mar-2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: atmel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87369zk5ul.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 8af26493 27-Jun-2019 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: atmel: atmel-pcm-dma.c: use devm_snd_dmaengine_pcm_register()

We have devm_xxx version of snd_dmaengine_pcm_register,
let's use it.

This patch also removes related empty functions

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1a59d1b8 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
59 temple place suite 330 boston ma 02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1334 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# acde50a7 26-Apr-2015 Lars-Peter Clausen <lars@metafoo.de>

ASoC: dmaengine_pcm: Make FLAG_NO_RESIDUE internal

Whether residue can be reported or not is not a property of the audio
controller but of the DMA controller. The FLAG_NO_RESIDUE was initially
added when the DMAengine framework had no support for describing the residue
reporting capabilities of the controller. Support for this was added quite a
while ago and recently the DMAengine framework started to complain if a
driver does not describe its capabilities and a lot of patches have been
merged that add support for this where it was missing. So it should be safe
to assume that driver on actively used platforms properly implement the DMA
capabilities API.

This patch makes the FLAG_NO_RESIDUE internal and no longer allows audio
controller drivers to manually set the flag. If a DMA driver against
expectations does not support reporting its capabilities for now the generic
DMAengine PCM driver will now emit a warning and simply assume that residue
reporting is not supported. In the future this might be changed to aborting
with an error.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>


# c14e2591 30-Mar-2015 Alexandre Belloni <alexandre.belloni@bootlin.com>

ASoC: atmel-pcm-dma: increase buffer_bytes_max

atmel-pcm-dma is not limited to a buffer size of 64kB like atmel-pcm-pdc.
Increase buffer_bytes_max to 512kB to allow for higher bit rates (i.e. 32bps at
192kHz) to work correctly. By default, keep the prealloc at 64kB.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 56bbd86c 01-Feb-2015 Bo Shen <voice.shen@atmel.com>

ASoC: atmel-pcm-dma: won't check direction when configure dma

As DMA framework request DMA using direction only in prep_slave
function, (The At91 xdma driver has adapted to this request).
So won't check direction when do DMA configuration.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1fb8510c 07-Nov-2014 Takashi Iwai <tiwai@suse.de>

ALSA: pcm: Add snd_pcm_stop_xrun() helper

Add a new helper function snd_pcm_stop_xrun() to the standard sequnce
lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the
existing open codes with this helper.

The function checks the PCM running state to prevent setting the wrong
state, too, for more safety.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6ed54f08 20-Dec-2013 Lars-Peter Clausen <lars@metafoo.de>

ASoC: atmel: Don't set unused struct snd_pcm_hardware fields

The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 57118571 11-Jul-2013 Takashi Iwai <tiwai@suse.de>

ASoC: atmel: Fix unlocked snd_pcm_stop() call

snd_pcm_stop() must be called in the PCM substream lock context.

Cc: <stable@vger.kernel.org>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 95e0e07e 03-Jul-2013 Bo Shen <voice.shen@atmel.com>

ASoC: atmel-pcm: use generic dmaengine framework

Align atmel pcm to use ASoC generic dmaengine framework

DMA is fully device tree based

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# cede8d7a 03-Jul-2013 Bo Shen <voice.shen@atmel.com>

ASoC: atmel-pcm-dma: move prepare for dma to dai prepare

as prepare callback for dma is acctually access ssc register
which better done in dai driver, so move it to dai prepare
callback function

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>


# 7c1c1d4a 15-Apr-2013 Lars-Peter Clausen <lars@metafoo.de>

ASoC: dmaengine-pcm: Make requesting the DMA channel at PCM open optional

Refactor the dmaengine PCM library to allow the DMA channel to be requested
before opening a PCM substream. snd_dmaengine_pcm_open() now expects a DMA
channel instead of a filter function and filter parameter as its parameters.
snd_dmaengine_pcm_close() is updated to not release the DMA channel. This allows
a dmaengine based PCM driver to request its channels before the substream is
opened.

The patch also introduces two new functions, snd_dmaengine_pcm_open_request_chan()
and snd_dmaengine_pcm_close_release_chan(), which have the same signature and
behaviour of the old snd_dmaengine_pcm_{open,close}() and internally use the new
variants of these functions. All users of snd_dmaengine_pcm_{open,close}() are
updated to use snd_dmaengine_pcm_open_request_chan() and
snd_dmaengine_pcm_close_release_chan().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 5fa70f71 03-Apr-2013 Lars-Peter Clausen <lars@metafoo.de>

ASoC: dmaengine_pcm: Setup device_fc in snd_hwparams_to_dma_slave_config

Usually device_fc should be set to false for audio DMAs. Initialize it in a
common place so drivers don't have to do this manually.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 5fe668a1 22-Mar-2013 Lars-Peter Clausen <lars@metafoo.de>

ASoC: atmel-pcm-dma: Do not use snd_dmaengine_pcm_{set,get}_data()

We want to get rid of snd_dmaengine_pcm_{set,get}_data(). All instances of
snd_dmaengine_pcm_get_data() in the atmel pcm driver can easily be replaced with
snd_soc_dai_get_dma_data().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# a85fc1b0 22-Mar-2013 Lars-Peter Clausen <lars@metafoo.de>

ASoC: atmel-pcm-dma: No need to wrap snd_dmaengine_pcm_close()

If a PCM driver using the dmaengine PCM helper functions doesn't need to do
anything special in its pcm_close callback, snd_dmaengine_pcm_close can be used
directly for as the pcm_close callback and there is no need to wrap it in a
custom function.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>


# 3951e4aa 27-Nov-2012 Bo Shen <voice.shen@atmel.com>

ASoC: atmel-pcm: dma support based on pcm dmaengine

Specify overrun bit in interrupt mask
Add dmaengine specific routines

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
[voice.shen@atmel.com: adapt to soc dmaengine framework]
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>