Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: SOF: add default IPC capability and file paths

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>

authored by

Pierre-Louis Bossart and committed by
Mark Brown
0cf8ff05 a3757915

+72
+4
include/sound/sof.h
··· 124 124 /* defaults for no codec mode */ 125 125 const char *nocodec_tplg_filename; 126 126 127 + /* information on supported IPCs */ 128 + unsigned int ipc_supported_mask; 129 + enum sof_ipc_type ipc_default; 130 + 127 131 /* defaults paths for firmware and topology files */ 128 132 const char *default_fw_path[SOF_IPC_TYPE_COUNT]; 129 133 const char *default_tplg_path[SOF_IPC_TYPE_COUNT];
+2
sound/soc/sof/amd/pci-rn.c
··· 54 54 .resindex_imr_base = -1, 55 55 .irqindex_host_ipc = -1, 56 56 .chip_info = &renoir_chip_info, 57 + .ipc_supported_mask = BIT(SOF_IPC), 58 + .ipc_default = SOF_IPC, 57 59 .default_fw_path = { 58 60 [SOF_IPC] = "amd/sof", 59 61 },
+4
sound/soc/sof/imx/imx8.c
··· 613 613 }; 614 614 615 615 static struct sof_dev_desc sof_of_imx8qxp_desc = { 616 + .ipc_supported_mask = BIT(SOF_IPC), 617 + .ipc_default = SOF_IPC, 616 618 .default_fw_path = { 617 619 [SOF_IPC] = "imx/sof", 618 620 }, ··· 627 625 }; 628 626 629 627 static struct sof_dev_desc sof_of_imx8qm_desc = { 628 + .ipc_supported_mask = BIT(SOF_IPC), 629 + .ipc_default = SOF_IPC, 630 630 .default_fw_path = { 631 631 [SOF_IPC] = "imx/sof", 632 632 },
+2
sound/soc/sof/imx/imx8m.c
··· 473 473 }; 474 474 475 475 static struct sof_dev_desc sof_of_imx8mp_desc = { 476 + .ipc_supported_mask = BIT(SOF_IPC), 477 + .ipc_default = SOF_IPC, 476 478 .default_fw_path = { 477 479 [SOF_IPC] = "imx/sof", 478 480 },
+2
sound/soc/sof/intel/bdw.c
··· 646 646 .resindex_imr_base = -1, 647 647 .irqindex_host_ipc = 0, 648 648 .chip_info = &bdw_chip_info, 649 + .ipc_supported_mask = BIT(SOF_IPC), 650 + .ipc_default = SOF_IPC, 649 651 .default_fw_path = { 650 652 [SOF_IPC] = "intel/sof", 651 653 },
+6
sound/soc/sof/intel/byt.c
··· 388 388 .resindex_imr_base = 2, 389 389 .irqindex_host_ipc = 0, 390 390 .chip_info = &byt_chip_info, 391 + .ipc_supported_mask = BIT(SOF_IPC), 392 + .ipc_default = SOF_IPC, 391 393 .default_fw_path = { 392 394 [SOF_IPC] = "intel/sof", 393 395 }, ··· 408 406 .resindex_imr_base = 2, 409 407 .irqindex_host_ipc = 5, 410 408 .chip_info = &byt_chip_info, 409 + .ipc_supported_mask = BIT(SOF_IPC), 410 + .ipc_default = SOF_IPC, 411 411 .default_fw_path = { 412 412 [SOF_IPC] = "intel/sof", 413 413 }, ··· 428 424 .resindex_imr_base = 2, 429 425 .irqindex_host_ipc = 5, 430 426 .chip_info = &cht_chip_info, 427 + .ipc_supported_mask = BIT(SOF_IPC), 428 + .ipc_default = SOF_IPC, 431 429 .default_fw_path = { 432 430 [SOF_IPC] = "intel/sof", 433 431 },
+8
sound/soc/sof/intel/pci-apl.c
··· 27 27 .resindex_imr_base = -1, 28 28 .irqindex_host_ipc = -1, 29 29 .chip_info = &apl_chip_info, 30 + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), 31 + .ipc_default = SOF_IPC, 30 32 .default_fw_path = { 31 33 [SOF_IPC] = "intel/sof", 34 + [SOF_INTEL_IPC4] = "intel/avs/apl", 32 35 }, 33 36 .default_tplg_path = { 34 37 [SOF_IPC] = "intel/sof-tplg", 38 + [SOF_INTEL_IPC4] = "intel/avs-tplg", 35 39 }, 36 40 .default_fw_filename = "sof-apl.ri", 37 41 .nocodec_tplg_filename = "sof-apl-nocodec.tplg", ··· 50 46 .resindex_imr_base = -1, 51 47 .irqindex_host_ipc = -1, 52 48 .chip_info = &apl_chip_info, 49 + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), 50 + .ipc_default = SOF_IPC, 53 51 .default_fw_path = { 54 52 [SOF_IPC] = "intel/sof", 53 + [SOF_INTEL_IPC4] = "intel/avs/glk", 55 54 }, 56 55 .default_tplg_path = { 57 56 [SOF_IPC] = "intel/sof-tplg", 57 + [SOF_INTEL_IPC4] = "intel/avs-tplg", 58 58 }, 59 59 .default_fw_filename = "sof-glk.ri", 60 60 .nocodec_tplg_filename = "sof-glk-nocodec.tplg",
+12
sound/soc/sof/intel/pci-cnl.c
··· 28 28 .resindex_imr_base = -1, 29 29 .irqindex_host_ipc = -1, 30 30 .chip_info = &cnl_chip_info, 31 + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), 32 + .ipc_default = SOF_IPC, 31 33 .default_fw_path = { 32 34 [SOF_IPC] = "intel/sof", 35 + [SOF_INTEL_IPC4] = "intel/avs/cnl", 33 36 }, 34 37 .default_tplg_path = { 35 38 [SOF_IPC] = "intel/sof-tplg", 39 + [SOF_INTEL_IPC4] = "intel/avs-tplg", 36 40 }, 37 41 .default_fw_filename = "sof-cnl.ri", 38 42 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", ··· 52 48 .resindex_imr_base = -1, 53 49 .irqindex_host_ipc = -1, 54 50 .chip_info = &cnl_chip_info, 51 + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), 52 + .ipc_default = SOF_IPC, 55 53 .default_fw_path = { 56 54 [SOF_IPC] = "intel/sof", 55 + [SOF_INTEL_IPC4] = "intel/avs/cnl", 57 56 }, 58 57 .default_tplg_path = { 59 58 [SOF_IPC] = "intel/sof-tplg", 59 + [SOF_INTEL_IPC4] = "intel/avs-tplg", 60 60 }, 61 61 .default_fw_filename = "sof-cfl.ri", 62 62 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", ··· 76 68 .resindex_imr_base = -1, 77 69 .irqindex_host_ipc = -1, 78 70 .chip_info = &cnl_chip_info, 71 + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), 72 + .ipc_default = SOF_IPC, 79 73 .default_fw_path = { 80 74 [SOF_IPC] = "intel/sof", 75 + [SOF_INTEL_IPC4] = "intel/avs/cnl", 81 76 }, 82 77 .default_tplg_path = { 83 78 [SOF_IPC] = "intel/sof-tplg", 79 + [SOF_INTEL_IPC4] = "intel/avs-tplg", 84 80 }, 85 81 .default_fw_filename = "sof-cml.ri", 86 82 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
+8
sound/soc/sof/intel/pci-icl.c
··· 28 28 .resindex_imr_base = -1, 29 29 .irqindex_host_ipc = -1, 30 30 .chip_info = &icl_chip_info, 31 + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), 32 + .ipc_default = SOF_IPC, 31 33 .default_fw_path = { 32 34 [SOF_IPC] = "intel/sof", 35 + [SOF_INTEL_IPC4] = "intel/avs/icl", 33 36 }, 34 37 .default_tplg_path = { 35 38 [SOF_IPC] = "intel/sof-tplg", 39 + [SOF_INTEL_IPC4] = "intel/avs-tplg", 36 40 }, 37 41 .default_fw_filename = "sof-icl.ri", 38 42 .nocodec_tplg_filename = "sof-icl-nocodec.tplg", ··· 51 47 .resindex_imr_base = -1, 52 48 .irqindex_host_ipc = -1, 53 49 .chip_info = &jsl_chip_info, 50 + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), 51 + .ipc_default = SOF_IPC, 54 52 .default_fw_path = { 55 53 [SOF_IPC] = "intel/sof", 54 + [SOF_INTEL_IPC4] = "intel/avs/jsl", 56 55 }, 57 56 .default_tplg_path = { 58 57 [SOF_IPC] = "intel/sof-tplg", 58 + [SOF_INTEL_IPC4] = "intel/avs-tplg", 59 59 }, 60 60 .default_fw_filename = "sof-jsl.ri", 61 61 .nocodec_tplg_filename = "sof-jsl-nocodec.tplg",
+20
sound/soc/sof/intel/pci-tgl.c
··· 28 28 .resindex_imr_base = -1, 29 29 .irqindex_host_ipc = -1, 30 30 .chip_info = &tgl_chip_info, 31 + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), 32 + .ipc_default = SOF_IPC, 31 33 .default_fw_path = { 32 34 [SOF_IPC] = "intel/sof", 35 + [SOF_INTEL_IPC4] = "intel/avs/tgl", 33 36 }, 34 37 .default_tplg_path = { 35 38 [SOF_IPC] = "intel/sof-tplg", 39 + [SOF_INTEL_IPC4] = "intel/avs-tplg", 36 40 }, 37 41 .default_fw_filename = "sof-tgl.ri", 38 42 .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", ··· 52 48 .resindex_imr_base = -1, 53 49 .irqindex_host_ipc = -1, 54 50 .chip_info = &tglh_chip_info, 51 + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), 52 + .ipc_default = SOF_IPC, 55 53 .default_fw_path = { 56 54 [SOF_IPC] = "intel/sof", 55 + [SOF_INTEL_IPC4] = "intel/avs/tgl-h", 57 56 }, 58 57 .default_tplg_path = { 59 58 [SOF_IPC] = "intel/sof-tplg", 59 + [SOF_INTEL_IPC4] = "intel/avs-tplg", 60 60 }, 61 61 .default_fw_filename = "sof-tgl-h.ri", 62 62 .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", ··· 75 67 .resindex_imr_base = -1, 76 68 .irqindex_host_ipc = -1, 77 69 .chip_info = &ehl_chip_info, 70 + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), 71 + .ipc_default = SOF_IPC, 78 72 .default_fw_path = { 79 73 [SOF_IPC] = "intel/sof", 74 + [SOF_INTEL_IPC4] = "intel/avs/ehl", 80 75 }, 81 76 .default_tplg_path = { 82 77 [SOF_IPC] = "intel/sof-tplg", 78 + [SOF_INTEL_IPC4] = "intel/avs-tplg", 83 79 }, 84 80 .default_fw_filename = "sof-ehl.ri", 85 81 .nocodec_tplg_filename = "sof-ehl-nocodec.tplg", ··· 99 87 .resindex_imr_base = -1, 100 88 .irqindex_host_ipc = -1, 101 89 .chip_info = &adls_chip_info, 90 + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), 91 + .ipc_default = SOF_IPC, 102 92 .default_fw_path = { 103 93 [SOF_IPC] = "intel/sof", 94 + [SOF_INTEL_IPC4] = "intel/avs/adl-s", 104 95 }, 105 96 .default_tplg_path = { 106 97 [SOF_IPC] = "intel/sof-tplg", 98 + [SOF_INTEL_IPC4] = "intel/avs-tplg", 107 99 }, 108 100 .default_fw_filename = "sof-adl-s.ri", 109 101 .nocodec_tplg_filename = "sof-adl-nocodec.tplg", ··· 123 107 .resindex_imr_base = -1, 124 108 .irqindex_host_ipc = -1, 125 109 .chip_info = &tgl_chip_info, 110 + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), 111 + .ipc_default = SOF_IPC, 126 112 .default_fw_path = { 127 113 [SOF_IPC] = "intel/sof", 114 + [SOF_INTEL_IPC4] = "intel/avs/adl", 128 115 }, 129 116 .default_tplg_path = { 130 117 [SOF_IPC] = "intel/sof-tplg", 118 + [SOF_INTEL_IPC4] = "intel/avs-tplg", 131 119 }, 132 120 .default_fw_filename = "sof-adl.ri", 133 121 .nocodec_tplg_filename = "sof-adl-nocodec.tplg",
+2
sound/soc/sof/intel/pci-tng.c
··· 219 219 .resindex_imr_base = 0, 220 220 .irqindex_host_ipc = -1, 221 221 .chip_info = &tng_chip_info, 222 + .ipc_supported_mask = BIT(SOF_IPC), 223 + .ipc_default = SOF_IPC, 222 224 .default_fw_path = { 223 225 [SOF_IPC] = "intel/sof", 224 226 },
+2
sound/soc/sof/mediatek/mt8195/mt8195.c
··· 440 440 }; 441 441 442 442 static const struct sof_dev_desc sof_of_mt8195_desc = { 443 + .ipc_supported_mask = BIT(SOF_IPC), 444 + .ipc_default = SOF_IPC, 443 445 .default_fw_path = { 444 446 [SOF_IPC] = "mediatek/sof", 445 447 },