From: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
To: Srinivas Kandagatla <srini@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: ajay.nandam@oss.qualcomm.com, linux-sound@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org,
Pratyush Meduri <mpratyus@qti.qualcomm.com>,
Mohit Sharma <mohit.sharma@oss.qualcomm.com>
Subject: [PATCH v5 0/4] ASoC: qcom: enable audio on stage-2 protected DSPs (mDSP)
Date: Tue, 22 Sep 2026 00:38:08 +0530 [thread overview]
Message-ID: <20260922-vmid-v4-v5-0-e79cfd7af5b3@oss.qualcomm.com> (raw)
On platforms such as Qualcomm Shikra, audio is served by the modem DSP
(mDSP) rather than the ADSP. The mDSP runs in a stage-2 protected context
and cannot use the SMMU, so the PCM buffers it consumes must live in
reserved-memory carveouts that are handed to the consumer VMIDs via a
hypervisor (SCM) memory assignment. This series adds that access model to
the q6apm DAI driver and its binding, alongside the existing stage-1/SMMU
(iommus) path, which is left untouched.
The driver detects the mDSP target at runtime from the GPR domain_id
(GPR_DOMAIN_ID_MODEM) and enables the SCM assignment path automatically.
VMIDs are hardcoded in the driver (HLOS + MSS_MSA + LPASS) rather than
read from DT, following the consensus from v2 review discussion with
Krzysztof Kozlowski and Srinivas Kandagatla.
Tested on Qualcomm Shikra with mDSP audio playback and capture.
Prior versions:
v1 (VMID binding + driver + GPR domain):
https://lore.kernel.org/all/20260609064038.492641-1-ajay.nandam@oss.qualcomm.com/
v1 (memory-region binding + DTS):
https://lore.kernel.org/all/20260618113509.2025881-1-ajay.nandam@oss.qualcomm.com/
v2:
https://lore.kernel.org/all/20260826-a2a-shikra-vmid-v5-v2-0-c3dc62354eee@oss.qualcomm.com/
v3:
https://lore.kernel.org/all/20260918-vmid-v3-v3-0-f1cbf47bf173@oss.qualcomm.com/
v4:
https://lore.kernel.org/all/20260922-vmid-v4-v4-0-5fe21b1365a1@oss.qualcomm.com/
Changes since v4:
- Resend — v4 was partially delivered due to SMTP failure, no code
changes.
Changes since v3:
- Split DT binding changes into a separate patch (3/4) from the driver
implementation (4/4). (Rob Herring)
- SCM-assign the data-path pool (memory-region[1]) as a single whole-pool
operation at probe instead of per-stream in pcm_new()/compr_open().
- SCM-assign compressed audio stream buffers in compr_open() and
unassign in compr_free() when no data-path pool is present. v3 only
covered PCM streams.
- Fix error path in pcm_new: unassign SCM region if memory_map fails
after a successful SCM assign, preventing a resource leak.
- Account for PAGE_SIZE padding in reserved-memory pool budget
calculation. v3 under-reserved by PAGE_SIZE per stream, which could
overflow the pool at maximum concurrent stream count.
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
---
Ajay Kumar Nandam (4):
ASoC: qcom: q6apm: clear g_apm on driver removal
ASoC: qcom: qdsp6: generalize GPR service domain
dt-bindings: sound: qcom,q6apm-dai: add memory-region and relax iommus
ASoC: qcom: q6apm-dai: add SCM buffer assignment for mDSP platforms
.../devicetree/bindings/sound/qcom,q6apm-dai.yaml | 12 +-
sound/soc/qcom/Kconfig | 1 +
sound/soc/qcom/qdsp6/audioreach.c | 12 +-
sound/soc/qcom/qdsp6/audioreach.h | 22 +-
sound/soc/qcom/qdsp6/q6apm-dai.c | 300 +++++++++++++++++++--
sound/soc/qcom/qdsp6/q6apm.c | 9 +-
sound/soc/qcom/qdsp6/q6apm.h | 2 +-
sound/soc/qcom/qdsp6/q6prm.c | 2 +
8 files changed, 326 insertions(+), 34 deletions(-)
---
base-commit: 3d5670d672ae08b8c534b7beed6f57c8b44e7b43
change-id: 20260921-vmid-v4-0116efe5937b
Best regards,
--
Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
next reply other threads:[~2026-09-21 19:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 19:08 Ajay Kumar Nandam [this message]
2026-09-21 19:08 ` [PATCH v5 1/4] ASoC: qcom: q6apm: clear g_apm on driver removal Ajay Kumar Nandam
2026-09-21 19:08 ` [PATCH v5 2/4] ASoC: qcom: qdsp6: generalize GPR service domain Ajay Kumar Nandam
2026-09-21 19:08 ` [PATCH v5 3/4] dt-bindings: sound: qcom,q6apm-dai: add memory-region and relax iommus Ajay Kumar Nandam
2026-09-21 19:08 ` [PATCH v5 4/4] ASoC: qcom: q6apm-dai: add SCM buffer assignment for mDSP platforms Ajay Kumar Nandam
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=20260922-vmid-v4-v5-0-e79cfd7af5b3@oss.qualcomm.com \
--to=ajay.nandam@oss.qualcomm.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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=mohit.sharma@oss.qualcomm.com \
--cc=mpratyus@qti.qualcomm.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.dev \
--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
all inboxes | Powered by JetHome®