Skip to content

Commit 03eec9b

Browse files
ranj063broonie
authored andcommitted
ASoC: SOF: Introduce default_fw_filename member in sof_dev_desc
Currently the FW filename is obtained from the ACPI matching table when determining which machine driver to use. In preparation for making the machine driver ACPI match optional for Device Tree platforms and moving the machine driver selection out of the SOF core, this patch introduces the default_fw_filename member in struct sof_dev_desc. Once the machine driver selection is moved out of SOF core, the nocodec_fw_filename will become obsolete and will be removed. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191204211556.12671-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 8c583f5 commit 03eec9b

4 files changed

Lines changed: 18 additions & 0 deletions

File tree

‎include/sound/sof.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ struct sof_dev_desc {
9191
const char *default_fw_path;
9292
const char *default_tplg_path;
9393

94+
/* default firmware name */
95+
const char *default_fw_filename;
96+
9497
const struct snd_sof_dsp_ops *ops;
9598
const struct sof_arch_ops *arch_ops;
9699
};

‎sound/soc/sof/sof-acpi-dev.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ static const struct sof_dev_desc sof_acpi_haswell_desc = {
4545
.chip_info = &hsw_chip_info,
4646
.default_fw_path = "intel/sof",
4747
.default_tplg_path = "intel/sof-tplg",
48+
.default_fw_filename = "sof-hsw.ri",
4849
.nocodec_fw_filename = "sof-hsw.ri",
4950
.nocodec_tplg_filename = "sof-hsw-nocodec.tplg",
5051
.ops = &sof_hsw_ops,
@@ -62,6 +63,7 @@ static const struct sof_dev_desc sof_acpi_broadwell_desc = {
6263
.chip_info = &bdw_chip_info,
6364
.default_fw_path = "intel/sof",
6465
.default_tplg_path = "intel/sof-tplg",
66+
.default_fw_filename = "sof-bdw.ri",
6567
.nocodec_fw_filename = "sof-bdw.ri",
6668
.nocodec_tplg_filename = "sof-bdw-nocodec.tplg",
6769
.ops = &sof_bdw_ops,
@@ -81,6 +83,7 @@ static const struct sof_dev_desc sof_acpi_baytrailcr_desc = {
8183
.chip_info = &byt_chip_info,
8284
.default_fw_path = "intel/sof",
8385
.default_tplg_path = "intel/sof-tplg",
86+
.default_fw_filename = "sof-byt.ri",
8487
.nocodec_fw_filename = "sof-byt.ri",
8588
.nocodec_tplg_filename = "sof-byt-nocodec.tplg",
8689
.ops = &sof_byt_ops,
@@ -96,6 +99,7 @@ static const struct sof_dev_desc sof_acpi_baytrail_desc = {
9699
.chip_info = &byt_chip_info,
97100
.default_fw_path = "intel/sof",
98101
.default_tplg_path = "intel/sof-tplg",
102+
.default_fw_filename = "sof-byt.ri",
99103
.nocodec_fw_filename = "sof-byt.ri",
100104
.nocodec_tplg_filename = "sof-byt-nocodec.tplg",
101105
.ops = &sof_byt_ops,
@@ -111,6 +115,7 @@ static const struct sof_dev_desc sof_acpi_cherrytrail_desc = {
111115
.chip_info = &cht_chip_info,
112116
.default_fw_path = "intel/sof",
113117
.default_tplg_path = "intel/sof-tplg",
118+
.default_fw_filename = "sof-cht.ri",
114119
.nocodec_fw_filename = "sof-cht.ri",
115120
.nocodec_tplg_filename = "sof-cht-nocodec.tplg",
116121
.ops = &sof_cht_ops,

‎sound/soc/sof/sof-of-dev.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ extern struct snd_sof_dsp_ops sof_imx8_ops;
1919
static struct sof_dev_desc sof_of_imx8qxp_desc = {
2020
.default_fw_path = "imx/sof",
2121
.default_tplg_path = "imx/sof-tplg",
22+
.default_fw_filename = "sof-imx8.ri",
2223
.nocodec_fw_filename = "sof-imx8.ri",
2324
.nocodec_tplg_filename = "sof-imx8-nocodec.tplg",
2425
.ops = &sof_imx8_ops,

‎sound/soc/sof/sof-pci-dev.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static const struct sof_dev_desc bxt_desc = {
4747
.chip_info = &apl_chip_info,
4848
.default_fw_path = "intel/sof",
4949
.default_tplg_path = "intel/sof-tplg",
50+
.default_fw_filename = "sof-apl.ri",
5051
.nocodec_fw_filename = "sof-apl.ri",
5152
.nocodec_tplg_filename = "sof-apl-nocodec.tplg",
5253
.ops = &sof_apl_ops,
@@ -65,6 +66,7 @@ static const struct sof_dev_desc glk_desc = {
6566
.chip_info = &apl_chip_info,
6667
.default_fw_path = "intel/sof",
6768
.default_tplg_path = "intel/sof-tplg",
69+
.default_fw_filename = "sof-glk.ri",
6870
.nocodec_fw_filename = "sof-glk.ri",
6971
.nocodec_tplg_filename = "sof-glk-nocodec.tplg",
7072
.ops = &sof_apl_ops,
@@ -93,6 +95,7 @@ static const struct sof_dev_desc tng_desc = {
9395
.chip_info = &tng_chip_info,
9496
.default_fw_path = "intel/sof",
9597
.default_tplg_path = "intel/sof-tplg",
98+
.default_fw_filename = "sof-byt.ri",
9699
.nocodec_fw_filename = "sof-byt.ri",
97100
.nocodec_tplg_filename = "sof-byt.tplg",
98101
.ops = &sof_tng_ops,
@@ -111,6 +114,7 @@ static const struct sof_dev_desc cnl_desc = {
111114
.chip_info = &cnl_chip_info,
112115
.default_fw_path = "intel/sof",
113116
.default_tplg_path = "intel/sof-tplg",
117+
.default_fw_filename = "sof-cnl.ri",
114118
.nocodec_fw_filename = "sof-cnl.ri",
115119
.nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
116120
.ops = &sof_cnl_ops,
@@ -129,6 +133,7 @@ static const struct sof_dev_desc cfl_desc = {
129133
.chip_info = &cnl_chip_info,
130134
.default_fw_path = "intel/sof",
131135
.default_tplg_path = "intel/sof-tplg",
136+
.default_fw_filename = "sof-cfl.ri",
132137
.nocodec_fw_filename = "sof-cfl.ri",
133138
.nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
134139
.ops = &sof_cnl_ops,
@@ -149,6 +154,7 @@ static const struct sof_dev_desc cml_desc = {
149154
.chip_info = &cnl_chip_info,
150155
.default_fw_path = "intel/sof",
151156
.default_tplg_path = "intel/sof-tplg",
157+
.default_fw_filename = "sof-cml.ri",
152158
.nocodec_fw_filename = "sof-cml.ri",
153159
.nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
154160
.ops = &sof_cnl_ops,
@@ -167,6 +173,7 @@ static const struct sof_dev_desc icl_desc = {
167173
.chip_info = &icl_chip_info,
168174
.default_fw_path = "intel/sof",
169175
.default_tplg_path = "intel/sof-tplg",
176+
.default_fw_filename = "sof-icl.ri",
170177
.nocodec_fw_filename = "sof-icl.ri",
171178
.nocodec_tplg_filename = "sof-icl-nocodec.tplg",
172179
.ops = &sof_cnl_ops,
@@ -185,6 +192,7 @@ static const struct sof_dev_desc tgl_desc = {
185192
.chip_info = &tgl_chip_info,
186193
.default_fw_path = "intel/sof",
187194
.default_tplg_path = "intel/sof-tplg",
195+
.default_fw_filename = "sof-tgl.ri",
188196
.nocodec_fw_filename = "sof-tgl.ri",
189197
.nocodec_tplg_filename = "sof-tgl-nocodec.tplg",
190198
.ops = &sof_cnl_ops,
@@ -203,6 +211,7 @@ static const struct sof_dev_desc ehl_desc = {
203211
.chip_info = &ehl_chip_info,
204212
.default_fw_path = "intel/sof",
205213
.default_tplg_path = "intel/sof-tplg",
214+
.default_fw_filename = "sof-ehl.ri",
206215
.nocodec_fw_filename = "sof-ehl.ri",
207216
.nocodec_tplg_filename = "sof-ehl-nocodec.tplg",
208217
.ops = &sof_cnl_ops,

0 commit comments

Comments
 (0)