mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
To: Demeter Barna <me@fromdisposition.org>
Cc: Michael McAllister <me@michaelmcallister.org>,
	Srinivas Kandagatla <srini@kernel.org>,
	Mark Brown <broonie@kernel.org>,
	lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
	linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ASoC: qcom: q6asm: Correct the 24-bit PCM format
Date: Mon, 16 Nov 2026 15:02:56 +0000	[thread overview]
Message-ID: <b9143689-e390-463d-b486-ffd468be0805@oss.qualcomm.com> (raw)
In-Reply-To: <8832ef4d735b3fcdf48a2bf2a9997975@fromdisposition.org>

On 11/16/26 9:20 AM, Demeter Barna wrote:
> On 2026-11-15 13:12, Srinivas Kandagatla wrote:
>> Can you please try this change and see if it helps. I have not tested
>> this myself as am travelling atm.
> 
> Hi Srinivas,
> 
> Thanks, I gave it a go on SM8350.
> 
> The DSP takes the V4 blocks without complaining, but nothing changes for
> me: S24_LE playback is still 48 dB down, same as without the patch. I
> played a 440 Hz tone and recorded it with the DMICs:
> 
>                                     without    with
>   S16_LE                            -25 dBFS   -25 dBFS
>   S24_LE (bits 23:0)                -73 dBFS   -73 dBFS
>   S24_LE, shifted into bits 31:8    -25 dBFS   -25 dBFS
> 
> Capture is the same story, the samples still come back in bits 31:8.
> 
> Michael's v2 does work here, for what it's worth: S32_LE playback comes
> out at -25 dBFS like S16_LE, and S32_LE capture records the tone at the
> same level as S16_LE.
> 
> So it looks like this DSP just ignores mode 23. Maybe that depends on
> the firmware version, but with the firmware this device ships it doesn't
> work. If you have another way to fix this in mind, I'm happy to test it.
Thanks Demeter,

If its easy, Could you try:

---
 sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c
b/sound/soc/qcom/qdsp6/q6asm-dai.c
--- a/sound/soc/qcom/qdsp6/q6asm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
@@ -286,7 +286,7 @@ static int q6asm_dai_prepare(struct
snd_soc_component *component,
 	 */
 	if (prtd->bits_per_sample == 24) {
 		word_size = 32;
-		mode = 23;
+		mode = 0;	/* DEFAULT_QF: Q31 / MSB-aligned (bits 31:8) */
 	} else {
 		word_size = prtd->bits_per_sample;
 		mode = 0;
--
2.45.0



      reply	other threads:[~2026-11-16 15:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01 19:05 [PATCH] ASoC: qcom: q6asm: Correct the 24-bit capture format Michael McAllister
2026-11-04 20:47 ` Demeter Barna
2026-11-08 18:03   ` [PATCH v2] ASoC: qcom: q6asm: Correct the 24-bit PCM format Michael McAllister
2026-11-15 13:12     ` Srinivas Kandagatla
2026-11-16  9:20       ` Demeter Barna
2026-11-16 15:02         ` Srinivas Kandagatla [this message]

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=b9143689-e390-463d-b486-ffd468be0805@oss.qualcomm.com \
    --to=srinivas.kandagatla@oss.qualcomm.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=me@fromdisposition.org \
    --cc=me@michaelmcallister.org \
    --cc=perex@perex.cz \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.com \
    /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

all inboxes | Powered by JetHome®