xref: /openbmc/linux/sound/soc/sof/ipc4-priv.h (revision 1ed1f6be)
1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
2 /*
3  * This file is provided under a dual BSD/GPLv2 license.  When using or
4  * redistributing this file, you may do so under either license.
5  *
6  * Copyright(c) 2022 Intel Corporation. All rights reserved.
7  */
8 
9 #ifndef __SOUND_SOC_SOF_IPC4_PRIV_H
10 #define __SOUND_SOC_SOF_IPC4_PRIV_H
11 
12 #include <linux/idr.h>
13 #include <sound/sof/ext_manifest4.h>
14 #include "sof-priv.h"
15 
16 /**
17  * struct sof_ipc4_fw_data - IPC4-specific data
18  * @manifest_fw_hdr_offset: FW header offset in the manifest
19  * @num_fw_modules : Number of modules in base FW
20  * @fw_modules: Array of base FW modules
21  * @nhlt: NHLT table either from the BIOS or the topology manifest
22  */
23 struct sof_ipc4_fw_data {
24 	u32 manifest_fw_hdr_offset;
25 	int num_fw_modules;
26 	void *fw_modules;
27 	void *nhlt;
28 };
29 
30 /**
31  * struct sof_ipc4_fw_module - IPC4 module info
32  * @sof_man4_module : Module info
33  * @m_ida: Module instance identifier
34  * @bss_size: Module object size
35  * @private: Module private data
36  */
37 struct sof_ipc4_fw_module {
38 	struct sof_man4_module man4_module_entry;
39 	struct ida m_ida;
40 	u32 bss_size;
41 	void *private;
42 };
43 
44 extern const struct sof_ipc_fw_loader_ops ipc4_loader_ops;
45 extern const struct sof_ipc_tplg_ops ipc4_tplg_ops;
46 extern const struct sof_ipc_tplg_control_ops tplg_ipc4_control_ops;
47 extern const struct sof_ipc_pcm_ops ipc4_pcm_ops;
48 
49 int sof_ipc4_set_pipeline_state(struct snd_sof_dev *sdev, u32 id, u32 state);
50 
51 #endif
52