[RFC PATCH 1/2] ASoC: atmel: mchp-spdifrx: Fix 16-bit big-endian format check

phucduc.bui at gmail.com phucduc.bui at gmail.com
Thu Nov 19 19:59:38 PST 2026


From: bui duc phuc <phucduc.bui at gmail.com>

MCHP_SPDIF_FORMATS advertises SNDRV_PCM_FMTBIT_U16_BE as a
supported format, but mchp_spdifrx_hw_params() checks for
SNDRV_PCM_FORMAT_S16_BE instead.

Replace SNDRV_PCM_FORMAT_S16_BE with SNDRV_PCM_FORMAT_U16_BE
to make the format check consistent with the advertised
supported formats.

Fixes: ef265c55c1ac ("ASoC: mchp-spdifrx: add driver for SPDIF RX")
Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
---

Note: 
The SAMA7G5 datasheet does not explicitly document support for
16-bit and 20-bit big-endian samples. This change only makes
the format check consistent with MCHP_SPDIF_FORMATS.
Hardware testing on SAMA7G5 is needed to confirm whether these
formats are actually supported.

 sound/soc/atmel/mchp-spdifrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/atmel/mchp-spdifrx.c b/sound/soc/atmel/mchp-spdifrx.c
index 632da8d7bc81..06a2a5a90a63 100644
--- a/sound/soc/atmel/mchp-spdifrx.c
+++ b/sound/soc/atmel/mchp-spdifrx.c
@@ -455,7 +455,7 @@ static int mchp_spdifrx_hw_params(struct snd_pcm_substream *substream,
 	}
 
 	switch (params_format(params)) {
-	case SNDRV_PCM_FORMAT_S16_BE:
+	case SNDRV_PCM_FORMAT_U16_BE:
 	case SNDRV_PCM_FORMAT_S20_3BE:
 	case SNDRV_PCM_FORMAT_S24_3BE:
 	case SNDRV_PCM_FORMAT_S24_BE:
-- 
2.43.0




More information about the linux-arm-kernel mailing list