ASoC: SOF: add default IPC capability and file paths
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 14 Apr 2022 18:48:05 +0000 (13:48 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 19 Apr 2022 11:03:33 +0000 (12:03 +0100)
This patch adds a default IPC type for each platform, along with file
paths to be used for each IPC type. To make reviews simpler, we only
modify platform descriptors in this table, the information will be
used in the next patch.

The Intel IPCv4 is only supported on Intel platforms after APL, and
not by default. In follow-up patches, support for SKL and KBL will be
added, and in those two cases the IPCv4 will be the default (and only
supported mode).

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>
Link: https://lore.kernel.org/r/20220414184817.362215-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
12 files changed:
include/sound/sof.h
sound/soc/sof/amd/pci-rn.c
sound/soc/sof/imx/imx8.c
sound/soc/sof/imx/imx8m.c
sound/soc/sof/intel/bdw.c
sound/soc/sof/intel/byt.c
sound/soc/sof/intel/pci-apl.c
sound/soc/sof/intel/pci-cnl.c
sound/soc/sof/intel/pci-icl.c
sound/soc/sof/intel/pci-tgl.c
sound/soc/sof/intel/pci-tng.c
sound/soc/sof/mediatek/mt8195/mt8195.c

index 69066fe064da921fd7e7c89cff86c1178da66d4d..a65af85a407488e0bd74146f62e78694253a64d4 100644 (file)
@@ -124,6 +124,10 @@ struct sof_dev_desc {
        /* defaults for no codec mode */
        const char *nocodec_tplg_filename;
 
+       /* information on supported IPCs */
+       unsigned int ipc_supported_mask;
+       enum sof_ipc_type ipc_default;
+
        /* defaults paths for firmware and topology files */
        const char *default_fw_path[SOF_IPC_TYPE_COUNT];
        const char *default_tplg_path[SOF_IPC_TYPE_COUNT];
index e2dfe606d3e82fcac0a68e259c76fbef0f8f868d..34b153f5cbd86a333bb03abf56428b580d0ba9f5 100644 (file)
@@ -54,6 +54,8 @@ static const struct sof_dev_desc renoir_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info              = &renoir_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "amd/sof",
        },
index d2c9e6d45b1b88a6b29b838450b9ad216b0380fc..cdbbd20c95dba1ef09ace5c8da445735a2d59e71 100644 (file)
@@ -613,6 +613,8 @@ static const struct snd_sof_dsp_ops sof_imx8x_ops = {
 };
 
 static struct sof_dev_desc sof_of_imx8qxp_desc = {
+       .ipc_supported_mask     = BIT(SOF_IPC),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "imx/sof",
        },
@@ -625,6 +627,8 @@ static struct sof_dev_desc sof_of_imx8qxp_desc = {
 };
 
 static struct sof_dev_desc sof_of_imx8qm_desc = {
+       .ipc_supported_mask     = BIT(SOF_IPC),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "imx/sof",
        },
index 7aa695aa983724bb7c8f2b333c77cf75225fcda6..cbee484e6a15411f36a6904d6725648f85f2d101 100644 (file)
@@ -473,6 +473,8 @@ static const struct snd_sof_dsp_ops sof_imx8m_ops = {
 };
 
 static struct sof_dev_desc sof_of_imx8mp_desc = {
+       .ipc_supported_mask     = BIT(SOF_IPC),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "imx/sof",
        },
index bc06f187cb2ee27b21a08ceacc348f717957912c..a0f22b13e6a5ef4b92289ca9346a579d437b869c 100644 (file)
@@ -646,6 +646,8 @@ static const struct sof_dev_desc sof_acpi_broadwell_desc = {
        .resindex_imr_base = -1,
        .irqindex_host_ipc = 0,
        .chip_info = &bdw_chip_info,
+       .ipc_supported_mask = BIT(SOF_IPC),
+       .ipc_default = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
        },
index 52815094fcf6960a829fb0ca9a4c1f0a63dbfabd..427b5c50bb9845b3250679da851e60ffc7e7d09d 100644 (file)
@@ -388,6 +388,8 @@ static const struct sof_dev_desc sof_acpi_baytrailcr_desc = {
        .resindex_imr_base = 2,
        .irqindex_host_ipc = 0,
        .chip_info = &byt_chip_info,
+       .ipc_supported_mask = BIT(SOF_IPC),
+       .ipc_default = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
        },
@@ -406,6 +408,8 @@ static const struct sof_dev_desc sof_acpi_baytrail_desc = {
        .resindex_imr_base = 2,
        .irqindex_host_ipc = 5,
        .chip_info = &byt_chip_info,
+       .ipc_supported_mask = BIT(SOF_IPC),
+       .ipc_default = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
        },
@@ -424,6 +428,8 @@ static const struct sof_dev_desc sof_acpi_cherrytrail_desc = {
        .resindex_imr_base = 2,
        .irqindex_host_ipc = 5,
        .chip_info = &cht_chip_info,
+       .ipc_supported_mask = BIT(SOF_IPC),
+       .ipc_default = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
        },
index 802480a7a4e20518be4afc6fb90633252d8c85dd..c173f2093b8dc27ae64d3b9b0eeb72b09786b242 100644 (file)
@@ -27,11 +27,15 @@ static const struct sof_dev_desc bxt_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info = &apl_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
+               [SOF_INTEL_IPC4] = "intel/avs/apl",
        },
        .default_tplg_path = {
                [SOF_IPC] = "intel/sof-tplg",
+               [SOF_INTEL_IPC4] = "intel/avs-tplg",
        },
        .default_fw_filename = "sof-apl.ri",
        .nocodec_tplg_filename = "sof-apl-nocodec.tplg",
