[PATCH 4/4] ASoC: qcom: q6apm-dai: allow the mDSP IOMMU path
From: Mohit Sharma
Date: Thu Nov 19 2026 - 11:48:16 EST
The q6apm DAI currently selects SCM buffer assignment solely from the GPR
domain. This prevents an mDSP-backed DAI from using an IOMMU, even when
the device tree provides an iommus property for environments where the
mDSP stream is routed through the apps SMMU.
Use the parsed stream ID to distinguish the two memory access models. An
mDSP DAI without an IOMMU continues to use SCM-assigned buffers, while an
mDSP DAI with an IOMMU follows the existing DMA/IOMMU path. This also
avoids requiring SCM availability for the IOMMU configuration.
Fixes: bb8afd437d79 ("ASoC: qcom: q6apm-dai: add SCM buffer assignment for mDSP platforms")
Co-developed-by: Ajay Kumar Nandam <ajay.nandam@xxxxxxxxxxxxxxxx>
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@xxxxxxxxxxxxxxxx>
Signed-off-by: Mohit Sharma <mohit.sharma@xxxxxxxxxxxxxxxx>
diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c
index c1f0af93e808..a29fe4241776 100644
--- a/sound/soc/qcom/qdsp6/q6apm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6apm-dai.c
@@ -1218,16 +1218,11 @@ static int q6apm_dai_probe(struct platform_device *pdev)
pdata->sid = args.args[0] & SID_MASK_DEFAULT;
if (apm && apm->gdev &&
- apm->gdev->domain_id == GPR_DOMAIN_ID_MODEM) {
+ apm->gdev->domain_id == GPR_DOMAIN_ID_MODEM &&
+ pdata->sid < 0) {
if (!qcom_scm_is_available())
return -EPROBE_DEFER;
- if (pdata->sid >= 0) {
- dev_err(dev,
- "iommus and mDSP SCM path are mutually exclusive\n");
- return -EINVAL;
- }
-
pdata->use_scm_assign = true;
rc = devm_add_action_or_reset(dev, q6apm_dai_scm_cleanup,
--
2.34.1