Skip to contentSkip to conversation

ASoC: wm8524: Add support S32_LE

PATCH Superseded S.j. Wang 2 participants 2 messages Nov 1, 2019 – Nov 4, 2019

Subsystems (3)
lore
Share & tools
lore

S.j. Wang

author
#0 lore raw

PATCH 1/1 ASoC: wm8524: Add support S32_LE

Allow 32bit sample with this codec.

---
 sound/soc/codecs/wm8524.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/codecs/wm8524.c +3 -1
index 91e3d1570c45..4e9ab542f648 100644
@@ -159,7 +159,9 @@ static int wm8524_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
 
 #define WM8524_RATES SNDRV_PCM_RATE_8000_192000
 
-#define WM8524_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
+#define WM8524_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\
+			SNDRV_PCM_FMTBIT_S24_LE |\
+			SNDRV_PCM_FMTBIT_S32_LE)
 
 static const struct snd_soc_dai_ops wm8524_dai_ops = {
 	.startup	= wm8524_startup,
Signature · 1 line
2.21.0
#1 lore raw
Quoted 12 lines · S.j. Wang

Allow 32bit sample with this codec.

---
 sound/soc/codecs/wm8524.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/codecs/wm8524.c +0 -0
index 91e3d1570c45..4e9ab542f648 100644

sound/soc/codecs/wm8524.c static int wm8524_mute_stream(struct snd_soc_dai *dai, int mute, int stream) · line 165

Quoted 8 lines
sound/soc/codecs/wm8524.c +3 -1
@@ -159,7 +159,9 @@ static int wm8524_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
 
 #define WM8524_RATES SNDRV_PCM_RATE_8000_192000
 
-#define WM8524_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
+#define WM8524_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\
+			SNDRV_PCM_FMTBIT_S24_LE |\
+			SNDRV_PCM_FMTBIT_S32_LE)
 

The device doesn't actually support 32bit though, I guess it will ignore the extra LSBs so it should work. But is that really supporting 32 bit?

Thanks,
Charles
_______________________________________________
Alsa-devel mailing list
[email protected]
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel