cancel
Showing results for 
Search instead for 
Did you mean: 

S24_LE support on I2S of STM32MP1 line

AJank.2
Associate III

Hi,

what's the state of the S24_LE format support on the STM32MP1 line of boards? It seems that S16_LE and S32_LE formats are supported on the I2S dai, however S24_LE is rather unavailable. Is there a way to somehow enable it (maybe through Cube MX) or is it completely unsupported?

When running alsa speaker-test utility with hardware devices (not default) the S24_LE format is being rejected.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan SZYMANSKI
ST Employee

Hello @AJank.2 ,
Indeed, the I2S driver does not support S24_LE format but only S16_LE and S32_LE. This is due to what DMA transfer can also support, and in our case, this is 16 and 32 bits. So there is no link with cubeMX.

If you want to check it by yourself, you can see in stm32_i2s.c driver what is supported:

static void stm32_i2s_dai_init(struct snd_soc_pcm_stream *stream,
			       char *stream_name)
{
	stream->stream_name = stream_name;
	stream->channels_min = 1;
	stream->channels_max = 2;
	stream->rates = SNDRV_PCM_RATE_8000_192000;
	stream->formats = SNDRV_PCM_FMTBIT_S16_LE |
				   SNDRV_PCM_FMTBIT_S32_LE;
}

I hope it answers your question.
Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Erwan SZYMANSKI
ST Employee

Hello @AJank.2 ,
Indeed, the I2S driver does not support S24_LE format but only S16_LE and S32_LE. This is due to what DMA transfer can also support, and in our case, this is 16 and 32 bits. So there is no link with cubeMX.

If you want to check it by yourself, you can see in stm32_i2s.c driver what is supported:

static void stm32_i2s_dai_init(struct snd_soc_pcm_stream *stream,
			       char *stream_name)
{
	stream->stream_name = stream_name;
	stream->channels_min = 1;
	stream->channels_max = 2;
	stream->rates = SNDRV_PCM_RATE_8000_192000;
	stream->formats = SNDRV_PCM_FMTBIT_S16_LE |
				   SNDRV_PCM_FMTBIT_S32_LE;
}

I hope it answers your question.
Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thank you!