/* * struct avs_dev - Intel HD-Audio driver data * * @dev: PCI device * @dsp_ba: DSP bar address * @spec: platform-specific descriptor * @fw_cfg: Firmware configuration, obtained through FW_CONFIG message * @hw_cfg: Hardware configuration, obtained through HW_CONFIG message * @mods_info: Available module-types, obtained through MODULES_INFO message * @mod_idas: Module instance ID pool, one per module-type * @modres_mutex: For synchronizing any @mods_info updates * @ppl_ida: Pipeline instance ID pool * @fw_list: List of libraries loaded, including base firmware
*/ struct avs_dev { struct hda_bus base; struct device *dev;
/* from hda_bus to avs_dev */ #define hda_to_avs(hda) container_of(hda, struct avs_dev, base) /* from hdac_bus to avs_dev */ #define hdac_to_avs(hdac) hda_to_avs(to_hda_bus(hdac)) /* from device to avs_dev */ #define to_avs_dev(dev) \
({ \ struct hdac_bus *__bus = dev_get_drvdata(dev); \
hdac_to_avs(__bus); \
})
int avs_dsp_core_power(struct avs_dev *adev, u32 core_mask, bool power); int avs_dsp_core_reset(struct avs_dev *adev, u32 core_mask, bool reset); int avs_dsp_core_stall(struct avs_dev *adev, u32 core_mask, bool stall); int avs_dsp_core_enable(struct avs_dev *adev, u32 core_mask); int avs_dsp_core_disable(struct avs_dev *adev, u32 core_mask);
/* Inter Process Communication */
struct avs_ipc_msg { union {
u64 header; union avs_global_msg glb; union avs_reply_msg rsp;
}; void *data;
size_t size;
};
/* * struct avs_ipc - DSP IPC context * * @dev: PCI device * @rx: Reply message cache * @default_timeout_ms: default message timeout in MS * @ready: whether firmware is ready and communication is open * @rx_completed: whether RX for previously sent TX has been received * @rx_lock: for serializing manipulation of rx_* fields * @msg_lock: for synchronizing request handling * @done_completion: DONE-part of IPC i.e. ROM and ACKs from FW * @busy_completion: BUSY-part of IPC i.e. receiving responses from FW
*/ struct avs_ipc { struct device *dev;
#define AVS_EIPC EREMOTEIO /* * IPC handlers may return positive value (firmware error code) what denotes * successful HOST <-> DSP communication yet failure to process specific request. * * Below macro converts returned value to linux kernel error code. * All IPC callers MUST use it as soon as firmware error code is consumed.
*/ #define AVS_IPC_RET(ret) \
(((ret) <= 0) ? (ret) : -AVS_EIPC)
void avs_dsp_process_response(struct avs_dev *adev, u64 header); int avs_dsp_send_msg_timeout(struct avs_dev *adev, struct avs_ipc_msg *request, struct avs_ipc_msg *reply, int timeout, constchar *name); int avs_dsp_send_msg(struct avs_dev *adev, struct avs_ipc_msg *request, struct avs_ipc_msg *reply, constchar *name); /* Two variants below are for messages that control DSP power states. */ int avs_dsp_send_pm_msg_timeout(struct avs_dev *adev, struct avs_ipc_msg *request, struct avs_ipc_msg *reply, int timeout, bool wake_d0i0, constchar *name); int avs_dsp_send_pm_msg(struct avs_dev *adev, struct avs_ipc_msg *request, struct avs_ipc_msg *reply, bool wake_d0i0, constchar *name); int avs_dsp_send_rom_msg_timeout(struct avs_dev *adev, struct avs_ipc_msg *request, inttimeout, constchar *name); int avs_dsp_send_rom_msg(struct avs_dev *adev, struct avs_ipc_msg *request, constchar *name); void avs_dsp_interrupt_control(struct avs_dev *adev, bool enable); int avs_ipc_init(struct avs_ipc *ipc, struct device *dev); void avs_ipc_block(struct avs_ipc *ipc);
int avs_dsp_disable_d0ix(struct avs_dev *adev); int avs_dsp_enable_d0ix(struct avs_dev *adev);
int avs_mtl_core_power(struct avs_dev *adev, u32 core_mask, bool power); int avs_mtl_core_reset(struct avs_dev *adev, u32 core_mask, bool power); int avs_mtl_core_stall(struct avs_dev *adev, u32 core_mask, bool stall); int avs_lnl_core_stall(struct avs_dev *adev, u32 core_mask, bool stall); void avs_mtl_interrupt_control(struct avs_dev *adev, bool enable); void avs_skl_ipc_interrupt(struct avs_dev *adev);
irqreturn_t avs_cnl_dsp_interrupt(struct avs_dev *adev);
irqreturn_t avs_mtl_dsp_interrupt(struct avs_dev *adev); int avs_apl_enable_logs(struct avs_dev *adev, enum avs_log_enable enable, u32 aging_period,
u32 fifo_full_period, unsignedlong resource_mask, u32 *priorities); int avs_icl_enable_logs(struct avs_dev *adev, enum avs_log_enable enable, u32 aging_period,
u32 fifo_full_period, unsignedlong resource_mask, u32 *priorities); int avs_skl_log_buffer_offset(struct avs_dev *adev, u32 core); int avs_icl_log_buffer_offset(struct avs_dev *adev, u32 core); int avs_apl_log_buffer_status(struct avs_dev *adev, union avs_notify_msg *msg); int avs_apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg); bool avs_apl_d0ix_toggle(struct avs_dev *adev, struct avs_ipc_msg *tx, bool wake); bool avs_icl_d0ix_toggle(struct avs_dev *adev, struct avs_ipc_msg *tx, bool wake); int avs_apl_set_d0ix(struct avs_dev *adev, bool enable); int avs_icl_set_d0ix(struct avs_dev *adev, bool enable);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.