[PATCH v1 3/5] ASoC: qcom: q6apm-dai: Add 32-bit sample format support
From: Karthik S
Date: Thu Oct 22 2026 - 05:57:57 EST
Add SNDRV_PCM_FMTBIT_S32_LE to the supported formats for both capture
and playback hardware descriptors, and handle SNDRV_PCM_FORMAT_S32_LE
in q6apm_dai_hw_params() to set bits_per_sample to 32.
Signed-off-by: Karthik S <karthik.s@xxxxxxxxxxxxxxxx>
---
sound/soc/qcom/qdsp6/q6apm-dai.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c
index 033197bdd870..ec9ae2276361 100644
--- a/sound/soc/qcom/qdsp6/q6apm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6apm-dai.c
@@ -93,7 +93,8 @@ static const struct snd_pcm_hardware q6apm_dai_hardware_capture = {
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME |
SNDRV_PCM_INFO_NO_REWINDS | SNDRV_PCM_INFO_SYNC_APPLPTR |
SNDRV_PCM_INFO_BATCH),
- .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE),
+ .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE),
.rates = SNDRV_PCM_RATE_8000_48000,
.rate_min = 8000,
.rate_max = 48000,
@@ -113,7 +114,8 @@ static const struct snd_pcm_hardware q6apm_dai_hardware_playback = {
SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME |
SNDRV_PCM_INFO_NO_REWINDS | SNDRV_PCM_INFO_SYNC_APPLPTR |
SNDRV_PCM_INFO_BATCH),
- .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE),
+ .formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |
+ SNDRV_PCM_FMTBIT_S32_LE),
.rates = SNDRV_PCM_RATE_8000_192000,
.rate_min = 8000,
.rate_max = 192000,
@@ -522,6 +524,9 @@ static int q6apm_dai_hw_params(struct snd_soc_component *component,
case SNDRV_PCM_FORMAT_S24_LE:
prtd->bits_per_sample = 24;
break;
+ case SNDRV_PCM_FORMAT_S32_LE:
+ prtd->bits_per_sample = 32;
+ break;
default:
return -EINVAL;
}
--
2.34.1