Lines Matching refs:sdev

229 	int (*pcm_open)(struct snd_sof_dev *sdev,
232 int (*pcm_close)(struct snd_sof_dev *sdev,
236 int (*pcm_hw_params)(struct snd_sof_dev *sdev,
242 int (*pcm_hw_free)(struct snd_sof_dev *sdev,
246 int (*pcm_trigger)(struct snd_sof_dev *sdev,
251 snd_pcm_uframes_t (*pcm_pointer)(struct snd_sof_dev *sdev,
255 int (*pcm_ack)(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream); /* optional */
264 u64 (*get_dai_frame_counter)(struct snd_sof_dev *sdev,
274 u64 (*get_host_byte_counter)(struct snd_sof_dev *sdev,
279 int (*ipc_msg_data)(struct snd_sof_dev *sdev,
284 int (*set_stream_data_offset)(struct snd_sof_dev *sdev,
303 int (*set_hw_params_upon_resume)(struct snd_sof_dev *sdev); /* optional */
304 int (*set_power_state)(struct snd_sof_dev *sdev,
316 int (*debugfs_add_region_item)(struct snd_sof_dev *sdev,
322 int (*trace_init)(struct snd_sof_dev *sdev,
325 int (*trace_release)(struct snd_sof_dev *sdev); /* optional */
326 int (*trace_trigger)(struct snd_sof_dev *sdev,
330 int (*get_bar_index)(struct snd_sof_dev *sdev,
332 int (*get_mailbox_offset)(struct snd_sof_dev *sdev);/* mandatory for common loader code */
333 int (*get_window_offset)(struct snd_sof_dev *sdev,
337 int (*machine_register)(struct snd_sof_dev *sdev,
339 void (*machine_unregister)(struct snd_sof_dev *sdev,
341 struct snd_soc_acpi_mach * (*machine_select)(struct snd_sof_dev *sdev); /* optional */
343 struct snd_sof_dev *sdev); /* optional */
346 int (*register_ipc_clients)(struct snd_sof_dev *sdev); /* optional */
347 void (*unregister_ipc_clients)(struct snd_sof_dev *sdev); /* optional */
353 bool (*is_chain_dma_supported)(struct snd_sof_dev *sdev, u32 dai_type); /* optional */
363 void (*dsp_oops)(struct snd_sof_dev *sdev, const char *level, void *oops);
364 void (*dsp_stack)(struct snd_sof_dev *sdev, const char *level, void *oops,
368 #define sof_dsp_arch_ops(sdev) ((sdev)->pdata->desc->ops->dsp_arch_ops)
384 struct snd_sof_dev *sdev;
385 struct list_head list; /* list in sdev dfsentry list */
437 int (*init)(struct snd_sof_dev *sdev);
438 void (*free)(struct snd_sof_dev *sdev);
439 void (*fw_crashed)(struct snd_sof_dev *sdev);
440 void (*suspend)(struct snd_sof_dev *sdev, pm_message_t pm_state);
441 int (*resume)(struct snd_sof_dev *sdev);
452 int (*ctx_save)(struct snd_sof_dev *sdev);
453 int (*ctx_restore)(struct snd_sof_dev *sdev);
454 int (*set_core_state)(struct snd_sof_dev *sdev, int core_idx, bool on);
455 int (*set_pm_gate)(struct snd_sof_dev *sdev, u32 flags);
468 int (*validate)(struct snd_sof_dev *sdev);
469 size_t (*parse_ext_manifest)(struct snd_sof_dev *sdev);
470 int (*load_fw_to_dsp)(struct snd_sof_dev *sdev);
495 * sdev->ipc->msg.reply_data
510 int (*init)(struct snd_sof_dev *sdev);
511 void (*exit)(struct snd_sof_dev *sdev);
512 int (*post_fw_boot)(struct snd_sof_dev *sdev);
514 int (*tx_msg)(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes,
516 int (*set_get_data)(struct snd_sof_dev *sdev, void *data, size_t data_bytes,
518 int (*get_reply)(struct snd_sof_dev *sdev);
519 void (*rx_msg)(struct snd_sof_dev *sdev);
524 struct snd_sof_dev *sdev;
541 #define sof_ipc_get_ops(sdev, ops_name) \
542 (((sdev)->ipc && (sdev)->ipc->ops) ? (sdev)->ipc->ops->ops_name : NULL)
705 int snd_sof_dsp_power_down_notify(struct snd_sof_dev *sdev);
708 int snd_sof_boot_dsp_firmware(struct snd_sof_dev *sdev);
710 void snd_sof_new_platform_drv(struct snd_sof_dev *sdev);
720 int sof_create_ipc_file_profile(struct snd_sof_dev *sdev,
727 int snd_sof_load_firmware_raw(struct snd_sof_dev *sdev);
728 int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev);
729 int snd_sof_run_firmware(struct snd_sof_dev *sdev);
730 void snd_sof_fw_unload(struct snd_sof_dev *sdev);
735 struct snd_sof_ipc *snd_sof_ipc_init(struct snd_sof_dev *sdev);
736 void snd_sof_ipc_free(struct snd_sof_dev *sdev);
737 void snd_sof_ipc_get_reply(struct snd_sof_dev *sdev);
738 void snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id);
739 static inline void snd_sof_ipc_msgs_rx(struct snd_sof_dev *sdev)
741 sdev->ipc->ops->rx_msg(sdev);
759 int sof_ipc_send_msg(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes,
762 static inline void snd_sof_ipc_process_reply(struct snd_sof_dev *sdev, u32 msg_id)
764 snd_sof_ipc_get_reply(sdev);
765 snd_sof_ipc_reply(sdev, msg_id);
771 int snd_sof_dbg_init(struct snd_sof_dev *sdev);
772 void snd_sof_free_debug(struct snd_sof_dev *sdev);
773 int snd_sof_debugfs_buf_item(struct snd_sof_dev *sdev,
776 void sof_print_oops_and_stack(struct snd_sof_dev *sdev, const char *level,
780 void snd_sof_handle_fw_exception(struct snd_sof_dev *sdev, const char *msg);
781 int snd_sof_dbg_memory_info_init(struct snd_sof_dev *sdev);
782 int snd_sof_debugfs_add_region_item_iomem(struct snd_sof_dev *sdev,
786 int sof_fw_trace_init(struct snd_sof_dev *sdev);
787 void sof_fw_trace_free(struct snd_sof_dev *sdev);
788 void sof_fw_trace_fw_crashed(struct snd_sof_dev *sdev);
789 void sof_fw_trace_suspend(struct snd_sof_dev *sdev, pm_message_t pm_state);
790 int sof_fw_trace_resume(struct snd_sof_dev *sdev);
795 static inline void sof_stack(struct snd_sof_dev *sdev, const char *level,
798 sof_dsp_arch_ops(sdev)->dsp_stack(sdev, level, oops, stack,
802 static inline void sof_oops(struct snd_sof_dev *sdev, const char *level, void *oops)
804 if (sof_dsp_arch_ops(sdev)->dsp_oops)
805 sof_dsp_arch_ops(sdev)->dsp_oops(sdev, level, oops);
813 void sof_set_fw_state(struct snd_sof_dev *sdev, enum sof_fw_state new_state);
818 void sof_io_write(struct snd_sof_dev *sdev, void __iomem *addr, u32 value);
819 void sof_io_write64(struct snd_sof_dev *sdev, void __iomem *addr, u64 value);
820 u32 sof_io_read(struct snd_sof_dev *sdev, void __iomem *addr);
821 u64 sof_io_read64(struct snd_sof_dev *sdev, void __iomem *addr);
822 void sof_mailbox_write(struct snd_sof_dev *sdev, u32 offset,
824 void sof_mailbox_read(struct snd_sof_dev *sdev, u32 offset,
826 int sof_block_write(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type,
828 int sof_block_read(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type,
831 int sof_ipc_msg_data(struct snd_sof_dev *sdev,
834 int sof_set_stream_data_offset(struct snd_sof_dev *sdev,
838 int sof_stream_pcm_open(struct snd_sof_dev *sdev,
840 int sof_stream_pcm_close(struct snd_sof_dev *sdev,
849 int sof_client_dev_register(struct snd_sof_dev *sdev, const char *name, u32 id,
851 void sof_client_dev_unregister(struct snd_sof_dev *sdev, const char *name, u32 id);
852 int sof_register_clients(struct snd_sof_dev *sdev);
853 void sof_unregister_clients(struct snd_sof_dev *sdev);
854 void sof_client_ipc_rx_dispatcher(struct snd_sof_dev *sdev, void *msg_buf);
855 void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev);
856 int sof_suspend_clients(struct snd_sof_dev *sdev, pm_message_t state);
857 int sof_resume_clients(struct snd_sof_dev *sdev);
864 static inline int sof_client_dev_register(struct snd_sof_dev *sdev, const char *name,
870 static inline void sof_client_dev_unregister(struct snd_sof_dev *sdev,
875 static inline int sof_register_clients(struct snd_sof_dev *sdev)
880 static inline void sof_unregister_clients(struct snd_sof_dev *sdev)
884 static inline void sof_client_ipc_rx_dispatcher(struct snd_sof_dev *sdev, void *msg_buf)
888 static inline void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev)
892 static inline int sof_suspend_clients(struct snd_sof_dev *sdev, pm_message_t state)
897 static inline int sof_resume_clients(struct snd_sof_dev *sdev)