ASoC: SOF: add IPC-dependent file names

To avoid misleading file names, use different names for INTEL_IPC4
firmware files.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Chao Song <chao.song@intel.com>
Link: https://lore.kernel.org/r/20220414184817.362215-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Pierre-Louis Bossart 2022-04-14 13:48:06 -05:00 коммит произвёл Mark Brown
Родитель 0cf8ff05e5
Коммит a97abb3cae
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 24D68B725D5487D0
16 изменённых файлов: 88 добавлений и 30 удалений

Просмотреть файл

@ -133,7 +133,7 @@ struct sof_dev_desc {
const char *default_tplg_path[SOF_IPC_TYPE_COUNT];
/* default firmware name */
const char *default_fw_filename;
const char *default_fw_filename[SOF_IPC_TYPE_COUNT];
const struct snd_sof_dsp_ops *ops;
};

Просмотреть файл

@ -62,7 +62,9 @@ static const struct sof_dev_desc renoir_desc = {
.default_tplg_path = {
[SOF_IPC] = "amd/sof-tplg",
},
.default_fw_filename = "sof-rn.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-rn.ri",
},
.nocodec_tplg_filename = "sof-acp.tplg",
.ops = &sof_renoir_ops,
};

Просмотреть файл

@ -621,7 +621,9 @@ static struct sof_dev_desc sof_of_imx8qxp_desc = {
.default_tplg_path = {
[SOF_IPC] = "imx/sof-tplg",
},
.default_fw_filename = "sof-imx8x.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-imx8x.ri",
},
.nocodec_tplg_filename = "sof-imx8-nocodec.tplg",
.ops = &sof_imx8x_ops,
};
@ -635,7 +637,9 @@ static struct sof_dev_desc sof_of_imx8qm_desc = {
.default_tplg_path = {
[SOF_IPC] = "imx/sof-tplg",
},
.default_fw_filename = "sof-imx8.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-imx8.ri",
},
.nocodec_tplg_filename = "sof-imx8-nocodec.tplg",
.ops = &sof_imx8_ops,
};

Просмотреть файл

@ -481,7 +481,9 @@ static struct sof_dev_desc sof_of_imx8mp_desc = {
.default_tplg_path = {
[SOF_IPC] = "imx/sof-tplg",
},
.default_fw_filename = "sof-imx8m.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-imx8m.ri",
},
.nocodec_tplg_filename = "sof-imx8-nocodec.tplg",
.ops = &sof_imx8m_ops,
};

Просмотреть файл

@ -654,7 +654,9 @@ static const struct sof_dev_desc sof_acpi_broadwell_desc = {
.default_tplg_path = {
[SOF_IPC] = "intel/sof-tplg",
},
.default_fw_filename = "sof-bdw.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-bdw.ri",
},
.nocodec_tplg_filename = "sof-bdw-nocodec.tplg",
.ops = &sof_bdw_ops,
};

Просмотреть файл

@ -396,7 +396,9 @@ static const struct sof_dev_desc sof_acpi_baytrailcr_desc = {
.default_tplg_path = {
[SOF_IPC] = "intel/sof-tplg",
},
.default_fw_filename = "sof-byt.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-byt.ri",
},
.nocodec_tplg_filename = "sof-byt-nocodec.tplg",
.ops = &sof_byt_ops,
};
@ -416,7 +418,9 @@ static const struct sof_dev_desc sof_acpi_baytrail_desc = {
.default_tplg_path = {
[SOF_IPC] = "intel/sof-tplg",
},
.default_fw_filename = "sof-byt.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-byt.ri",
},
.nocodec_tplg_filename = "sof-byt-nocodec.tplg",
.ops = &sof_byt_ops,
};
@ -436,7 +440,9 @@ static const struct sof_dev_desc sof_acpi_cherrytrail_desc = {
.default_tplg_path = {
[SOF_IPC] = "intel/sof-tplg",
},
.default_fw_filename = "sof-cht.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-cht.ri",
},
.nocodec_tplg_filename = "sof-cht-nocodec.tplg",
.ops = &sof_cht_ops,
};

Просмотреть файл

