[alsa-devel] [PATCH 1/2] ASoC: zx: Add ZTE zx296702 pcm support

Mark Brown broonie at kernel.org
Fri May 1 13:17:14 CEST 2015


On Thu, Apr 30, 2015 at 12:07:29PM +0800, Jun Nie wrote:

> +static const struct snd_pcm_hardware snd_zx_hardware = {
> +	.info			= SNDRV_PCM_INFO_MMAP |
> +				  SNDRV_PCM_INFO_MMAP_VALID |
> +				  SNDRV_PCM_INFO_INTERLEAVED |
> +				  SNDRV_PCM_INFO_PAUSE |
> +				  SNDRV_PCM_INFO_RESUME |
> +				  SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
> +	.period_bytes_min	= 32,
> +	.period_bytes_max	= 16 * 1024,
> +	.periods_min		= 2,
> +	.periods_max		= 32,
> +	.buffer_bytes_max	= 60 * 1024,
> +};

Can the generic DMA code not work this out by querying the dmaengine
driver?

> +int zx_pcm_platform_register(struct device *dev)
> +{
> +	return devm_snd_dmaengine_pcm_register(dev, &zx_dmaengine_pcm_config,
> +			SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME |
> +			SND_DMAENGINE_PCM_FLAG_NO_RESIDUE);

_NO_RESIDUE has been removed in current code, the core figures it out
automatically.  Like I said looking at the driver code I'm not clear why
this is specifying _CUSTOM_CHANNEL_NAME either, it looked like the
driver just used the one standard channel name.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150501/38a643d1/attachment.sig>


More information about the Alsa-devel mailing list