diff options
author | Rander Wang <rander.wang@intel.com> | 2022-04-21 11:33:56 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-04-22 12:37:25 +0100 |
commit | 4bfbbb76e82e5f1e0e114e0831356656b4169c80 (patch) | |
tree | 187d5e92a44474199cad739bc2a003c3f2297132 /sound/soc/sof/core.c | |
parent | d81e4ba5ef1c1033b6c720b22fc99feeb71e71a0 (diff) |
ASOC: SOF: pci: add ipc_type override for Intel IPC4 tests
Add a kernel module parameter for select the non-default IPC type.
This should only be used by developers with access to firmware and
topology files, typically Intel and partners.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220421163358.319489-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/core.c')
-rw-r--r-- | sound/soc/sof/core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c index d981a1c3fb05..04b0cf3c822f 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -358,6 +358,13 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data) sdev->first_boot = true; dev_set_drvdata(dev, sdev); + /* check IPC support */ + if (!(BIT(plat_data->ipc_type) & plat_data->desc->ipc_supported_mask)) { + dev_err(dev, "ipc_type %d is not supported on this platform, mask is %#x\n", + plat_data->ipc_type, plat_data->desc->ipc_supported_mask); + return -EINVAL; + } + /* init ops, if necessary */ ret = sof_ops_init(sdev); if (ret < 0) |