[PATCH 1/2] ASoC: intel: atom: Stop advertising non working S24LE support

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Tue Mar 9 16:42:19 CET 2021



On 3/9/21 4:55 AM, Hans de Goede wrote:
> The SST firmware's media and deep-buffer inputs are hardcoded to
> S16LE, the corresponding DAIs don't have a hw_params callback and
> their prepare callback also does not take the format into account.
> 
> So far the advertising of non working S24LE support has not caused
> issues because pulseaudio defaults to S16LE, but changing pulse-audio's
> config to use S24LE will result in broken sound.
> 
> Pipewire is replacing pulse now and pipewire prefers S24LE over S16LE
> when available, causing the problem of the broken S24LE support to
> come to the surface now.
> 
> Cc: stable at vger.kernel.org
> BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/866
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>

Humm, that is strange.
I can't recall such limitations in the firmware, and the SSP support 
does make use of 24 bits.
Please give me a couple of days to double-check what's missing.

> ---
>   sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
> index 9e9b05883557..aa5dd590ddd5 100644
> --- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
> +++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
> @@ -488,14 +488,14 @@ static struct snd_soc_dai_driver sst_platform_dai[] = {
>   		.channels_min = SST_STEREO,
>   		.channels_max = SST_STEREO,
>   		.rates = SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000,
> -		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
> +		.formats = SNDRV_PCM_FMTBIT_S16_LE,
>   	},
>   	.capture = {
>   		.stream_name = "Headset Capture",
>   		.channels_min = 1,
>   		.channels_max = 2,
>   		.rates = SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000,
> -		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
> +		.formats = SNDRV_PCM_FMTBIT_S16_LE,
>   	},
>   },
>   {
> @@ -506,7 +506,7 @@ static struct snd_soc_dai_driver sst_platform_dai[] = {
>   		.channels_min = SST_STEREO,
>   		.channels_max = SST_STEREO,
>   		.rates = SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000,
> -		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
> +		.formats = SNDRV_PCM_FMTBIT_S16_LE,
>   	},
>   },
>   {
> 


More information about the Alsa-devel mailing list