@@ -46,11 +50,15 @@ static const struct sof_dev_desc glk_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info = &apl_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
+               [SOF_INTEL_IPC4] = "intel/avs/glk",
        },
        .default_tplg_path = {
                [SOF_IPC] = "intel/sof-tplg",
+               [SOF_INTEL_IPC4] = "intel/avs-tplg",
        },
        .default_fw_filename = "sof-glk.ri",
        .nocodec_tplg_filename = "sof-glk-nocodec.tplg",
index b8206a93d1f94b0664c425f03888e7b80b6e86e3..b52193929c995aa9e9c4818ac0452488ce1c2950 100644 (file)
@@ -28,11 +28,15 @@ static const struct sof_dev_desc cnl_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info = &cnl_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
+               [SOF_INTEL_IPC4] = "intel/avs/cnl",
        },
        .default_tplg_path = {
                [SOF_IPC] = "intel/sof-tplg",
+               [SOF_INTEL_IPC4] = "intel/avs-tplg",
        },
        .default_fw_filename = "sof-cnl.ri",
        .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
@@ -48,11 +52,15 @@ static const struct sof_dev_desc cfl_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info = &cnl_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
+               [SOF_INTEL_IPC4] = "intel/avs/cnl",
        },
        .default_tplg_path = {
                [SOF_IPC] = "intel/sof-tplg",
+               [SOF_INTEL_IPC4] = "intel/avs-tplg",
        },
        .default_fw_filename = "sof-cfl.ri",
        .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
@@ -68,11 +76,15 @@ static const struct sof_dev_desc cml_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info = &cnl_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
+               [SOF_INTEL_IPC4] = "intel/avs/cnl",
        },
        .default_tplg_path = {
                [SOF_IPC] = "intel/sof-tplg",
+               [SOF_INTEL_IPC4] = "intel/avs-tplg",
        },
        .default_fw_filename = "sof-cml.ri",
        .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
index a27cd4f8ce0ce340ab8e4cb80f55661643945e35..c1ed81ba08bb406e9f87d1e25537e01b0327c715 100644 (file)
@@ -28,11 +28,15 @@ static const struct sof_dev_desc icl_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info = &icl_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
+               [SOF_INTEL_IPC4] = "intel/avs/icl",
        },
        .default_tplg_path = {
                [SOF_IPC] = "intel/sof-tplg",
+               [SOF_INTEL_IPC4] = "intel/avs-tplg",
        },
        .default_fw_filename = "sof-icl.ri",
        .nocodec_tplg_filename = "sof-icl-nocodec.tplg",
