[alsa-devel] [PATCH 01/19] ASoC: atmel: Don't set unused struct snd_pcm_hardware fields

Lars-Peter Clausen lars at metafoo.de
Sat Jan 4 19:15:31 CET 2014


On 12/20/2013 02:20 PM, Lars-Peter Clausen wrote:
> 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 at metafoo.de>
> Cc: Bo Shen <voice.shen at atmel.com>
> Cc: Nicolas Ferre <nicolas.ferre at atmel.com>
> ---
>  sound/soc/atmel/atmel-pcm-dma.c | 1 -
>  sound/soc/atmel/atmel-pcm-pdc.c | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/sound/soc/atmel/atmel-pcm-dma.c b/sound/soc/atmel/atmel-pcm-dma.c
> index 06082e5..b79a2a8 100644
> --- a/sound/soc/atmel/atmel-pcm-dma.c
> +++ b/sound/soc/atmel/atmel-pcm-dma.c
> @@ -50,7 +50,6 @@ static const struct snd_pcm_hardware atmel_pcm_dma_hardware = {
>  				  SNDRV_PCM_INFO_INTERLEAVED |
>  				  SNDRV_PCM_INFO_RESUME |
>  				  SNDRV_PCM_INFO_PAUSE,
> -	.formats		= SNDRV_PCM_FMTBIT_S16_LE,

Atmel is one of the few platforms where the formats specified for the DMA
controller are more restrictive than the formats specified for the DAI. As
the restrictions specified by the PCM part have been ignored so far I'm
wondering if this is a real restriction and things have only worked by
chance or whether the restriction should be removed?

- Lars


More information about the Alsa-devel mailing list