@ -1274,7 +1274,7 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
mach->mach_params.links = mach->links;
mach->mach_params.link_mask = mach->link_mask;
mach->mach_params.platform = dev_name(sdev->dev);
pdata->fw_filename = pdata->desc->default_fw_filename;
pdata->fw_filename = pdata->desc->default_fw_filename[pdata->ipc_type];
pdata->tplg_filename = mach->sof_tplg_filename;
/*

Просмотреть файл

@ -37,7 +37,10 @@ static const struct sof_dev_desc bxt_desc = {
[SOF_IPC] = "intel/sof-tplg",
[SOF_INTEL_IPC4] = "intel/avs-tplg",
},
.default_fw_filename = "sof-apl.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-apl.ri",
[SOF_INTEL_IPC4] = "dsp_basefw.bin",
},
.nocodec_tplg_filename = "sof-apl-nocodec.tplg",
.ops = &sof_apl_ops,
};
@ -60,7 +63,10 @@ static const struct sof_dev_desc glk_desc = {
[SOF_IPC] = "intel/sof-tplg",
[SOF_INTEL_IPC4] = "intel/avs-tplg",
},
.default_fw_filename = "sof-glk.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-glk.ri",
[SOF_INTEL_IPC4] = "dsp_basefw.bin",
},
.nocodec_tplg_filename = "sof-glk-nocodec.tplg",
.ops = &sof_apl_ops,
};

Просмотреть файл

@ -38,7 +38,10 @@ static const struct sof_dev_desc cnl_desc = {
[SOF_IPC] = "intel/sof-tplg",
[SOF_INTEL_IPC4] = "intel/avs-tplg",
},
.default_fw_filename = "sof-cnl.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-cnl.ri",
[SOF_INTEL_IPC4] = "dsp_basefw.bin",
},
.nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
.ops = &sof_cnl_ops,
};
@ -62,7 +65,10 @@ static const struct sof_dev_desc cfl_desc = {
[SOF_IPC] = "intel/sof-tplg",
[SOF_INTEL_IPC4] = "intel/avs-tplg",
},
.default_fw_filename = "sof-cfl.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-cfl.ri",
[SOF_INTEL_IPC4] = "dsp_basefw.bin",
},
.nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
.ops = &sof_cnl_ops,
};
@ -86,7 +92,10 @@ static const struct sof_dev_desc cml_desc = {
[SOF_IPC] = "intel/sof-tplg",
[SOF_INTEL_IPC4] = "intel/avs-tplg",
},
.default_fw_filename = "sof-cml.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-cml.ri",
[SOF_INTEL_IPC4] = "dsp_basefw.bin",
},
.nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
.ops = &sof_cnl_ops,
};

Просмотреть файл

@ -38,7 +38,10 @@ static const struct sof_dev_desc icl_desc = {
[SOF_IPC] = "intel/sof-tplg",
[SOF_INTEL_IPC4] = "intel/avs-tplg",
},
.default_fw_filename = "sof-icl.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-icl.ri",
[SOF_INTEL_IPC4] = "dsp_basefw.bin",
},
.nocodec_tplg_filename = "sof-icl-nocodec.tplg",
.ops = &sof_icl_ops,
};
@ -61,7 +64,10 @@ static const struct sof_dev_desc jsl_desc = {
[SOF_IPC] = "intel/sof-tplg",
[SOF_INTEL_IPC4] = "intel/avs-tplg",
},
.default_fw_filename = "sof-jsl.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-jsl.ri",
[SOF_INTEL_IPC4] = "dsp_basefw.bin",
},
.nocodec_tplg_filename = "sof-jsl-nocodec.tplg",
.ops = &sof_cnl_ops,
};

Просмотреть файл

@ -38,7 +38,10 @@ static const struct sof_dev_desc tgl_desc = {
[SOF_IPC] = "intel/sof-tplg",
[SOF_INTEL_IPC4] = "intel/avs-tplg",
},
.default_fw_filename = "sof-tgl.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-tgl.ri",
[SOF_INTEL_IPC4] = "dsp_basefw.bin",
},
.nocodec_tplg_filename = "sof-tgl-nocodec.tplg",
.ops = &sof_tgl_ops,
};
@ -62,7 +65,10 @@ static const struct sof_dev_desc tglh_desc = {
[SOF_IPC] = "intel/sof-tplg",
[SOF_INTEL_IPC4] = "intel/avs-tplg",
},
.default_fw_filename = "sof-tgl-h.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-tgl-h.ri",
[SOF_INTEL_IPC4] = "dsp_basefw.bin",
},
.nocodec_tplg_filename = "sof-tgl-nocodec.tplg",
.ops = &sof_tgl_ops,
};
@ -85,7 +91,10 @@ static const struct sof_dev_desc ehl_desc = {
[SOF_IPC] = "intel/sof-tplg",
[SOF_INTEL_IPC4] = "intel/avs-tplg",
},
.default_fw_filename = "sof-ehl.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-ehl.ri",
[SOF_INTEL_IPC4] = "dsp_basefw.bin",
},
.nocodec_tplg_filename = "sof-ehl-nocodec.tplg",
.ops = &sof_tgl_ops,
};
@ -109,7 +118,10 @@ static const struct sof_dev_desc adls_desc = {
[SOF_IPC] = "intel/sof-tplg",
[SOF_INTEL_IPC4] = "intel/avs-tplg",
},
.default_fw_filename = "sof-adl-s.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-adl-s.ri",
[SOF_INTEL_IPC4] = "dsp_basefw.bin",
},
.nocodec_tplg_filename = "sof-adl-nocodec.tplg",
.ops = &sof_tgl_ops,
};
@ -133,7 +145,10 @@ static const struct sof_dev_desc adl_desc = {
[SOF_IPC] = "intel/sof-tplg",
[SOF_INTEL_IPC4] = "intel/avs-tplg",
},
.default_fw_filename = "sof-adl.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-adl.ri",
[SOF_INTEL_IPC4] = "dsp_basefw.bin",
},
.nocodec_tplg_filename = "sof-adl-nocodec.tplg",
.ops = &sof_tgl_ops,
};

Просмотреть файл

@ -227,7 +227,9 @@ static const struct sof_dev_desc tng_desc = {
.default_tplg_path = {
[SOF_IPC] = "intel/sof-tplg",
},
.default_fw_filename = "sof-byt.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-byt.ri",
},
.nocodec_tplg_filename = "sof-byt.tplg",
.ops = &sof_tng_ops,
};

Просмотреть файл

@ -448,7 +448,9 @@ static const struct sof_dev_desc sof_of_mt8195_desc = {
.default_tplg_path = {
[SOF_IPC] = "mediatek/sof-tplg",
},
.default_fw_filename = "sof-mt8195.ri",
.default_fw_filename = {
[SOF_IPC] = "sof-mt8195.ri",
},
.nocodec_tplg_filename = "sof-mt8195-nocodec.tplg",
.ops = &sof_mt8195_ops,
};

Просмотреть файл

@ -74,7 +74,7 @@ int sof_acpi_probe(struct platform_device *pdev, const struct sof_dev_desc *desc
sof_pdata->desc = desc;
sof_pdata->dev = &pdev->dev;
sof_pdata->fw_filename = desc->default_fw_filename;
sof_pdata->fw_filename = desc->default_fw_filename[SOF_IPC];
/* alternate fw and tplg filenames ? */
if (fw_path)