@@ -47,11 +51,15 @@ static const struct sof_dev_desc jsl_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info = &jsl_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
+               [SOF_INTEL_IPC4] = "intel/avs/jsl",
        },
        .default_tplg_path = {
                [SOF_IPC] = "intel/sof-tplg",
+               [SOF_INTEL_IPC4] = "intel/avs-tplg",
        },
        .default_fw_filename = "sof-jsl.ri",
        .nocodec_tplg_filename = "sof-jsl-nocodec.tplg",
index 49d165fdd3536e6973fc801ac9ad8dea5b57dcc9..6a4414325041f1c57b8ca2a3ddc55a2bf1a0148b 100644 (file)
@@ -28,11 +28,15 @@ static const struct sof_dev_desc tgl_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info = &tgl_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
+               [SOF_INTEL_IPC4] = "intel/avs/tgl",
        },
        .default_tplg_path = {
                [SOF_IPC] = "intel/sof-tplg",
+               [SOF_INTEL_IPC4] = "intel/avs-tplg",
        },
        .default_fw_filename = "sof-tgl.ri",
        .nocodec_tplg_filename = "sof-tgl-nocodec.tplg",
@@ -48,11 +52,15 @@ static const struct sof_dev_desc tglh_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info = &tglh_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
+               [SOF_INTEL_IPC4] = "intel/avs/tgl-h",
        },
        .default_tplg_path = {
                [SOF_IPC] = "intel/sof-tplg",
+               [SOF_INTEL_IPC4] = "intel/avs-tplg",
        },
        .default_fw_filename = "sof-tgl-h.ri",
        .nocodec_tplg_filename = "sof-tgl-nocodec.tplg",
@@ -67,11 +75,15 @@ static const struct sof_dev_desc ehl_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info = &ehl_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
+               [SOF_INTEL_IPC4] = "intel/avs/ehl",
        },
        .default_tplg_path = {
                [SOF_IPC] = "intel/sof-tplg",
+               [SOF_INTEL_IPC4] = "intel/avs-tplg",
        },
        .default_fw_filename = "sof-ehl.ri",
        .nocodec_tplg_filename = "sof-ehl-nocodec.tplg",
@@ -87,11 +99,15 @@ static const struct sof_dev_desc adls_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info = &adls_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
+               [SOF_INTEL_IPC4] = "intel/avs/adl-s",
        },
        .default_tplg_path = {
                [SOF_IPC] = "intel/sof-tplg",
+               [SOF_INTEL_IPC4] = "intel/avs-tplg",
        },
        .default_fw_filename = "sof-adl-s.ri",
        .nocodec_tplg_filename = "sof-adl-nocodec.tplg",
@@ -107,11 +123,15 @@ static const struct sof_dev_desc adl_desc = {
        .resindex_imr_base      = -1,
        .irqindex_host_ipc      = -1,
        .chip_info = &tgl_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
+               [SOF_INTEL_IPC4] = "intel/avs/adl",
        },
        .default_tplg_path = {
                [SOF_IPC] = "intel/sof-tplg",
+               [SOF_INTEL_IPC4] = "intel/avs-tplg",
        },
        .default_fw_filename = "sof-adl.ri",
        .nocodec_tplg_filename = "sof-adl-nocodec.tplg",
index d8d01803739a1ab087d90a4557bf9f11d5110cd4..18cf9f354fab8bdc04b47d8668850d949baf54e9 100644 (file)
@@ -219,6 +219,8 @@ static const struct sof_dev_desc tng_desc = {
        .resindex_imr_base      = 0,
        .irqindex_host_ipc      = -1,
        .chip_info = &tng_chip_info,
+       .ipc_supported_mask     = BIT(SOF_IPC),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "intel/sof",
        },
index 0982bf158e8693e3bab936111eaff160a9086638..7291538f41ab6012622942af676d563c54e1ff47 100644 (file)
@@ -440,6 +440,8 @@ static const struct snd_sof_dsp_ops sof_mt8195_ops = {
 };
 
 static const struct sof_dev_desc sof_of_mt8195_desc = {
+       .ipc_supported_mask     = BIT(SOF_IPC),
+       .ipc_default            = SOF_IPC,
        .default_fw_path = {
                [SOF_IPC] = "mediatek/sof",
        },