From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Alexey Klimov <alexey.klimov@linaro.org>,
Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>,
srini@kernel.org, linux-sound@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: [PATCH AUTOSEL 6.17-6.1] ASoC: qcom: sc8280xp: explicitly set S16LE format in sc8280xp_be_hw_params_fixup()
Date: Sat, 25 Oct 2025 11:58:12 -0400 [thread overview]
Message-ID: <20251025160905.3857885-261-sashal@kernel.org> (raw)
In-Reply-To: <20251025160905.3857885-1-sashal@kernel.org>
From: Alexey Klimov <alexey.klimov@linaro.org>
[ Upstream commit 9565c9d53c5b440f0dde6fa731a99c1b14d879d2 ]
Setting format to s16le is required for compressed playback on compatible
soundcards.
Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
Link: https://patch.msgid.link/20250911154340.2798304-1-alexey.klimov@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
YES – forcing S16LE in the backend fixup is a necessary bug fix and safe
to carry into stable.
- `sc8280xp_be_hw_params_fixup()` now applies `snd_mask_set_format(fmt,
SNDRV_PCM_FORMAT_S16_LE)` (sound/soc/qcom/sc8280xp.c:92-101) and
includes the proper header to access that helper
(sound/soc/qcom/sc8280xp.c:10). Without this restriction the BE
inherits whatever format the FE negotiated (often S32_LE), so the CDC
DMA path tries to run at the wrong width.
- The hardware side really needs the negotiated width to be 16-bit: the
Q6 backend programs `cfg->bit_width = params_width(params);` before
starting the CDC DMA port (sound/soc/qcom/qdsp6/q6afe-dai.c:364-366).
When the format stays at 32‑bit the DSP refuses to start compressed-
playback streams, which is the user-visible failure cited in the
commit message.
- Other Qualcomm soundwire machine drivers already lock their BE formats
to S16LE (e.g. sound/soc/qcom/sm8250.c:62-71), so this change simply
brings sc8280xp into line with established practice and with the
firmware expectations of the WCD/WSA codecs on this platform.
- The patch is tiny, contained to the machine driver, and has no
architectural fallout. It fixes a real regression (compressed playback
breaking on supported boards) and does not alter the channel/rate
handling beyond what was already enforced, so the regression risk is
minimal.
Given the clear user impact, alignment with existing platforms, and the
low risk of the change, it should be backported to stable kernels that
carry the sc8280xp machine driver.
sound/soc/qcom/sc8280xp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c
index 6847ae4acbd18..78e327bc2f077 100644
--- a/sound/soc/qcom/sc8280xp.c
+++ b/sound/soc/qcom/sc8280xp.c
@@ -7,6 +7,7 @@
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/pcm.h>
+#include <sound/pcm_params.h>
#include <linux/soundwire/sdw.h>
#include <sound/jack.h>
#include <linux/input-event-codes.h>
@@ -86,8 +87,10 @@ static int sc8280xp_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
SNDRV_PCM_HW_PARAM_RATE);
struct snd_interval *channels = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_CHANNELS);
+ 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);
channels->min = 2;
channels->max = 2;
switch (cpu_dai->id) {
--
2.51.0
next prev parent reply other threads:[~2025-10-25 16:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20251025160905.3857885-1-sashal@kernel.org>
2025-10-25 15:54 ` [PATCH AUTOSEL 6.17] ASoC: ops: improve snd_soc_get_volsw Sasha Levin
2025-10-25 15:55 ` [PATCH AUTOSEL 6.17] ASoC: tas2781: Add keyword "init" in profile section Sasha Levin
2025-10-25 15:56 ` [PATCH AUTOSEL 6.17-6.6] ASoC: tlv320aic3x: Fix class-D initialization for tlv320aic3007 Sasha Levin
2025-10-25 15:57 ` [PATCH AUTOSEL 6.17] ASoC: renesas: msiof: set SIFCTR register Sasha Levin
2025-10-25 15:57 ` [PATCH AUTOSEL 6.17] ASoC: codecs: wsa883x: Handle shared reset GPIO for WSA883x speakers Sasha Levin
2025-10-25 15:57 ` [PATCH AUTOSEL 6.17] ASoC: renesas: msiof: use reset controller Sasha Levin
2025-10-25 15:58 ` Sasha Levin [this message]
2025-10-25 15:59 ` [PATCH AUTOSEL 6.17] ASoC: renesas: msiof: add .symmetric_xxx on snd_soc_dai_driver Sasha Levin
2025-10-25 15:59 ` [PATCH AUTOSEL 6.17] ASoC: renesas: msiof: tidyup DMAC stop timing Sasha Levin
2025-10-25 16:00 ` [PATCH AUTOSEL 6.17-6.6] ASoC: stm32: sai: manage context in set_sysclk callback Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251025160905.3857885-261-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alexey.klimov@linaro.org \
--cc=broonie@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=srini@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox