[PATCH v3 08/14] ASoC: amd: add ACP PDM DMA driver dai ops

Mark Brown broonie at kernel.org
Tue May 19 13:19:07 CEST 2020


On Tue, May 19, 2020 at 01:16:58AM +0800, Vijendar Mukunda wrote:

> +static int acp_pdm_dai_hw_params(struct snd_pcm_substream *substream,
> +				 struct snd_pcm_hw_params *params,
> +				 struct snd_soc_dai *dai)
> +{
> +	struct pdm_stream_instance *rtd;
> +	unsigned int ch_mask;
> +
> +	rtd = substream->runtime->private_data;
> +	switch (params_channels(params)) {
> +	case TWO_CH:
> +	default:
> +		ch_mask = 0x00;
> +		break;
> +	}

The TWO_CH define isn't adding anything, and I'd expect there to be
invalid channel configurations this is rejecting - at the minute this
just boils down to an assignment.

> +	config_pdm_stream_params(ch_mask, rtd->acp_base);

Does this function have any other callers - is there a need for it to be
a separate function?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20200519/33e6f553/attachment.sig>


More information about the Alsa-devel mailing list