Просмотреть файл

@ -64,7 +64,7 @@ int sof_of_probe(struct platform_device *pdev)
sof_pdata->desc = desc;
sof_pdata->dev = &pdev->dev;
sof_pdata->fw_filename = desc->default_fw_filename;
sof_pdata->fw_filename = desc->default_fw_filename[SOF_IPC];
if (fw_path)
sof_pdata->fw_filename_prefix = fw_path;

Просмотреть файл

@ -173,7 +173,9 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
sof_pdata->name = pci_name(pci);
sof_pdata->desc = desc;
sof_pdata->dev = dev;
sof_pdata->fw_filename = desc->default_fw_filename;
sof_pdata->ipc_type = desc->ipc_default;
sof_pdata->fw_filename = desc->default_fw_filename[sof_pdata->ipc_type];
/*
* for platforms using the SOF community key, change the
@ -193,7 +195,7 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
} else if (dmi_check_system(community_key_platforms)) {
sof_pdata->fw_filename_prefix =
devm_kasprintf(dev, GFP_KERNEL, "%s/%s",
sof_pdata->desc->default_fw_path[SOF_IPC],
sof_pdata->desc->default_fw_path[sof_pdata->ipc_type],
"community");
dev_dbg(dev,
@ -201,14 +203,14 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
sof_pdata->fw_filename_prefix);
} else {
sof_pdata->fw_filename_prefix =
sof_pdata->desc->default_fw_path[SOF_IPC];
sof_pdata->desc->default_fw_path[sof_pdata->ipc_type];
}
if (tplg_path)
sof_pdata->tplg_filename_prefix = tplg_path;
else
sof_pdata->tplg_filename_prefix =
sof_pdata->desc->default_tplg_path[SOF_IPC];
sof_pdata->desc->default_tplg_path[sof_pdata->ipc_type];
dmi_check_system(sof_tplg_table);
if (sof_override_tplg_name)