From: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
To: Mark Brown <broonie@kernel.org>,
Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
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 v7 13/13] ASoC: qcom: q6apm: Add support for early buffer mapping on DSP
Date: Wed, 25 Mar 2026 11:43:07 +0000 [thread overview]
Message-ID: <4d5c4953-94c9-441b-852d-62c03fde6554@oss.qualcomm.com> (raw)
In-Reply-To: <9a9ea82d-e299-4a9c-bb68-f430761387f7@sirena.org.uk>
On 3/24/26 7:09 PM, Mark Brown wrote:
> On Mon, Mar 23, 2026 at 10:38:45PM +0000, 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.
>
>> static int q6apm_dai_pcm_new(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd)
>
>> + if (pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream) {
>> + substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream;
>> + ret = q6apm_dai_memory_map(component, substream, graph_id);
>> + if (ret) {
>> + if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream)
>> + q6apm_unmap_memory_fixed_region(component->dev, graph_id);
>
> This looks like it's handling bidirectional DAIs but...
TBH, we only have one dai and one direction per graph, this check was
added for completeness.
We can not have bi-directional dais, as all the be-dais are uni-directional.
>
>> +int q6apm_map_memory_fixed_region(struct device *dev, unsigned int graph_id, phys_addr_t phys,
>> + size_t sz)
>> +{
>
>> + info = idr_find(&apm->graph_info_idr, graph_id);
>> + if (!info)
>> + return -ENODEV;
>> +
>> + if (info->mem_map_handle)
>> + return 0;
>
> ...we have one memory map handle per graph ID, silently ignoring
> attempts to add a second one?
there is no second one.
--srini
next prev parent reply other threads:[~2026-03-25 11:43 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 22:38 [PATCH v7 00/13] ASoC: qcom: q6dsp: few fixes and enhancements Srinivas Kandagatla
2026-03-23 22:38 ` [PATCH v7 01/13] ASoC: qcom: q6apm: move component registration to unmanaged version Srinivas Kandagatla
2026-03-24 18:04 ` Mark Brown
2026-03-25 11:36 ` Srinivas Kandagatla
2026-03-23 22:38 ` [PATCH v7 02/13] ASoC: qcom: q6apm: remove child devices when apm is removed Srinivas Kandagatla
2026-03-23 22:38 ` [PATCH v7 03/13] ASoC: qcom: qdsp6: topology: check widget type before accessing data Srinivas Kandagatla
2026-03-23 22:38 ` [PATCH v7 04/13] ASoC: qcom: q6apm-lpass-dai: Fix multiple graph opens Srinivas Kandagatla
2026-03-24 18:25 ` Mark Brown
2026-03-24 18:47 ` Mark Brown
2026-03-25 11:33 ` Srinivas Kandagatla
2026-03-25 11:56 ` Mark Brown
2026-03-23 22:38 ` [PATCH v7 05/13] ASoC: qcom: q6apm-dai: reset queue ptr on trigger stop Srinivas Kandagatla
2026-03-23 22:38 ` [PATCH v7 06/13] ASoC: dt-bindings: qcom: add LPASS LPI MI2S dai ids Srinivas Kandagatla
2026-03-23 22:38 ` [PATCH v7 07/13] ASoC: qcom: qdsp6: lpass-ports: add support for LPASS LPI MI2S dais Srinivas Kandagatla
2026-03-23 22:38 ` [PATCH v7 08/13] ASoC: qcom: q6dsp: Add Senary MI2S audio interface support Srinivas Kandagatla
2026-03-23 22:38 ` [PATCH v7 09/13] ASoC: qcom: common: validate cpu dai id during parsing Srinivas Kandagatla
2026-03-23 22:38 ` [PATCH v7 10/13] ASoC: qcom: qdapm-lpass-dai: correct the error message Srinivas Kandagatla
2026-03-23 22:38 ` [PATCH v7 11/13] ASoC: qcom: q6apm-lpass-dai: move graph start to trigger Srinivas Kandagatla
2026-03-23 22:38 ` [PATCH v7 12/13] ASoC: qcom: qdsp6: remove search for module iid in hot path Srinivas Kandagatla
2026-03-23 22:38 ` [PATCH v7 13/13] ASoC: qcom: q6apm: Add support for early buffer mapping on DSP Srinivas Kandagatla
2026-03-24 19:09 ` Mark Brown
2026-03-25 11:43 ` Srinivas Kandagatla [this message]
2026-03-24 20:25 ` kernel test robot
2026-03-25 11:45 ` Srinivas Kandagatla
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=4d5c4953-94c9-441b-852d-62c03fde6554@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=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
all inboxes | Powered by JetHome®