Re: [PATCH v2 2/3] ASoC: qcom: q6apm-dai: add VMID-based SCM assignment for mDSP buffers

From: Mark Brown

Date: Wed Aug 26 2026 - 18:52:17 EST


On Wed, Aug 26, 2026 at 12:10:13AM +0530, Ajay Kumar Nandam 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.

> - ret = snd_pcm_set_fixed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, component->dev, size);
> + if (pdata->has_reserved_mem)
> + ret = snd_pcm_set_managed_buffer_all(pcm,
> + SNDRV_DMA_TYPE_DEV, component->dev,
> + pdata->reserved_buf_size,
> + pdata->reserved_buf_size);

Does this do the right thing if the ALSA core preallocate_dma module
param is set to 0 for some reason? I'm not clear why you would...

Attachment: signature.asc
Description: PGP signature