[alsa-devel] [PATCH v3 6/6] ASoC: zx: add zx296702 hdmi codec

Mark Brown broonie at kernel.org
Wed Jun 3 19:58:01 CEST 2015


On Fri, May 29, 2015 at 09:31:21PM +0800, Jun Nie wrote:

> +int zx_hdmi_audio_cfg(int audio_codec, int audio_way,
> +		      u32 sample_rate, u32 sample_len);
> +void zx_hdmi_audio_en(int on);

It's a bit hard to review this properly without knowing what these
functions do.

> +static int zx_hw_params(struct snd_pcm_substream *substream,
> +			struct snd_pcm_hw_params *params,
> +			struct snd_soc_dai *dai)
> +{
> +#ifdef CONFIG_ZX_HDMI_SND_SPDIF
> +	zx_hdmi_audio_cfg(1, 0, params_rate(params),
> +#endif
> +#ifdef CONFIG_ZX_HDMI_SND_I2S
> +	zx_hdmi_audio_cfg(1, 1, params_rate(params),
> +#endif
> +			  params_physical_width(params));
> +	return 0;
> +}

The magic numbers aren't great and it does seem a bit odd to call both
I2S and S/PDIF versions always - but I guess this will be restructured
following our discussion in the other thread anyway.
-------------- 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/20150603/8acc6bb7/attachment.sig>


More information about the Alsa-devel mailing list