Lines Matching defs:adev

64 #define avs_dsp_op(adev, op, ...) \
65 ((adev)->spec->dsp_ops->op(adev, ## __VA_ARGS__))
73 #define avs_platattr_test(adev, attr) \
74 ((adev)->spec->attributes & AVS_PLATATTR_##attr)
165 int avs_dsp_core_power(struct avs_dev *adev, u32 core_mask, bool power);
166 int avs_dsp_core_reset(struct avs_dev *adev, u32 core_mask, bool reset);
167 int avs_dsp_core_stall(struct avs_dev *adev, u32 core_mask, bool stall);
168 int avs_dsp_core_enable(struct avs_dev *adev, u32 core_mask);
169 int avs_dsp_core_disable(struct avs_dev *adev, u32 core_mask);
227 static inline void avs_ipc_err(struct avs_dev *adev, struct avs_ipc_msg *tx,
237 dev_dbg(adev->dev, "%s 0x%08x 0x%08x failed: %d\n", name,
240 dev_err(adev->dev, "%s 0x%08x 0x%08x failed: %d\n", name,
246 void avs_dsp_process_response(struct avs_dev *adev, u64 header);
247 int avs_dsp_send_msg_timeout(struct avs_dev *adev,
250 int avs_dsp_send_msg(struct avs_dev *adev,
253 int avs_dsp_send_pm_msg_timeout(struct avs_dev *adev, struct avs_ipc_msg *request,
255 int avs_dsp_send_pm_msg(struct avs_dev *adev, struct avs_ipc_msg *request,
257 int avs_dsp_send_rom_msg_timeout(struct avs_dev *adev,
259 int avs_dsp_send_rom_msg(struct avs_dev *adev, struct avs_ipc_msg *request);
260 void avs_dsp_interrupt_control(struct avs_dev *adev, bool enable);
264 int avs_dsp_disable_d0ix(struct avs_dev *adev);
265 int avs_dsp_enable_d0ix(struct avs_dev *adev);
267 int skl_log_buffer_offset(struct avs_dev *adev, u32 core);
271 int avs_get_module_entry(struct avs_dev *adev, const guid_t *uuid, struct avs_module_entry *entry);
272 int avs_get_module_id_entry(struct avs_dev *adev, u32 module_id, struct avs_module_entry *entry);
273 int avs_get_module_id(struct avs_dev *adev, const guid_t *uuid);
274 bool avs_is_module_ida_empty(struct avs_dev *adev, u32 module_id);
276 int avs_module_info_init(struct avs_dev *adev, bool purge);
277 void avs_module_info_free(struct avs_dev *adev);
278 int avs_module_id_alloc(struct avs_dev *adev, u16 module_id);
279 void avs_module_id_free(struct avs_dev *adev, u16 module_id, u8 instance_id);
280 int avs_request_firmware(struct avs_dev *adev, const struct firmware **fw_p, const char *name);
281 void avs_release_last_firmware(struct avs_dev *adev);
282 void avs_release_firmwares(struct avs_dev *adev);
284 int avs_dsp_init_module(struct avs_dev *adev, u16 module_id, u8 ppl_instance_id,
287 void avs_dsp_delete_module(struct avs_dev *adev, u16 module_id, u8 instance_id,
289 int avs_dsp_create_pipeline(struct avs_dev *adev, u16 req_size, u8 priority,
291 int avs_dsp_delete_pipeline(struct avs_dev *adev, u8 instance_id);
295 void avs_hda_clock_gating_enable(struct avs_dev *adev, bool enable);
296 void avs_hda_power_gating_enable(struct avs_dev *adev, bool enable);
297 void avs_hda_l1sen_enable(struct avs_dev *adev, bool enable);
299 int avs_dsp_load_libraries(struct avs_dev *adev, struct avs_tplg_library *libs, u32 num_libs);
300 int avs_dsp_boot_firmware(struct avs_dev *adev, bool purge);
301 int avs_dsp_first_boot_firmware(struct avs_dev *adev);
303 int avs_cldma_load_basefw(struct avs_dev *adev, struct firmware *fw);
304 int avs_cldma_load_library(struct avs_dev *adev, struct firmware *lib, u32 id);
305 int avs_cldma_transfer_modules(struct avs_dev *adev, bool load,
307 int avs_hda_load_basefw(struct avs_dev *adev, struct firmware *fw);
308 int avs_hda_load_library(struct avs_dev *adev, struct firmware *lib, u32 id);
309 int avs_hda_transfer_modules(struct avs_dev *adev, bool load,
329 int avs_dmic_platform_register(struct avs_dev *adev, const char *name);
330 int avs_i2s_platform_register(struct avs_dev *adev, const char *name, unsigned long port_mask,
332 int avs_hda_platform_register(struct avs_dev *adev, const char *name);
334 int avs_register_all_boards(struct avs_dev *adev);
335 void avs_unregister_all_boards(struct avs_dev *adev);
339 #define avs_log_buffer_size(adev) \
340 ((adev)->fw_cfg.trace_log_bytes / (adev)->hw_cfg.dsp_cores)
342 #define avs_log_buffer_addr(adev, core) \
344 s32 __offset = avs_dsp_op(adev, log_buffer_offset, core); \
346 (avs_sram_addr(adev, AVS_DEBUG_WINDOW) + __offset); \
349 static inline int avs_log_buffer_status_locked(struct avs_dev *adev, union avs_notify_msg *msg)
354 spin_lock_irqsave(&adev->trace_lock, flags);
355 ret = avs_dsp_op(adev, log_buffer_status, msg);
356 spin_unlock_irqrestore(&adev->trace_lock, flags);
367 #define apl_log_payload_size(adev) \
368 (avs_log_buffer_size(adev) - sizeof(struct apl_log_buffer_layout))
377 bool avs_logging_fw(struct avs_dev *adev);
378 void avs_dump_fw_log(struct avs_dev *adev, const void __iomem *src, unsigned int len);
379 void avs_dump_fw_log_wakeup(struct avs_dev *adev, const void __iomem *src, unsigned int len);
381 int avs_probe_platform_register(struct avs_dev *adev, const char *name);
383 void avs_debugfs_init(struct avs_dev *adev);
384 void avs_debugfs_exit(struct avs_dev *adev);
388 static inline bool avs_logging_fw(struct avs_dev *adev)
393 static inline void avs_dump_fw_log(struct avs_dev *adev, const void __iomem *src, unsigned int len)
398 avs_dump_fw_log_wakeup(struct avs_dev *adev, const void __iomem *src, unsigned int len)
402 static inline int avs_probe_platform_register(struct avs_dev *adev, const char *name)
407 static inline void avs_debugfs_init(struct avs_dev *adev) { }
408 static inline void avs_debugfs_exit(struct avs_dev *adev) { }