Lines Matching refs:sdev
227 int (*pcm_open)(struct snd_sof_dev *sdev,
230 int (*pcm_close)(struct snd_sof_dev *sdev,
234 int (*pcm_hw_params)(struct snd_sof_dev *sdev,
240 int (*pcm_hw_free)(struct snd_sof_dev *sdev,
244 int (*pcm_trigger)(struct snd_sof_dev *sdev,
249 snd_pcm_uframes_t (*pcm_pointer)(struct snd_sof_dev *sdev,
253 int (*pcm_ack)(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream); /* optional */
260 u64 (*get_stream_position)(struct snd_sof_dev *sdev,
265 int (*ipc_msg_data)(struct snd_sof_dev *sdev,
270 int (*set_stream_data_offset)(struct snd_sof_dev *sdev,
289 int (*set_hw_params_upon_resume)(struct snd_sof_dev *sdev); /* optional */
290 int (*set_power_state)(struct snd_sof_dev *sdev,
302 int (*debugfs_add_region_item)(struct snd_sof_dev *sdev,
308 int (*trace_init)(struct snd_sof_dev *sdev,
311 int (*trace_release)(struct snd_sof_dev *sdev); /* optional */
312 int (*trace_trigger)(struct snd_sof_dev *sdev,
316 int (*get_bar_index)(struct snd_sof_dev *sdev,
318 int (*get_mailbox_offset)(struct snd_sof_dev *sdev);/* mandatory for common loader code */
319 int (*get_window_offset)(struct snd_sof_dev *sdev,
323 int (*machine_register)(struct snd_sof_dev *sdev,
325 void (*machine_unregister)(struct snd_sof_dev *sdev,
327 struct snd_soc_acpi_mach * (*machine_select)(struct snd_sof_dev *sdev); /* optional */
329 struct snd_sof_dev *sdev); /* optional */
332 int (*register_ipc_clients)(struct snd_sof_dev *sdev); /* optional */
333 void (*unregister_ipc_clients)(struct snd_sof_dev *sdev); /* optional */
347 void (*dsp_oops)(struct snd_sof_dev *sdev, const char *level, void *oops);
348 void (*dsp_stack)(struct snd_sof_dev *sdev, const char *level, void *oops,
352 #define sof_dsp_arch_ops(sdev) ((sdev)->pdata->desc->ops->dsp_arch_ops) argument
368 struct snd_sof_dev *sdev; member
420 int (*init)(struct snd_sof_dev *sdev);
421 void (*free)(struct snd_sof_dev *sdev);
422 void (*fw_crashed)(struct snd_sof_dev *sdev);
423 void (*suspend)(struct snd_sof_dev *sdev, pm_message_t pm_state);
424 int (*resume)(struct snd_sof_dev *sdev);
435 int (*ctx_save)(struct snd_sof_dev *sdev);
436 int (*ctx_restore)(struct snd_sof_dev *sdev);
437 int (*set_core_state)(struct snd_sof_dev *sdev, int core_idx, bool on);
438 int (*set_pm_gate)(struct snd_sof_dev *sdev, u32 flags);
451 int (*validate)(struct snd_sof_dev *sdev);
452 size_t (*parse_ext_manifest)(struct snd_sof_dev *sdev);
453 int (*load_fw_to_dsp)(struct snd_sof_dev *sdev);
493 int (*init)(struct snd_sof_dev *sdev);
494 void (*exit)(struct snd_sof_dev *sdev);
495 int (*post_fw_boot)(struct snd_sof_dev *sdev);
497 int (*tx_msg)(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes,
499 int (*set_get_data)(struct snd_sof_dev *sdev, void *data, size_t data_bytes,
501 int (*get_reply)(struct snd_sof_dev *sdev);
502 void (*rx_msg)(struct snd_sof_dev *sdev);
507 struct snd_sof_dev *sdev; member
524 #define sof_ipc_get_ops(sdev, ops_name) \ argument
525 (((sdev)->ipc && (sdev)->ipc->ops) ? (sdev)->ipc->ops->ops_name : NULL)
685 int snd_sof_dsp_power_down_notify(struct snd_sof_dev *sdev);
689 void snd_sof_new_platform_drv(struct snd_sof_dev *sdev);
699 int snd_sof_load_firmware_raw(struct snd_sof_dev *sdev);
700 int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev);
701 int snd_sof_run_firmware(struct snd_sof_dev *sdev);
702 void snd_sof_fw_unload(struct snd_sof_dev *sdev);
707 struct snd_sof_ipc *snd_sof_ipc_init(struct snd_sof_dev *sdev);
708 void snd_sof_ipc_free(struct snd_sof_dev *sdev);
709 void snd_sof_ipc_get_reply(struct snd_sof_dev *sdev);
710 void snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id);
711 static inline void snd_sof_ipc_msgs_rx(struct snd_sof_dev *sdev) in snd_sof_ipc_msgs_rx() argument
713 sdev->ipc->ops->rx_msg(sdev); in snd_sof_ipc_msgs_rx()
731 int sof_ipc_send_msg(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes,
734 static inline void snd_sof_ipc_process_reply(struct snd_sof_dev *sdev, u32 msg_id) in snd_sof_ipc_process_reply() argument
736 snd_sof_ipc_get_reply(sdev); in snd_sof_ipc_process_reply()
737 snd_sof_ipc_reply(sdev, msg_id); in snd_sof_ipc_process_reply()
743 int snd_sof_dbg_init(struct snd_sof_dev *sdev);
744 void snd_sof_free_debug(struct snd_sof_dev *sdev);
745 int snd_sof_debugfs_buf_item(struct snd_sof_dev *sdev,
748 void sof_print_oops_and_stack(struct snd_sof_dev *sdev, const char *level,
752 void snd_sof_handle_fw_exception(struct snd_sof_dev *sdev, const char *msg);
753 int snd_sof_dbg_memory_info_init(struct snd_sof_dev *sdev);
754 int snd_sof_debugfs_add_region_item_iomem(struct snd_sof_dev *sdev,
758 int sof_fw_trace_init(struct snd_sof_dev *sdev);
759 void sof_fw_trace_free(struct snd_sof_dev *sdev);
760 void sof_fw_trace_fw_crashed(struct snd_sof_dev *sdev);
761 void sof_fw_trace_suspend(struct snd_sof_dev *sdev, pm_message_t pm_state);
762 int sof_fw_trace_resume(struct snd_sof_dev *sdev);
767 static inline void sof_stack(struct snd_sof_dev *sdev, const char *level, in sof_stack() argument
770 sof_dsp_arch_ops(sdev)->dsp_stack(sdev, level, oops, stack, in sof_stack()
774 static inline void sof_oops(struct snd_sof_dev *sdev, const char *level, void *oops) in sof_oops() argument
776 if (sof_dsp_arch_ops(sdev)->dsp_oops) in sof_oops()
777 sof_dsp_arch_ops(sdev)->dsp_oops(sdev, level, oops); in sof_oops()
785 void sof_set_fw_state(struct snd_sof_dev *sdev, enum sof_fw_state new_state);
790 void sof_io_write(struct snd_sof_dev *sdev, void __iomem *addr, u32 value);
791 void sof_io_write64(struct snd_sof_dev *sdev, void __iomem *addr, u64 value);
792 u32 sof_io_read(struct snd_sof_dev *sdev, void __iomem *addr);
793 u64 sof_io_read64(struct snd_sof_dev *sdev, void __iomem *addr);
794 void sof_mailbox_write(struct snd_sof_dev *sdev, u32 offset,
796 void sof_mailbox_read(struct snd_sof_dev *sdev, u32 offset,
798 int sof_block_write(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type,
800 int sof_block_read(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type,
803 int sof_ipc_msg_data(struct snd_sof_dev *sdev,
806 int sof_set_stream_data_offset(struct snd_sof_dev *sdev,
810 int sof_stream_pcm_open(struct snd_sof_dev *sdev,
812 int sof_stream_pcm_close(struct snd_sof_dev *sdev,
815 int sof_machine_check(struct snd_sof_dev *sdev);
819 int sof_client_dev_register(struct snd_sof_dev *sdev, const char *name, u32 id,
821 void sof_client_dev_unregister(struct snd_sof_dev *sdev, const char *name, u32 id);
822 int sof_register_clients(struct snd_sof_dev *sdev);
823 void sof_unregister_clients(struct snd_sof_dev *sdev);
824 void sof_client_ipc_rx_dispatcher(struct snd_sof_dev *sdev, void *msg_buf);
825 void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev);
826 int sof_suspend_clients(struct snd_sof_dev *sdev, pm_message_t state);
827 int sof_resume_clients(struct snd_sof_dev *sdev);
829 static inline int sof_client_dev_register(struct snd_sof_dev *sdev, const char *name, in sof_client_dev_register() argument
835 static inline void sof_client_dev_unregister(struct snd_sof_dev *sdev, in sof_client_dev_unregister() argument
840 static inline int sof_register_clients(struct snd_sof_dev *sdev) in sof_register_clients() argument
845 static inline void sof_unregister_clients(struct snd_sof_dev *sdev) in sof_unregister_clients() argument
849 static inline void sof_client_ipc_rx_dispatcher(struct snd_sof_dev *sdev, void *msg_buf) in sof_client_ipc_rx_dispatcher() argument
853 static inline void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev) in sof_client_fw_state_dispatcher() argument
857 static inline int sof_suspend_clients(struct snd_sof_dev *sdev, pm_message_t state) in sof_suspend_clients() argument
862 static inline int sof_resume_clients(struct snd_sof_dev *sdev) in sof_resume_clients() argument