Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
001cb10
ASoC: SOF: Introduce generic names for IPC types
ujfalusi Apr 13, 2023
3e43cf4
ASoC: SOF: sof-pci-dev: Update the ipc_type module parameter description
ujfalusi Apr 13, 2023
abc3feb
ASoC: SOF: Kconfig: Rename SND_SOC_SOF_INTEL_IPC4 to SND_SOC_SOF_IPC4
ujfalusi Apr 13, 2023
f733223
ASoC: SOF: Use generic names for IPC types
ujfalusi Apr 13, 2023
a0518e9
ASoC: SOF: amd: Use generic names for IPC types
ujfalusi Apr 13, 2023
b8d7483
ASoC: SOF: imx: Use generic names for IPC types
ujfalusi Apr 13, 2023
e1ee3e7
ASoC: SOF: Intel: Use generic names for IPC types
ujfalusi Apr 13, 2023
c984a83
ASoC: SOF: Intel: pci-lnl: Use generic names for IPC types
ujfalusi Apr 13, 2023
a6fbe02
ASoC: SOF: mediatek: Use generic names for IPC types
ujfalusi Apr 13, 2023
903eedf
ASoC: SOF: Drop unused IPC type defines
ujfalusi Apr 13, 2023
bbc9765
ASoC: SOF: pci-cnl: Align the IPC4 firmware paths for cfl and cml
ujfalusi Apr 17, 2023
fbb6a5b
ASoC: SOF: Add enum and struct for 'firmware layout profile' support
ujfalusi Apr 18, 2023
9192f9e
ASoC: SOF: Add library file to handle the firmware file profiles
ujfalusi Apr 18, 2023
1f72386
ASoC: SOF: amd: Add vendor and platform names for device descriptors
ujfalusi Apr 18, 2023
38825e0
ASoC: SOF: imx: Add vendor and platform names for device descriptors
ujfalusi Apr 18, 2023
a59675c
ASoC: SOF: Intel: Add vendor and platform names for device descriptors
ujfalusi Apr 18, 2023
2d3c655
ASoC: SOF: Intel: pci-lnl: Add vendor and platform names for device d…
ujfalusi Apr 18, 2023
c4f63cb
ASoC: SOF: mediatek: Add vendor and platform names for device descrip…
ujfalusi Apr 18, 2023
d8bc08c
ASoC: SOF: sof-acpi-dev: Create and use the default firmware layout p…
ujfalusi Apr 18, 2023
c383b0f
ASoC: SOF: sof-of-dev: Create and use the default firmware layout pro…
ujfalusi Apr 18, 2023
3426a38
ASoC: SOF: sof-pci-dev: Create and use the default firmware layout pr…
ujfalusi Apr 18, 2023
f2bf0ee
ASoC: SOF: amd: Drop default fw_path, tplg_path and fw_filename from …
ujfalusi Apr 18, 2023
e84d635
ASoC: SOF: imx: Drop default fw_path, tplg_path and fw_filename from …
ujfalusi Apr 18, 2023
55ba3b6
ASoC: SOF: Intel: Drop default fw_path, tplg_path and fw_filename fro…
ujfalusi Apr 18, 2023
8bd8d54
ASoC: SOF: Intel: pci-lnl: Drop default fw_path, tplg_path and fw_fil…
ujfalusi Apr 18, 2023
45603ac
ASoC: SOF: mediatek: Drop default fw_path, tplg_path and fw_filename …
ujfalusi Apr 18, 2023
cbcdda8
ASoC: SOF: Remove the string arrays used for default paths and firmwa…
ujfalusi Apr 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 53 additions & 9 deletions include/sound/sof.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,59 @@ enum sof_dsp_power_states {
SOF_DSP_PM_D3,
};

/**
* enum sof_fw_layout_type - pre-defined file-layout for loadable fw files
* @SOF_FW_LAYOUT_VENDOR_IPC3:
* firmware path: <vendor>/sof</fw_path_postfix>
* firmware name: sof-<platform>.ri
* topology path: <vendor>/sof-tplg/
* @SOF_FW_LAYOUT_VENDOR_IPC4_SOF:
* firmware path: <vendor>/sof-ipc4/<platform></fw_path_postfix>
* firmware name: sof-<platform>.ri
* firmware lib path: <vendor>/sof-ipc4-lib/<platform></fw_path_postfix>
* topology path: <vendor>/sof-ipc4-tplg/
* @SOF_FW_LAYOUT_VENDOR_IPC4_INTEL_AVS:
* firmware path: intel/avs/<platform></fw_path_postfix>
* firmware name: dsp_basefw.bin
* firmware lib path: intel/avs-lib/<platform></fw_path_postfix>
* topology path: intel/avs-tplg/
* @SOF_FW_LAYOUT_VENDOR_IPC4_INTEL_ACE:
* firmware path: intel/sof-ipc4/<platform></fw_path_postfix>
* firmware name: sof-<platform>.ri
* firmware lib path: intel/sof-ipc4-lib/<platform></fw_path_postfix>
* topology path: intel/sof-ace-tplg/
*/
enum sof_fw_layout_type {
SOF_FW_LAYOUT_VENDOR_IPC3,
SOF_FW_LAYOUT_VENDOR_IPC4_SOF,
SOF_FW_LAYOUT_VENDOR_IPC4_INTEL_AVS,
SOF_FW_LAYOUT_VENDOR_IPC4_INTEL_ACE,
SOF_FW_LAYOUT_COUNT,
};

