Lines Matching +full:module +full:- +full:instance
1 // SPDX-License-Identifier: GPL-2.0-only
3 // Copyright(c) 2021-2022 Intel Corporation
125 * avs_ipc_init_instance - Initialize module instance
128 * @module_id: Module-type id
129 * @instance_id: Unique module instance id
131 * @core_id: DSP core to allocate module on
133 * @param: Module-type specific configuration
140 * can be composed of module instances located on different DSP cores.
161 return avs_dsp_send_msg(adev, &request, NULL, "init instance"); in avs_ipc_init_instance()
165 * avs_ipc_delete_instance - Delete module instance
168 * @module_id: Module-type id
169 * @instance_id: Unique module instance id
187 return avs_dsp_send_msg(adev, &request, NULL, "delete instance"); in avs_ipc_delete_instance()
191 * avs_ipc_bind - Bind two module instances
194 * @module_id: Source module-type id
195 * @instance_id: Source module instance id
196 * @dst_module_id: Sink module-type id
197 * @dst_instance_id: Sink module instance id
198 * @dst_queue: Sink module pin to bind @src_queue with
199 * @src_queue: Source module pin to bind @dst_queue with
220 * avs_ipc_unbind - Unbind two module instances
223 * @module_id: Source module-type id
224 * @instance_id: Source module instance id
225 * @dst_module_id: Sink module-type id
226 * @dst_instance_id: Sink module instance id
227 * @dst_queue: Sink module pin to unbind @src_queue from
228 * @src_queue: Source module pin to unbind @dst_queue from
288 remaining -= tx_size; in avs_ipc_set_large_config()
294 offset = request_size - remaining; in avs_ipc_set_large_config()
305 remaining -= tx_size; in avs_ipc_set_large_config()
323 return -ENOMEM; in avs_ipc_get_large_config()
347 return -ENOMEM; in avs_ipc_get_large_config()
372 * avs_ipc_set_d0ix - Set power gating policy (entering D0IX substates)
404 /* Non-zero payload expected for FIRMWARE_CONFIG. */ in avs_ipc_get_fw_config()
406 ret = -EREMOTEIO; in avs_ipc_get_fw_config()
413 switch (tlv->type) { in avs_ipc_get_fw_config()
415 memcpy(&cfg->fw_version, tlv->value, sizeof(cfg->fw_version)); in avs_ipc_get_fw_config()
419 cfg->memory_reclaimed = *tlv->value; in avs_ipc_get_fw_config()
423 cfg->slow_clock_freq_hz = *tlv->value; in avs_ipc_get_fw_config()
427 cfg->fast_clock_freq_hz = *tlv->value; in avs_ipc_get_fw_config()
431 cfg->alh_support = *tlv->value; in avs_ipc_get_fw_config()
435 cfg->ipc_dl_mailbox_bytes = *tlv->value; in avs_ipc_get_fw_config()
439 cfg->ipc_ul_mailbox_bytes = *tlv->value; in avs_ipc_get_fw_config()
443 cfg->trace_log_bytes = *tlv->value; in avs_ipc_get_fw_config()
447 cfg->max_ppl_count = *tlv->value; in avs_ipc_get_fw_config()
451 cfg->max_astate_count = *tlv->value; in avs_ipc_get_fw_config()
455 cfg->max_module_pin_count = *tlv->value; in avs_ipc_get_fw_config()
459 cfg->modules_count = *tlv->value; in avs_ipc_get_fw_config()
463 cfg->max_mod_inst_count = *tlv->value; in avs_ipc_get_fw_config()
467 cfg->max_ll_tasks_per_pri_count = *tlv->value; in avs_ipc_get_fw_config()
471 cfg->ll_pri_count = *tlv->value; in avs_ipc_get_fw_config()
475 cfg->max_dp_tasks_count = *tlv->value; in avs_ipc_get_fw_config()
479 cfg->max_libs_count = *tlv->value; in avs_ipc_get_fw_config()
483 cfg->xtal_freq_hz = *tlv->value; in avs_ipc_get_fw_config()
487 cfg->power_gating_policy = *tlv->value; in avs_ipc_get_fw_config()
498 dev_info(adev->dev, "Unrecognized fw param: %d\n", tlv->type); in avs_ipc_get_fw_config()
502 offset += sizeof(*tlv) + tlv->length; in avs_ipc_get_fw_config()
509 dev_err(adev->dev, "get fw cfg failed: %d\n", ret); in avs_ipc_get_fw_config()
526 /* Non-zero payload expected for HARDWARE_CONFIG. */ in avs_ipc_get_hw_config()
528 ret = -EREMOTEIO; in avs_ipc_get_hw_config()
535 switch (tlv->type) { in avs_ipc_get_hw_config()
537 cfg->avs_version = *tlv->value; in avs_ipc_get_hw_config()
541 cfg->dsp_cores = *tlv->value; in avs_ipc_get_hw_config()
545 cfg->mem_page_bytes = *tlv->value; in avs_ipc_get_hw_config()
549 cfg->total_phys_mem_pages = *tlv->value; in avs_ipc_get_hw_config()
553 cfg->i2s_caps.i2s_version = tlv->value[0]; in avs_ipc_get_hw_config()
554 size = tlv->value[1]; in avs_ipc_get_hw_config()
555 cfg->i2s_caps.ctrl_count = size; in avs_ipc_get_hw_config()
560 size *= sizeof(*cfg->i2s_caps.ctrl_base_addr); in avs_ipc_get_hw_config()
561 cfg->i2s_caps.ctrl_base_addr = devm_kmemdup(adev->dev, in avs_ipc_get_hw_config()
562 &tlv->value[2], in avs_ipc_get_hw_config()
564 if (!cfg->i2s_caps.ctrl_base_addr) { in avs_ipc_get_hw_config()
565 ret = -ENOMEM; in avs_ipc_get_hw_config()
571 cfg->gateway_count = *tlv->value; in avs_ipc_get_hw_config()
575 cfg->hp_ebb_count = *tlv->value; in avs_ipc_get_hw_config()
579 cfg->lp_ebb_count = *tlv->value; in avs_ipc_get_hw_config()
583 cfg->ebb_size_bytes = *tlv->value; in avs_ipc_get_hw_config()
590 dev_info(adev->dev, "Unrecognized hw config: %d\n", tlv->type); in avs_ipc_get_hw_config()
594 offset += sizeof(*tlv) + tlv->length; in avs_ipc_get_hw_config()
602 dev_err(adev->dev, "get hw cfg failed: %d\n", ret); in avs_ipc_get_hw_config()
617 /* Non-zero payload expected for MODULES_INFO. */ in avs_ipc_get_modules_info()
619 return -EREMOTEIO; in avs_ipc_get_modules_info()
661 /* Non-zero payload expected for PEAKVOL_VOLUME. */ in avs_ipc_peakvol_get_volume()
663 return -EREMOTEIO; in avs_ipc_peakvol_get_volume()