From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
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, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
srini@kernel.org
Subject: Re: [PATCH v2 14/14] ASoC: qcom: q6apm: Add support for early buffer mapping on DSP
Date: Wed, 4 Mar 2026 11:10:46 +0000 [thread overview]
Message-ID: <47123dd6-d17f-4d82-b8a1-e04a50e73a27@oss.qualcomm.com> (raw)
In-Reply-To: <3b4dfe95-9043-4682-8fee-7588fa1fde37@oss.qualcomm.com>
On 2/24/26 10:16 AM, Konrad Dybcio wrote:
> On 2/23/26 7:07 PM, 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>
>> ---
>
> [...]
>
>> -int q6apm_map_memory_regions(struct q6apm_graph *graph, unsigned int dir, phys_addr_t phys,
>> - size_t period_sz, unsigned int periods)
>> +int q6apm_set_memory_map_handle(struct q6apm_graph *graph, unsigned int dir)
>> +{
>> + if (dir == SNDRV_PCM_STREAM_PLAYBACK)
>> + graph->rx_data.mem_map_handle = graph->info->mem_map_handle;
>> + else
>> + graph->tx_data.mem_map_handle = graph->info->mem_map_handle;
>> +
>> + return 0;
>> +}
>
> This doesn't return a useful value today, will it ever?
return type should be void.
>
> [...]
>
>
>> + case APM_CMD_SHARED_MEM_UNMAP_REGIONS:
>> + apm->result.opcode = hdr->opcode;
>> + apm->result.status = 0;
>> + rsp = data->payload;
>> +
>> + info = idr_find(&apm->graph_info_idr, hdr->token);
>> + if (info)
>> + info->mem_map_handle = 0;
>> + else
>> + dev_err(dev, "Error (%d) Processing 0x%08x cmd\n", result->status,
>> + result->opcode);
>> +
>> + dev_err(dev, "Memory Map region %x\n", rsp->mem_map_handle);
>
> Looks like a debug leftover (also in the below 'case')
Right, will fix that in next spin.
--srini
>
> Konrad
prev parent reply other threads:[~2026-03-04 11:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-23 18:07 [PATCH v2 00/14] ASoC: qcom: q6dsp: few fixes and enhancements Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 01/14] ASoC: qcom: q6apm: move component registration to unmanaged version Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 02/14] ASoC: qcom: q6apm: remove child devices when apm is removed Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 03/14] ASoC: qcom: qdsp6: topology: check widget type before accessing data Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 04/14] ASoC: qcom: q6apm-lpass-dai: Fix multiple graph opens Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 05/14] ASoC: qcom: q6apm-dai: reset queue ptr on trigger stop Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 06/14] ASoC: qcom: common: validate cpu dai id during parsing Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 07/14] ASoC: dt-bindings: qcom: add LPASS LPI MI2S dai ids Srinivas Kandagatla
2026-02-24 7:13 ` Krzysztof Kozlowski
2026-02-24 7:15 ` Krzysztof Kozlowski
2026-02-23 18:07 ` [PATCH v2 08/14] ASoC: qcom: qdsp6: lpass-ports: add support for LPASS LPI MI2S dais Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 09/14] ASoC: dt-bindings: qcom,q6dsp-lpass-ports: Add Senary MI2S port Srinivas Kandagatla
2026-02-24 7:14 ` Krzysztof Kozlowski
2026-03-04 11:14 ` Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 10/14] ASoC: qcom: q6dsp: Add Senary MI2S audio interface support Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 11/14] ASoC: qcom: qdapm-lpass-dai: correct the error message Srinivas Kandagatla
2026-02-24 10:12 ` Konrad Dybcio
2026-03-04 11:11 ` Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 12/14] ASoC: qcom: q6apm-lpass-dai: move graph start to trigger Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 13/14] ASoC: qcom: qdsp6: remove search for module iid in hot path Srinivas Kandagatla
2026-02-23 18:07 ` [PATCH v2 14/14] ASoC: qcom: q6apm: Add support for early buffer mapping on DSP Srinivas Kandagatla
2026-02-24 10:16 ` Konrad Dybcio
2026-03-04 11:10 ` 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=47123dd6-d17f-4d82-b8a1-e04a50e73a27@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=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=mohammad.rafi.shaik@oss.qualcomm.com \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--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