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

Mark Brown <[email protected]>
Newsgroups gmane.linux.sound,gmane.linux.ports.arm.msm,gmane.linux.drivers.devicetree,gmane.linux.kernel
Message-ID <[email protected]>
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...
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmqPbhYACgkQJNaLcl1U
h9AgGwf/WbUZ1UnidNl88VuYhNBqGsutsE4jrqx1YH25jZhaDPaw2FiW8LzOmPFG
kOvhWuVq5/ynYyJpFQYylvvKwqaZb0cZN4TCynMbyA/XeEZASkWTsujFz9O4Z6v0
GveQ589yFyo7dYVVxkl1+9FM4ymszIQ/Ic6E6cEep6+D6uSyAcyymIpS2OkD2YP+
WnRJVz2alv8YkOAKyX0uS3191Bi678W8rYu7XUrYsrD5T442Fa3/gPIBM/UfJSjh
BVntSB6PAFg0+gtFcGtYkqtedrBS5A63/wiLc1eOoIzII9v8rz5tsqH3IHDIqpvD
VHqd1XOZHq9aQvVUhML148a182By2A==
=MeT9
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.