[PATCH RFC v5 2/8] ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders

Arnaud Pouliquen arnaud.pouliquen at st.com
Tue Mar 8 16:59:22 UTC 2016


Hello Jyri,

> +
> +static int hdmi_codec_hw_params(struct snd_pcm_substream *substream,
> +				struct snd_pcm_hw_params *params,
> +				struct snd_soc_dai *dai)
> +{
> +	struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
> +	struct hdmi_codec_params hp = {
> +		.iec = {
> +			.status = { 0 },
> +			.subcode = { 0 },
> +			.pad = 0,
> +			.dig_subframe = { 0 },
> +		}
> +	};
> +	int ret;
> +
> +	dev_dbg(dai->dev, "%s() width %d rate %d channels %d\n", __func__,
> +		params_width(params), params_rate(params),
> +		params_channels(params));
> +
> +	ret = snd_pcm_create_iec958_consumer_hw_params(params, hp.iec.status,
> +						       sizeof(hp.iec.status));
I ran into an issue during my test.
For I2S, an error is returned by create_iec958_consumer for 32-bits
stream (SNDRV_PCM_FMTBIT_S32_LE).
I suppose that it makes sense to handle 32-bits configuration for I2S
(but also SPDIF), to support software IEC958 formating/pre-formating...
To fix issue, just need to add 32-bits with 24-bits case in
create_iec958_consumer

Regards
Arnaud


More information about the dri-devel mailing list