History

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).

Pierre-Louis Bossart committed 4 years ago

Commit 0cf8ff01 parent a37579112 files · +72 −0Browse files

Unified · Split

12 files
  1. include/sound/sof.h +4 −0
  2. sound/soc/sof/amd/pci-rn.c +2 −0
  3. sound/soc/sof/imx/imx8.c +4 −0
  4. sound/soc/sof/imx/imx8m.c +2 −0
  5. sound/soc/sof/intel/bdw.c +2 −0
  6. sound/soc/sof/intel/byt.c +6 −0
  7. sound/soc/sof/intel/pci-apl.c +8 −0
  8. sound/soc/sof/intel/pci-cnl.c +12 −0
  9. sound/soc/sof/intel/pci-icl.c +8 −0
  10. sound/soc/sof/intel/pci-tgl.c +20 −0
  11. sound/soc/sof/intel/pci-tng.c +2 −0
  12. sound/soc/sof/mediatek/mt8195/mt8195.c +2 −0
include/sound/sof.h+4−0
@@ -124,6 +124,10 @@ struct sof_dev_desc { · 123 unmodified lines
124124 /* defaults for no codec mode */
125125 const char *nocodec_tplg_filename;
126126
127+ /* information on supported IPCs */
128+ unsigned int ipc_supported_mask;
129+ enum sof_ipc_type ipc_default;
130+
127131 /* defaults paths for firmware and topology files */
128132 const char *default_fw_path[SOF_IPC_TYPE_COUNT];
129133 const char *default_tplg_path[SOF_IPC_TYPE_COUNT];
sound/soc/sof/amd/pci-rn.c+2−0
@@ -54,6 +54,8 @@ static const struct sof_dev_desc renoir_desc = { · 53 unmodified lines
5454 .resindex_imr_base = -1,
5555 .irqindex_host_ipc = -1,
5656 .chip_info = &renoir_chip_info,
57+ .ipc_supported_mask = BIT(SOF_IPC),
58+ .ipc_default = SOF_IPC,
5759 .default_fw_path = {
5860 [SOF_IPC] = "amd/sof",
5961 },
sound/soc/sof/imx/imx8.c+4−0
@@ -613,6 +613,8 @@ static const struct snd_sof_dsp_ops sof_imx8x_ops = { · 612 unmodified lines
613613 };
614614
615615 static struct sof_dev_desc sof_of_imx8qxp_desc = {
616+ .ipc_supported_mask = BIT(SOF_IPC),
617+ .ipc_default = SOF_IPC,
616618 .default_fw_path = {
617619 [SOF_IPC] = "imx/sof",
618620 },
@@ -625,6 +627,8 @@ static struct sof_dev_desc sof_of_imx8qxp_desc = { · 6 unmodified lines
625627 };
626628
627629 static struct sof_dev_desc sof_of_imx8qm_desc = {
630+ .ipc_supported_mask = BIT(SOF_IPC),
631+ .ipc_default = SOF_IPC,
628632 .default_fw_path = {
629633 [SOF_IPC] = "imx/sof",
630634 },
sound/soc/sof/imx/imx8m.c+2−0
@@ -473,6 +473,8 @@ static const struct snd_sof_dsp_ops sof_imx8m_ops = { · 472 unmodified lines
473473 };
474474
475475 static struct sof_dev_desc sof_of_imx8mp_desc = {
476+ .ipc_supported_mask = BIT(SOF_IPC),
477+ .ipc_default = SOF_IPC,
476478 .default_fw_path = {
477479 [SOF_IPC] = "imx/sof",
478480 },
sound/soc/sof/intel/bdw.c+2−0
@@ -646,6 +646,8 @@ static const struct sof_dev_desc sof_acpi_broadwell_desc = { · 645 unmodified lines
646646 .resindex_imr_base = -1,
647647 .irqindex_host_ipc = 0,
648648 .chip_info = &bdw_chip_info,
649+ .ipc_supported_mask = BIT(SOF_IPC),
650+ .ipc_default = SOF_IPC,
649651 .default_fw_path = {
650652 [SOF_IPC] = "intel/sof",
651653 },
sound/soc/sof/intel/byt.c+6−0
@@ -388,6 +388,8 @@ static const struct sof_dev_desc sof_acpi_baytrailcr_desc = { · 387 unmodified lines
388388 .resindex_imr_base = 2,
389389 .irqindex_host_ipc = 0,
390390 .chip_info = &byt_chip_info,
391+ .ipc_supported_mask = BIT(SOF_IPC),
392+ .ipc_default = SOF_IPC,
391393 .default_fw_path = {
392394 [SOF_IPC] = "intel/sof",
393395 },
@@ -406,6 +408,8 @@ static const struct sof_dev_desc sof_acpi_baytrail_desc = { · 12 unmodified lines
406408 .resindex_imr_base = 2,
407409 .irqindex_host_ipc = 5,
408410 .chip_info = &byt_chip_info,
411+ .ipc_supported_mask = BIT(SOF_IPC),
412+ .ipc_default = SOF_IPC,
409413 .default_fw_path = {
410414 [SOF_IPC] = "intel/sof",
411415 },
@@ -424,6 +428,8 @@ static const struct sof_dev_desc sof_acpi_cherrytrail_desc = { · 12 unmodified lines
424428 .resindex_imr_base = 2,
425429 .irqindex_host_ipc = 5,
426430 .chip_info = &cht_chip_info,
431+ .ipc_supported_mask = BIT(SOF_IPC),
432+ .ipc_default = SOF_IPC,
427433 .default_fw_path = {
428434 [SOF_IPC] = "intel/sof",
429435 },
sound/soc/sof/intel/pci-apl.c+8−0
@@ -27,11 +27,15 @@ static const struct sof_dev_desc bxt_desc = { · 26 unmodified lines
2727 .resindex_imr_base = -1,
2828 .irqindex_host_ipc = -1,
2929 .chip_info = &apl_chip_info,
30+ .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
31+ .ipc_default = SOF_IPC,
3032 .default_fw_path = {
3133 [SOF_IPC] = "intel/sof",
34+ [SOF_INTEL_IPC4] = "intel/avs/apl",
3235 },
3336 .default_tplg_path = {
3437 [SOF_IPC] = "intel/sof-tplg",
38+ [SOF_INTEL_IPC4] = "intel/avs-tplg",
3539 },
3640 .default_fw_filename = "sof-apl.ri",
3741 .nocodec_tplg_filename = "sof-apl-nocodec.tplg",
@@ -46,11 +50,15 @@ static const struct sof_dev_desc glk_desc = { · 8 unmodified lines
4650 .resindex_imr_base = -1,
4751 .irqindex_host_ipc = -1,
4852 .chip_info = &apl_chip_info,
53+ .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
54+ .ipc_default = SOF_IPC,
4955 .default_fw_path = {
5056 [SOF_IPC] = "intel/sof",
57+ [SOF_INTEL_IPC4] = "intel/avs/glk",
5158 },
5259 .default_tplg_path = {
5360 [SOF_IPC] = "intel/sof-tplg",
61+ [SOF_INTEL_IPC4] = "intel/avs-tplg",
5462 },
5563 .default_fw_filename = "sof-glk.ri",
5664 .nocodec_tplg_filename = "sof-glk-nocodec.tplg",
sound/soc/sof/intel/pci-cnl.c+12−0
@@ -28,11 +28,15 @@ static const struct sof_dev_desc cnl_desc = { · 27 unmodified lines
2828 .resindex_imr_base = -1,
2929 .irqindex_host_ipc = -1,
3030 .chip_info = &cnl_chip_info,
31+ .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
32+ .ipc_default = SOF_IPC,
3133 .default_fw_path = {
3234 [SOF_IPC] = "intel/sof",
35+ [SOF_INTEL_IPC4] = "intel/avs/cnl",
3336 },
3437 .default_tplg_path = {
3538 [SOF_IPC] = "intel/sof-tplg",
39+ [SOF_INTEL_IPC4] = "intel/avs-tplg",
3640 },
3741 .default_fw_filename = "sof-cnl.ri",
3842 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
@@ -48,11 +52,15 @@ static const struct sof_dev_desc cfl_desc = { · 9 unmodified lines
4852 .resindex_imr_base = -1,
4953 .irqindex_host_ipc = -1,
5054 .chip_info = &cnl_chip_info,
55+ .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
56+ .ipc_default = SOF_IPC,
5157 .default_fw_path = {
5258 [SOF_IPC] = "intel/sof",
59+ [SOF_INTEL_IPC4] = "intel/avs/cnl",
5360 },
5461 .default_tplg_path = {
5562 [SOF_IPC] = "intel/sof-tplg",
63+ [SOF_INTEL_IPC4] = "intel/avs-tplg",
5664 },
5765 .default_fw_filename = "sof-cfl.ri",
5866 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
@@ -68,11 +76,15 @@ static const struct sof_dev_desc cml_desc = { · 9 unmodified lines
6876 .resindex_imr_base = -1,
6977 .irqindex_host_ipc = -1,
7078 .chip_info = &cnl_chip_info,
79+ .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
80+ .ipc_default = SOF_IPC,
7181 .default_fw_path = {
7282 [SOF_IPC] = "intel/sof",
83+ [SOF_INTEL_IPC4] = "intel/avs/cnl",
7384 },
7485 .default_tplg_path = {
7586 [SOF_IPC] = "intel/sof-tplg",
87+ [SOF_INTEL_IPC4] = "intel/avs-tplg",
7688 },
7789 .default_fw_filename = "sof-cml.ri",
7890 .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
sound/soc/sof/intel/pci-icl.c+8−0
@@ -28,11 +28,15 @@ static const struct sof_dev_desc icl_desc = { · 27 unmodified lines
2828 .resindex_imr_base = -1,
2929 .irqindex_host_ipc = -1,
3030 .chip_info = &icl_chip_info,
31+ .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
32+ .ipc_default = SOF_IPC,
3133 .default_fw_path = {
3234 [SOF_IPC] = "intel/sof",
35+ [SOF_INTEL_IPC4] = "intel/avs/icl",
3336 },
3437 .default_tplg_path = {
3538 [SOF_IPC] = "intel/sof-tplg",
39+ [SOF_INTEL_IPC4] = "intel/avs-tplg",
3640 },
3741 .default_fw_filename = "sof-icl.ri",
3842 .nocodec_tplg_filename = "sof-icl-nocodec.tplg",
@@ -47,11 +51,15 @@ static const struct sof_dev_desc jsl_desc = { · 8 unmodified lines
4751 .resindex_imr_base = -1,
4852 .irqindex_host_ipc = -1,
4953 .chip_info = &jsl_chip_info,
54+ .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
55+ .ipc_default = SOF_IPC,
5056 .default_fw_path = {
5157 [SOF_IPC] = "intel/sof",
58+ [SOF_INTEL_IPC4] = "intel/avs/jsl",
5259 },
5360 .default_tplg_path = {
5461 [SOF_IPC] = "intel/sof-tplg",
62+ [SOF_INTEL_IPC4] = "intel/avs-tplg",
5563 },
5664 .default_fw_filename = "sof-jsl.ri",
5765 .nocodec_tplg_filename = "sof-jsl-nocodec.tplg",
sound/soc/sof/intel/pci-tgl.c+20−0
@@ -28,11 +28,15 @@ static const struct sof_dev_desc tgl_desc = { · 27 unmodified lines
2828 .resindex_imr_base = -1,
2929 .irqindex_host_ipc = -1,
3030 .chip_info = &tgl_chip_info,
31+ .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
32+ .ipc_default = SOF_IPC,
3133 .default_fw_path = {
3234 [SOF_IPC] = "intel/sof",
35+ [SOF_INTEL_IPC4] = "intel/avs/tgl",
3336 },
3437 .default_tplg_path = {
3538 [SOF_IPC] = "intel/sof-tplg",
39+ [SOF_INTEL_IPC4] = "intel/avs-tplg",
3640 },
3741 .default_fw_filename = "sof-tgl.ri",
3842 .nocodec_tplg_filename = "sof-tgl-nocodec.tplg",
@@ -48,11 +52,15 @@ static const struct sof_dev_desc tglh_desc = { · 9 unmodified lines
4852 .resindex_imr_base = -1,
4953 .irqindex_host_ipc = -1,
5054 .chip_info = &tglh_chip_info,
55+ .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
56+ .ipc_default = SOF_IPC,
5157 .default_fw_path = {
5258 [SOF_IPC] = "intel/sof",
59+ [SOF_INTEL_IPC4] = "intel/avs/tgl-h",
5360 },
5461 .default_tplg_path = {
5562 [SOF_IPC] = "intel/sof-tplg",
63+ [SOF_INTEL_IPC4] = "intel/avs-tplg",
5664 },
5765 .default_fw_filename = "sof-tgl-h.ri",
5866 .nocodec_tplg_filename = "sof-tgl-nocodec.tplg",
@@ -67,11 +75,15 @@ static const struct sof_dev_desc ehl_desc = { · 8 unmodified lines
6775 .resindex_imr_base = -1,
6876 .irqindex_host_ipc = -1,
6977 .chip_info = &ehl_chip_info,
78+ .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
79+ .ipc_default = SOF_IPC,
7080 .default_fw_path = {
7181 [SOF_IPC] = "intel/sof",
82+ [SOF_INTEL_IPC4] = "intel/avs/ehl",
7283 },
7384 .default_tplg_path = {
7485 [SOF_IPC] = "intel/sof-tplg",
86+ [SOF_INTEL_IPC4] = "intel/avs-tplg",
7587 },
7688 .default_fw_filename = "sof-ehl.ri",
7789 .nocodec_tplg_filename = "sof-ehl-nocodec.tplg",
@@ -87,11 +99,15 @@ static const struct sof_dev_desc adls_desc = { · 9 unmodified lines
8799 .resindex_imr_base = -1,
88100 .irqindex_host_ipc = -1,
89101 .chip_info = &adls_chip_info,
102+ .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
103+ .ipc_default = SOF_IPC,
90104 .default_fw_path = {
91105 [SOF_IPC] = "intel/sof",
106+ [SOF_INTEL_IPC4] = "intel/avs/adl-s",
92107 },
93108 .default_tplg_path = {
94109 [SOF_IPC] = "intel/sof-tplg",
110+ [SOF_INTEL_IPC4] = "intel/avs-tplg",
95111 },
96112 .default_fw_filename = "sof-adl-s.ri",
97113 .nocodec_tplg_filename = "sof-adl-nocodec.tplg",
@@ -107,11 +123,15 @@ static const struct sof_dev_desc adl_desc = { · 9 unmodified lines
107123 .resindex_imr_base = -1,
108124 .irqindex_host_ipc = -1,
109125 .chip_info = &tgl_chip_info,
126+ .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4),
127+ .ipc_default = SOF_IPC,
110128 .default_fw_path = {
111129 [SOF_IPC] = "intel/sof",
130+ [SOF_INTEL_IPC4] = "intel/avs/adl",
112131 },
113132 .default_tplg_path = {
114133 [SOF_IPC] = "intel/sof-tplg",
134+ [SOF_INTEL_IPC4] = "intel/avs-tplg",
115135 },
116136 .default_fw_filename = "sof-adl.ri",
117137 .nocodec_tplg_filename = "sof-adl-nocodec.tplg",
sound/soc/sof/intel/pci-tng.c+2−0
@@ -219,6 +219,8 @@ static const struct sof_dev_desc tng_desc = { · 218 unmodified lines
219219 .resindex_imr_base = 0,
220220 .irqindex_host_ipc = -1,
221221 .chip_info = &tng_chip_info,
222+ .ipc_supported_mask = BIT(SOF_IPC),
223+ .ipc_default = SOF_IPC,
222224 .default_fw_path = {
223225 [SOF_IPC] = "intel/sof",
224226 },
sound/soc/sof/mediatek/mt8195/mt8195.c+2−0
@@ -440,6 +440,8 @@ static const struct snd_sof_dsp_ops sof_mt8195_ops = { · 439 unmodified lines
440440 };
441441
442442 static const struct sof_dev_desc sof_of_mt8195_desc = {
443+ .ipc_supported_mask = BIT(SOF_IPC),
444+ .ipc_default = SOF_IPC,
443445 .default_fw_path = {
444446 [SOF_IPC] = "mediatek/sof",
445447 },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t