Lines Matching refs:fw_lib
21 struct sof_ipc4_fw_library *fw_lib) in sof_ipc4_fw_parse_ext_man() argument
24 const struct firmware *fw = fw_lib->sof_fw.fw; in sof_ipc4_fw_parse_ext_man()
83 fw_lib->modules = devm_kmalloc_array(sdev->dev, fw_header->num_module_entries, in sof_ipc4_fw_parse_ext_man()
85 if (!fw_lib->modules) in sof_ipc4_fw_parse_ext_man()
88 fw_lib->name = fw_header->name; in sof_ipc4_fw_parse_ext_man()
89 fw_lib->num_modules = fw_header->num_module_entries; in sof_ipc4_fw_parse_ext_man()
90 fw_module = fw_lib->modules; in sof_ipc4_fw_parse_ext_man()
140 struct sof_ipc4_fw_library *fw_lib; in sof_ipc4_fw_parse_basefw_ext_man() local
144 fw_lib = devm_kzalloc(sdev->dev, sizeof(*fw_lib), GFP_KERNEL); in sof_ipc4_fw_parse_basefw_ext_man()
145 if (!fw_lib) in sof_ipc4_fw_parse_basefw_ext_man()
148 fw_lib->sof_fw.fw = sdev->basefw.fw; in sof_ipc4_fw_parse_basefw_ext_man()
150 payload_offset = sof_ipc4_fw_parse_ext_man(sdev, fw_lib); in sof_ipc4_fw_parse_basefw_ext_man()
152 fw_lib->sof_fw.payload_offset = payload_offset; in sof_ipc4_fw_parse_basefw_ext_man()
155 fw_lib->id = 0; in sof_ipc4_fw_parse_basefw_ext_man()
156 ret = xa_insert(&ipc4_data->fw_lib_xa, 0, fw_lib, GFP_KERNEL); in sof_ipc4_fw_parse_basefw_ext_man()
168 struct sof_ipc4_fw_library *fw_lib; in sof_ipc4_load_library_by_uuid() local
184 fw_lib = devm_kzalloc(sdev->dev, sizeof(*fw_lib), GFP_KERNEL); in sof_ipc4_load_library_by_uuid()
185 if (!fw_lib) in sof_ipc4_load_library_by_uuid()
195 ret = request_firmware(&fw_lib->sof_fw.fw, fw_filename, sdev->dev); in sof_ipc4_load_library_by_uuid()
203 payload_offset = sof_ipc4_fw_parse_ext_man(sdev, fw_lib); in sof_ipc4_load_library_by_uuid()
213 fw_lib->sof_fw.payload_offset = payload_offset; in sof_ipc4_load_library_by_uuid()
214 fw_lib->id = lib_id; in sof_ipc4_load_library_by_uuid()
217 for (i = 0; i < fw_lib->num_modules; i++) in sof_ipc4_load_library_by_uuid()
218 fw_lib->modules[i].man4_module_entry.id |= (lib_id << SOF_IPC4_MOD_LIB_ID_SHIFT); in sof_ipc4_load_library_by_uuid()
231 ret = ipc4_data->load_library(sdev, fw_lib, false); in sof_ipc4_load_library_by_uuid()
242 ret = xa_insert(&ipc4_data->fw_lib_xa, lib_id, fw_lib, GFP_KERNEL); in sof_ipc4_load_library_by_uuid()
251 release_firmware(fw_lib->sof_fw.fw); in sof_ipc4_load_library_by_uuid()
253 devm_kfree(sdev->dev, fw_lib->modules); in sof_ipc4_load_library_by_uuid()
257 devm_kfree(sdev->dev, fw_lib); in sof_ipc4_load_library_by_uuid()
266 struct sof_ipc4_fw_library *fw_lib; in sof_ipc4_find_module_by_uuid() local
273 xa_for_each(&ipc4_data->fw_lib_xa, lib_id, fw_lib) { in sof_ipc4_find_module_by_uuid()
274 for (i = 0; i < fw_lib->num_modules; i++) { in sof_ipc4_find_module_by_uuid()
275 if (guid_equal(uuid, &fw_lib->modules[i].man4_module_entry.uuid)) in sof_ipc4_find_module_by_uuid()
276 return &fw_lib->modules[i]; in sof_ipc4_find_module_by_uuid()
297 xa_for_each_start(&ipc4_data->fw_lib_xa, lib_id, fw_lib, lib_id) { in sof_ipc4_find_module_by_uuid()
298 for (i = 0; i < fw_lib->num_modules; i++) { in sof_ipc4_find_module_by_uuid()
299 if (guid_equal(uuid, &fw_lib->modules[i].man4_module_entry.uuid)) in sof_ipc4_find_module_by_uuid()
300 return &fw_lib->modules[i]; in sof_ipc4_find_module_by_uuid()
410 struct sof_ipc4_fw_library *fw_lib; in sof_ipc4_reload_fw_libraries() local
414 xa_for_each_start(&ipc4_data->fw_lib_xa, lib_id, fw_lib, 1) { in sof_ipc4_reload_fw_libraries()
415 ret = ipc4_data->load_library(sdev, fw_lib, true); in sof_ipc4_reload_fw_libraries()
418 __func__, fw_lib->name, ret); in sof_ipc4_reload_fw_libraries()