Re: [PATCH v5 4/4] ASoC: qcom: q6apm-dai: add SCM buffer assignment for mDSP platforms

From: Ajay Kumar Nandam

Date: Wed Sep 23 2026 - 07:28:17 EST




On 9/22/2026 6:00 PM, Mark Brown wrote:
On platforms such as Qualcomm Shikra, audio is served by the modem DSP
(mDSP) which runs in a stage-2 protected context. Unlike ADSP targets
where SMMU-mapped system RAM is directly accessible, the mDSP cannot
reach the PCM buffers unless they are explicitly SCM-assigned to the
appropriate Virtual Machine IDs (VMIDs). Without this assignment, audio
does not function on these platforms.
+static int q6apm_dai_scm_assign(struct q6apm_dai_data *pdata,
+ phys_addr_t addr, size_t size)
+{
+ r = &pdata->scm_regions[pdata->num_scm_regions++];
This needs a lock.

@@ -1021,6 +1168,7 @@ static int q6apm_dai_probe(struct platform_device *pdev)
{
+ if (per_stream <= POS_BUFFER_BYTES + PAGE_SIZE) {
+ dev_err(dev,
+ "reserved-memory pool too small: %llu bytes\n",
+ (u64)rmem->size);
%pa

Thanks Mark, fixed both in v6.

I added a mutex to serialize scm_regions[] / num_scm_regions updates in
q6apm_dai_scm_assign() and q6apm_dai_scm_unassign(), and changed the reserved-memory size diagnostic to use %pa

Thanks
Ajay Kumar Nandam