Lines Matching defs:sdev
14 static int ipc3_fw_ext_man_get_version(struct snd_sof_dev *sdev,
20 memcpy(&sdev->fw_ready.version, &v->version, sizeof(v->version));
21 sdev->fw_ready.flags = v->flags;
24 return sof_ipc3_validate_fw_version(sdev);
27 static int ipc3_fw_ext_man_get_windows(struct snd_sof_dev *sdev,
34 return sof_ipc3_get_ext_windows(sdev, &w->ipc_window.ext_hdr);
37 static int ipc3_fw_ext_man_get_cc_info(struct snd_sof_dev *sdev,
44 return sof_ipc3_get_cc_info(sdev, &cc->cc_version.ext_hdr);
47 static int ipc3_fw_ext_man_get_dbg_abi_info(struct snd_sof_dev *sdev,
53 if (sdev->first_boot)
54 dev_dbg(sdev->dev,
63 static int ipc3_fw_ext_man_get_config_data(struct snd_sof_dev *sdev,
78 dev_dbg(sdev->dev, "manifest can hold up to %d config elements\n", elems_counter);
82 dev_dbg(sdev->dev, "get index %d token %d val %d\n",
92 if (sdev->first_boot && elem->value)
93 ret = snd_sof_dbg_memory_info_init(sdev);
96 dev_info(sdev->dev,
102 dev_err(sdev->dev,
112 static ssize_t ipc3_fw_ext_man_size(struct snd_sof_dev *sdev, const struct firmware *fw)
134 dev_dbg(sdev->dev, "Unexpected extended manifest magic number: %#x\n",
139 static size_t sof_ipc3_fw_parse_ext_man(struct snd_sof_dev *sdev)
141 const struct firmware *fw = sdev->basefw.fw;
151 if (remaining < 0 || remaining > sdev->basefw.fw->size)
153 ext_man_size = ipc3_fw_ext_man_size(sdev, fw);
162 dev_err(sdev->dev,
174 dev_dbg(sdev->dev, "found sof_ext_man header type %d size %#x\n",
179 dev_err(sdev->dev,
188 ret = ipc3_fw_ext_man_get_version(sdev, elem_hdr);
191 ret = ipc3_fw_ext_man_get_windows(sdev, elem_hdr);
194 ret = ipc3_fw_ext_man_get_cc_info(sdev, elem_hdr);
197 ret = ipc3_fw_ext_man_get_dbg_abi_info(sdev, elem_hdr);
200 ret = ipc3_fw_ext_man_get_config_data(sdev, elem_hdr);
203 ret = snd_sof_dsp_parse_platform_ext_manifest(sdev, elem_hdr);
206 dev_info(sdev->dev,
213 dev_err(sdev->dev,
224 dev_err(sdev->dev, "error: sof_ext_man header is inconsistent\n");
232 static int sof_ipc3_parse_module_memcpy(struct snd_sof_dev *sdev,
240 dev_dbg(sdev->dev, "new module size %#x blocks %#x type %#x\n",
250 dev_err(sdev->dev, "not enough data remaining\n");
258 dev_warn(sdev->dev,
260 dev_warn(sdev->dev, " type %#x offset %#x\n",
275 dev_err(sdev->dev, "%s: bad type %#x for block %#x\n",
280 dev_dbg(sdev->dev, "block %d type %#x size %#x ==> offset %#x\n",
285 dev_err(sdev->dev, "%s: invalid block size %#x\n",
289 ret = snd_sof_dsp_block_write(sdev, block->type, offset,
292 dev_err(sdev->dev, "%s: write to block type %#x failed\n",
298 dev_err(sdev->dev, "%s: not enough data remaining\n", __func__);
312 static int sof_ipc3_load_fw_to_dsp(struct snd_sof_dev *sdev)
314 u32 payload_offset = sdev->basefw.payload_offset;
315 const struct firmware *fw = sdev->basefw.fw;
326 load_module = sof_ops(sdev)->load_module;
328 dev_dbg(sdev->dev, "Using generic module loading\n");
331 dev_dbg(sdev->dev, "Using custom module loading\n");
339 dev_err(sdev->dev, "%s: fw size smaller than header size\n", __func__);
346 dev_err(sdev->dev, "%s: not enough data for a module\n",
355 ret = load_module(sdev, module);
357 dev_err(sdev->dev, "%s: invalid module %d\n", __func__, count);
362 dev_err(sdev->dev, "%s: not enough data remaining\n", __func__);
375 static int sof_ipc3_validate_firmware(struct snd_sof_dev *sdev)
377 u32 payload_offset = sdev->basefw.payload_offset;
378 const struct firmware *fw = sdev->basefw.fw;
383 dev_err(sdev->dev,
393 dev_err(sdev->dev, "invalid firmware signature\n");
399 dev_err(sdev->dev,
405 dev_dbg(sdev->dev, "header size=0x%x modules=0x%x abi=0x%x size=%zu\n",