Devicetree
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
To: Jens Glathe <jens.glathe@oldschoolsolutions.biz>,
	broonie@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org
Cc: mohammad.rafi.shaik@oss.qualcomm.com,
	linux-sound@vger.kernel.org, lgirdwood@gmail.com, perex@perex.cz,
	tiwai@suse.com, johan@kernel.org,
	dmitry.baryshkov@oss.qualcomm.com,
	konrad.dybcio@oss.qualcomm.com, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	srini@kernel.org, val@packett.cool, mailingradian@gmail.com
Subject: Re: [PATCH v9 13/13] ASoC: qcom: q6apm: Add support for early buffer mapping on DSP
Date: Tue, 12 May 2026 11:43:59 +0000	[thread overview]
Message-ID: <0c6c8db9-b54f-4df0-ae1f-306b7feb6d67@oss.qualcomm.com> (raw)
In-Reply-To: <7f10abbd-fb78-4c3a-ab90-7ca78239891a@oldschoolsolutions.biz>

On 5/12/26 5:09 AM, Jens Glathe wrote:
> On 02.04.26 10:11, Srinivas Kandagatla wrote:
>> Buffers are allocated on pcm_new and mapped in the dsp on every
>> prepare call, which is inefficient and unnecessary.
>>
>> Add new functions q6apm_[un]map_memory_fixed_region to map it on
>> to dsp only once after allocation.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
>> ---
>>   sound/soc/qcom/qdsp6/audioreach.c |  60 ------------
>>   sound/soc/qcom/qdsp6/audioreach.h |   5 +-
>>   sound/soc/qcom/qdsp6/q6apm-dai.c  | 107 ++++++++++++++++++---
>>   sound/soc/qcom/qdsp6/q6apm.c      | 151 +++++++++++++++++++-----------
>>   sound/soc/qcom/qdsp6/q6apm.h      |  14 +--
>>   5 files changed, 202 insertions(+), 135 deletions(-)
> 
> Hi there,
> 
> I had to revert this patch from the series to get back working sound on
> sc8280xp (Blackrock) on 7.1. And hitting the right patch was pure luck,
> tbh, since I integrated the series on 6.19 and couldn't apply the last 2
> cleanly. But figured these are cleanup/refactoring and left them out.
> 
> The errors I'm getting on Blackrock are these:
> 
> Mai 11 21:26:32 volterra kernel: q6apm-dai 3000000.remoteproc:glink-
> edge:gpr:service@1:dais: Audio Start: Buffer Allocation failed rc = -22
> Mai 11 21:26:32 volterra kernel: q6apm-dai 3000000.remoteproc:glink-
> edge:gpr:service@1:dais: ASoC error (-22): at
> snd_soc_pcm_component_new() on 3000000.remoteproc:glink-
> edge:gpr:service@1:dais
Could you please test this change on your setup and let me know if it
helps? If so, I’ll send out a proper fix.
This is a workaround for a known issue, I will add more details in the
patch that I will send once we know if it fixes the issue.

------------------------>cut<----------------------------

diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c
b/sound/soc/qcom/qdsp6/q6apm-dai.c
index ede19fdea6e9..8a1a3d8a3398 100644
--- a/sound/soc/qcom/qdsp6/q6apm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6apm-dai.c
@@ -497,7 +497,7 @@ static int q6apm_dai_pcm_new(struct
snd_soc_component *component, struct snd_soc
 {
        struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
        struct snd_pcm *pcm = rtd->pcm;
-       int size = BUFFER_BYTES_MAX;
+       int size = BUFFER_BYTES_MAX + 4096;
        int graph_id, ret;
        struct snd_pcm_substream *substream;
------------------------>cut<----------------------------


--srini


> 
> Since I'm way out of my depth here, I won't cite from the Great
> Hallucinator's analysis. Only reporting that this refactoring breaks
> sound on sc8280xp.
> 
> with best regards
> 
> Jens
> 


  parent reply	other threads:[~2026-05-12 11:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02  8:11 [PATCH v9 00/13] ASoC: qcom: q6dsp: few fixes and enhancements Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 01/13] ASoC: qcom: q6apm: move component registration to unmanaged version Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 02/13] ASoC: qcom: q6apm: remove child devices when apm is removed Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 03/13] ASoC: qcom: qdsp6: topology: check widget type before accessing data Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 04/13] ASoC: qcom: q6apm-lpass-dai: Fix multiple graph opens Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 05/13] ASoC: qcom: q6apm-dai: reset queue ptr on trigger stop Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 06/13] ASoC: dt-bindings: qcom: add LPASS LPI MI2S dai ids Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 07/13] ASoC: qcom: common: validate cpu dai id during parsing Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 08/13] ASoC: qcom: qdsp6: lpass-ports: add support for LPASS LPI MI2S dais Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 09/13] ASoC: qcom: q6dsp: Add Senary MI2S audio interface support Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 10/13] ASoC: qcom: qdapm-lpass-dai: correct the error message Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 11/13] ASoC: qcom: q6apm-lpass-dai: move graph start to trigger Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 12/13] ASoC: qcom: qdsp6: remove search for module iid in hot path Srinivas Kandagatla
2026-04-02  8:11 ` [PATCH v9 13/13] ASoC: qcom: q6apm: Add support for early buffer mapping on DSP Srinivas Kandagatla
2026-05-12  5:09   ` Jens Glathe
2026-05-12  8:27     ` Srinivas Kandagatla
2026-05-12 11:43     ` Srinivas Kandagatla [this message]
2026-05-12 13:07       ` Jens Glathe
2026-04-02 15:35 ` [PATCH v9 00/13] ASoC: qcom: q6dsp: few fixes and enhancements Mark Brown

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=0c6c8db9-b54f-4df0-ae1f-306b7feb6d67@oss.qualcomm.com \
    --to=srinivas.kandagatla@oss.qualcomm.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=jens.glathe@oldschoolsolutions.biz \
    --cc=johan@kernel.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=krzk+dt@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=mailingradian@gmail.com \
    --cc=mohammad.rafi.shaik@oss.qualcomm.com \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.com \
    --cc=val@packett.cool \
    /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