Lines Matching refs:fw
307 const struct firmware *fw) in sigmadsp_fw_load_v2() argument
317 if (fw->size < sizeof(*chunk) + sizeof(struct sigma_firmware_header)) in sigmadsp_fw_load_v2()
322 while (pos < fw->size - sizeof(*chunk)) { in sigmadsp_fw_load_v2()
323 chunk = (struct sigma_fw_chunk *)(fw->data + pos); in sigmadsp_fw_load_v2()
327 if (length > fw->size - pos || length < sizeof(*chunk)) in sigmadsp_fw_load_v2()
423 const struct firmware *fw) in sigmadsp_fw_load_v1() argument
431 while (pos + sizeof(*sa) <= fw->size) { in sigmadsp_fw_load_v1()
432 sa = (struct sigma_action *)(fw->data + pos); in sigmadsp_fw_load_v1()
436 if (pos > fw->size || size == 0) in sigmadsp_fw_load_v1()
447 if (pos != fw->size) in sigmadsp_fw_load_v1()
478 const struct firmware *fw; in sigmadsp_firmware_load() local
483 ret = request_firmware(&fw, name, sigmadsp->dev); in sigmadsp_firmware_load()
498 if (fw->size < sizeof(*ssfw_head) || fw->size >= 0x4000000) { in sigmadsp_firmware_load()
503 ssfw_head = (void *)fw->data; in sigmadsp_firmware_load()
509 crc = crc32(0, fw->data + sizeof(*ssfw_head), in sigmadsp_firmware_load()
510 fw->size - sizeof(*ssfw_head)); in sigmadsp_firmware_load()
520 ret = sigmadsp_fw_load_v1(sigmadsp, fw); in sigmadsp_firmware_load()
523 ret = sigmadsp_fw_load_v2(sigmadsp, fw); in sigmadsp_firmware_load()
537 release_firmware(fw); in sigmadsp_firmware_load()