[PATCH v1 4/5] ASoC: qcom: sc8280xp: Conditionally set S16_LE format in hw_params fixup

From: Karthik S

Date: Thu Oct 22 2026 - 05:50:06 EST


The be_hw_params_fixup callback unconditionally forced S16_LE format for
all backend DAIs. MI2S and DisplayPort DAIs need to negotiate format
freely to support higher bit depths, so skip the format mask for those
DAI IDs and only apply the S16_LE default for the remaining backends.

Signed-off-by: Karthik S <karthik.s@xxxxxxxxxxxxxxxx>
---
sound/soc/qcom/sc8280xp.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
index 6910b992d81c..9860a68e2add 100644
--- a/sound/soc/qcom/sc8280xp.c
+++ b/sound/soc/qcom/sc8280xp.c
@@ -240,7 +240,16 @@ static int sc8280xp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);

rate->min = rate->max = 48000;
- snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
+ switch (cpu_dai->id) {
+ case PRIMARY_MI2S_RX ... QUATERNARY_MI2S_TX:
+ case QUINARY_MI2S_RX ... QUINARY_MI2S_TX:
+ case DISPLAY_PORT_RX_0:
+ case DISPLAY_PORT_RX_1 ... DISPLAY_PORT_RX_7:
+ break;
+ default:
+ snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
+ break;
+ }
channels->min = 2;
channels->max = 2;
switch (cpu_dai->id) {
--
2.34.1