--- Begin Message ---
- To: alsa-devel@xxxxxxxxxxxxxxxx
- Subject: [PATCH 1/1] ASoC: dwc: extend supported formats
- From: Maxim Kochetkov <fido_max@xxxxxxxx>
- Date: Fri, 5 May 2023 08:35:21 +0300
- Cc: lgirdwood@xxxxxxxxx, broonie@xxxxxxxxxx, tiwai@xxxxxxxx, ckeepax@xxxxxxxxxxxxxxxxxxxxx, u.kleine-koenig@xxxxxxxxxxxxxx, Maxim Kochetkov <fido_max@xxxxxxxx>
The COMP1_TX_WORDSIZE_0/COMP2_RX_WORDSIZE_0 fields in the comp
registers indicate the maximum wordsize supported. DWC I2S controller
can operate with any smaller wordsize. So extend the formats to let
I2S to operate in any allowed modes.
Signed-off-by: Maxim Kochetkov <fido_max@xxxxxxxx>
---
sound/soc/dwc/dwc-i2s.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c
index acdf98b2ee9c..1f782752ea0b 100644
--- a/sound/soc/dwc/dwc-i2s.c
+++ b/sound/soc/dwc/dwc-i2s.c
@@ -480,9 +480,9 @@ static const u32 bus_widths[COMP_MAX_DATA_WIDTH] = {
static const u32 formats[COMP_MAX_WORDSIZE] = {
SNDRV_PCM_FMTBIT_S16_LE,
SNDRV_PCM_FMTBIT_S16_LE,
- SNDRV_PCM_FMTBIT_S24_LE,
- SNDRV_PCM_FMTBIT_S24_LE,
- SNDRV_PCM_FMTBIT_S32_LE,
+ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
+ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
+ SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE,
0,
0,
0
--
2.39.2
--- End Message ---