/* Definitions for multiple IPCs */
enum sof_ipc_type {
SOF_IPC,
SOF_INTEL_IPC4,
SOF_IPC_TYPE_3,
SOF_IPC_TYPE_4,
SOF_IPC_TYPE_COUNT
};

/**
* struct sof_fw_layout_profile - Description of a firmware layout and type
* @ipc_type: IPC type of the profile
* @fw_path: Path where the @fw_filename resides
* @fw_lib_path: Path where the external libraries can be found (IPC4 only)
* @fw_name: Name of the frmware file
* @tplg_path: Path where to look for the topology files
*/
struct sof_fw_layout_profile {
enum sof_ipc_type ipc_type;
const char *fw_path;
const char *fw_lib_path;
const char *fw_name;
const char *tplg_path;
};

/*
* SOF Platform data.
*/
Expand All @@ -79,6 +125,8 @@ struct snd_sof_pdata {
const struct sof_dev_desc *desc;

/* firmware and topology filenames */
struct sof_fw_layout_profile default_fw_profile;

const char *fw_filename_prefix;
const char *fw_filename;
const char *tplg_filename_prefix;
Expand Down Expand Up @@ -135,13 +183,9 @@ struct sof_dev_desc {
/* The platform supports DSPless mode */
bool dspless_mode_supported;

/* defaults paths for firmware, library and topology files */
const char *default_fw_path[SOF_IPC_TYPE_COUNT];
const char *default_lib_path[SOF_IPC_TYPE_COUNT];
const char *default_tplg_path[SOF_IPC_TYPE_COUNT];

/* default firmware name */
const char *default_fw_filename[SOF_IPC_TYPE_COUNT];
/* strings used for the firmware layout path/filename creation */
const char *vendor;
const char *platform;

struct snd_sof_dsp_ops *ops;
int (*ops_init)(struct snd_sof_dev *sdev);
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/sof/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ config SND_SOC_SOF_PROBE_WORK_QUEUE
config SND_SOC_SOF_IPC3
bool

config SND_SOC_SOF_INTEL_IPC4
config SND_SOC_SOF_IPC4
bool

source "sound/soc/sof/amd/Kconfig"
Expand Down
7 changes: 4 additions & 3 deletions sound/soc/sof/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)

snd-sof-objs := core.o ops.o loader.o ipc.o pcm.o pm.o debug.o topology.o\
control.o trace.o iomem-utils.o sof-audio.o stream-ipc.o
control.o trace.o iomem-utils.o sof-audio.o stream-ipc.o\
fw-file-layout.o

# IPC implementations
ifneq ($(CONFIG_SND_SOC_SOF_IPC3),)
snd-sof-objs += ipc3.o ipc3-loader.o ipc3-topology.o ipc3-control.o ipc3-pcm.o\
ipc3-dtrace.o
endif
ifneq ($(CONFIG_SND_SOC_SOF_INTEL_IPC4),)
ifneq ($(CONFIG_SND_SOC_SOF_IPC4),)
snd-sof-objs += ipc4.o ipc4-loader.o ipc4-topology.o ipc4-control.o ipc4-pcm.o\
ipc4-mtrace.o
endif
Expand All @@ -30,7 +31,7 @@ snd-sof-probes-objs := sof-client-probes.o
ifneq ($(CONFIG_SND_SOC_SOF_IPC3),)
snd-sof-probes-objs += sof-client-probes-ipc3.o
endif
ifneq ($(CONFIG_SND_SOC_SOF_INTEL_IPC4),)
ifneq ($(CONFIG_SND_SOC_SOF_IPC4),)
snd-sof-probes-objs += sof-client-probes-ipc4.o
endif

Expand Down
15 changes: 4 additions & 11 deletions sound/soc/sof/amd/pci-rmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,10 @@ static const struct sof_dev_desc rembrandt_desc = {
.resindex_imr_base = -1,
.irqindex_host_ipc = -1,
.chip_info = &rembrandt_chip_info,
.ipc_supported_mask = BIT(SOF_IPC),
.ipc_default = SOF_IPC,
.default_fw_path = {
[SOF_IPC] = "amd/sof",
},
.default_tplg_path = {
[SOF_IPC] = "amd/sof-tplg",
},
.default_fw_filename = {
[SOF_IPC] = "sof-rmb.ri",
},
.ipc_supported_mask = BIT(SOF_IPC_TYPE_3),
.ipc_default = SOF_IPC_TYPE_3,
.vendor = "amd",
.platform = "rmb",
.nocodec_tplg_filename = "sof-acp.tplg",
.ops = &sof_rembrandt_ops,
.ops_init = sof_rembrandt_ops_init,
Expand Down
15 changes: 4 additions & 11 deletions sound/soc/sof/amd/pci-rn.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,10 @@ 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",
},
.default_tplg_path = {
[SOF_IPC] = "amd/sof-tplg",
},
.default_fw_filename = {
[SOF_IPC] = "sof-rn.ri",
},
.ipc_supported_mask = BIT(SOF_IPC_TYPE_3),
.ipc_default = SOF_IPC_TYPE_3,
.vendor = "amd",
.platform = "rn",
.nocodec_tplg_filename = "sof-acp.tplg",
.ops = &sof_renoir_ops,
.ops_init = sof_renoir_ops_init,
Expand Down
Loading