Lines Matching refs:snd_sof_dev
121 struct snd_sof_dev;
164 int (*probe)(struct snd_sof_dev *sof_dev); /* mandatory */
165 int (*remove)(struct snd_sof_dev *sof_dev); /* optional */
166 int (*shutdown)(struct snd_sof_dev *sof_dev); /* optional */
169 int (*run)(struct snd_sof_dev *sof_dev); /* mandatory */
170 int (*stall)(struct snd_sof_dev *sof_dev, unsigned int core_mask); /* optional */
171 int (*reset)(struct snd_sof_dev *sof_dev); /* optional */
172 int (*core_get)(struct snd_sof_dev *sof_dev, int core); /* optional */
173 int (*core_put)(struct snd_sof_dev *sof_dev, int core); /* optional */
180 void (*write8)(struct snd_sof_dev *sof_dev, void __iomem *addr,
182 u8 (*read8)(struct snd_sof_dev *sof_dev,
184 void (*write)(struct snd_sof_dev *sof_dev, void __iomem *addr,
186 u32 (*read)(struct snd_sof_dev *sof_dev,
188 void (*write64)(struct snd_sof_dev *sof_dev, void __iomem *addr,
190 u64 (*read64)(struct snd_sof_dev *sof_dev,
194 int (*block_read)(struct snd_sof_dev *sof_dev,
197 int (*block_write)(struct snd_sof_dev *sof_dev,
202 void (*mailbox_read)(struct snd_sof_dev *sof_dev,
205 void (*mailbox_write)(struct snd_sof_dev *sof_dev,
214 int (*send_msg)(struct snd_sof_dev *sof_dev,
218 int (*load_firmware)(struct snd_sof_dev *sof_dev); /* mandatory */
219 int (*load_module)(struct snd_sof_dev *sof_dev,
223 int (*pcm_open)(struct snd_sof_dev *sdev,
226 int (*pcm_close)(struct snd_sof_dev *sdev,
230 int (*pcm_hw_params)(struct snd_sof_dev *sdev,
236 int (*pcm_hw_free)(struct snd_sof_dev *sdev,
240 int (*pcm_trigger)(struct snd_sof_dev *sdev,
245 snd_pcm_uframes_t (*pcm_pointer)(struct snd_sof_dev *sdev,
249 int (*pcm_ack)(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream); /* optional */
256 u64 (*get_stream_position)(struct snd_sof_dev *sdev,
261 int (*ipc_msg_data)(struct snd_sof_dev *sdev,
266 int (*set_stream_data_offset)(struct snd_sof_dev *sdev,
271 int (*pre_fw_run)(struct snd_sof_dev *sof_dev); /* optional */
272 int (*post_fw_run)(struct snd_sof_dev *sof_dev); /* optional */
275 int (*parse_platform_ext_manifest)(struct snd_sof_dev *sof_dev,
279 int (*suspend)(struct snd_sof_dev *sof_dev,
281 int (*resume)(struct snd_sof_dev *sof_dev); /* optional */
282 int (*runtime_suspend)(struct snd_sof_dev *sof_dev); /* optional */
283 int (*runtime_resume)(struct snd_sof_dev *sof_dev); /* optional */
284 int (*runtime_idle)(struct snd_sof_dev *sof_dev); /* optional */
285 int (*set_hw_params_upon_resume)(struct snd_sof_dev *sdev); /* optional */
286 int (*set_power_state)(struct snd_sof_dev *sdev,
290 int (*set_clk)(struct snd_sof_dev *sof_dev, u32 freq); /* optional */
295 void (*dbg_dump)(struct snd_sof_dev *sof_dev,
297 void (*ipc_dump)(struct snd_sof_dev *sof_dev); /* optional */
298 int (*debugfs_add_region_item)(struct snd_sof_dev *sdev,
304 int (*trace_init)(struct snd_sof_dev *sdev,
307 int (*trace_release)(struct snd_sof_dev *sdev); /* optional */
308 int (*trace_trigger)(struct snd_sof_dev *sdev,
312 int (*get_bar_index)(struct snd_sof_dev *sdev,
314 int (*get_mailbox_offset)(struct snd_sof_dev *sdev);/* mandatory for common loader code */
315 int (*get_window_offset)(struct snd_sof_dev *sdev,
319 int (*machine_register)(struct snd_sof_dev *sdev,
321 void (*machine_unregister)(struct snd_sof_dev *sdev,
323 struct snd_soc_acpi_mach * (*machine_select)(struct snd_sof_dev *sdev); /* optional */
325 struct snd_sof_dev *sdev); /* optional */
328 int (*register_ipc_clients)(struct snd_sof_dev *sdev); /* optional */
329 void (*unregister_ipc_clients)(struct snd_sof_dev *sdev); /* optional */
343 void (*dsp_oops)(struct snd_sof_dev *sdev, const char *level, void *oops);
344 void (*dsp_stack)(struct snd_sof_dev *sdev, const char *level, void *oops,
364 struct snd_sof_dev *sdev;
416 int (*init)(struct snd_sof_dev *sdev);
417 void (*free)(struct snd_sof_dev *sdev);
418 void (*fw_crashed)(struct snd_sof_dev *sdev);
419 void (*suspend)(struct snd_sof_dev *sdev, pm_message_t pm_state);
420 int (*resume)(struct snd_sof_dev *sdev);
431 int (*ctx_save)(struct snd_sof_dev *sdev);
432 int (*ctx_restore)(struct snd_sof_dev *sdev);
433 int (*set_core_state)(struct snd_sof_dev *sdev, int core_idx, bool on);
434 int (*set_pm_gate)(struct snd_sof_dev *sdev, u32 flags);
447 int (*validate)(struct snd_sof_dev *sdev);
448 size_t (*parse_ext_manifest)(struct snd_sof_dev *sdev);
449 int (*load_fw_to_dsp)(struct snd_sof_dev *sdev);
489 int (*init)(struct snd_sof_dev *sdev);
490 void (*exit)(struct snd_sof_dev *sdev);
491 int (*post_fw_boot)(struct snd_sof_dev *sdev);
493 int (*tx_msg)(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes,
495 int (*set_get_data)(struct snd_sof_dev *sdev, void *data, size_t data_bytes,
497 int (*get_reply)(struct snd_sof_dev *sdev);
498 void (*rx_msg)(struct snd_sof_dev *sdev);
503 struct snd_sof_dev *sdev;
526 struct snd_sof_dev { struct
671 int snd_sof_dsp_power_down_notify(struct snd_sof_dev *sdev); argument
675 void snd_sof_new_platform_drv(struct snd_sof_dev *sdev);
685 int snd_sof_load_firmware_raw(struct snd_sof_dev *sdev);
686 int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev);
687 int snd_sof_run_firmware(struct snd_sof_dev *sdev);
688 void snd_sof_fw_unload(struct snd_sof_dev *sdev);
693 struct snd_sof_ipc *snd_sof_ipc_init(struct snd_sof_dev *sdev);
694 void snd_sof_ipc_free(struct snd_sof_dev *sdev);
695 void snd_sof_ipc_get_reply(struct snd_sof_dev *sdev);
696 void snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id);
697 static inline void snd_sof_ipc_msgs_rx(struct snd_sof_dev *sdev) in snd_sof_ipc_msgs_rx()
707 int sof_ipc_send_msg(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes,
710 static inline void snd_sof_ipc_process_reply(struct snd_sof_dev *sdev, u32 msg_id) in snd_sof_ipc_process_reply()
719 int snd_sof_dbg_init(struct snd_sof_dev *sdev);
720 void snd_sof_free_debug(struct snd_sof_dev *sdev);
721 int snd_sof_debugfs_buf_item(struct snd_sof_dev *sdev,
724 void sof_print_oops_and_stack(struct snd_sof_dev *sdev, const char *level,
728 void snd_sof_handle_fw_exception(struct snd_sof_dev *sdev, const char *msg);
729 int snd_sof_dbg_memory_info_init(struct snd_sof_dev *sdev);
730 int snd_sof_debugfs_add_region_item_iomem(struct snd_sof_dev *sdev,
734 int sof_fw_trace_init(struct snd_sof_dev *sdev);
735 void sof_fw_trace_free(struct snd_sof_dev *sdev);
736 void sof_fw_trace_fw_crashed(struct snd_sof_dev *sdev);
737 void sof_fw_trace_suspend(struct snd_sof_dev *sdev, pm_message_t pm_state);
738 int sof_fw_trace_resume(struct snd_sof_dev *sdev);
743 static inline void sof_stack(struct snd_sof_dev *sdev, const char *level, in sof_stack()
750 static inline void sof_oops(struct snd_sof_dev *sdev, const char *level, void *oops) in sof_oops()
761 void sof_set_fw_state(struct snd_sof_dev *sdev, enum sof_fw_state new_state);
766 void sof_io_write(struct snd_sof_dev *sdev, void __iomem *addr, u32 value);
767 void sof_io_write64(struct snd_sof_dev *sdev, void __iomem *addr, u64 value);
768 u32 sof_io_read(struct snd_sof_dev *sdev, void __iomem *addr);
769 u64 sof_io_read64(struct snd_sof_dev *sdev, void __iomem *addr);
770 void sof_mailbox_write(struct snd_sof_dev *sdev, u32 offset,
772 void sof_mailbox_read(struct snd_sof_dev *sdev, u32 offset,
774 int sof_block_write(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type,
776 int sof_block_read(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type,
779 int sof_ipc_msg_data(struct snd_sof_dev *sdev,
782 int sof_set_stream_data_offset(struct snd_sof_dev *sdev,
786 int sof_stream_pcm_open(struct snd_sof_dev *sdev,
788 int sof_stream_pcm_close(struct snd_sof_dev *sdev,
791 int sof_machine_check(struct snd_sof_dev *sdev);
795 int sof_client_dev_register(struct snd_sof_dev *sdev, const char *name, u32 id,
797 void sof_client_dev_unregister(struct snd_sof_dev *sdev, const char *name, u32 id);
798 int sof_register_clients(struct snd_sof_dev *sdev);
799 void sof_unregister_clients(struct snd_sof_dev *sdev);
800 void sof_client_ipc_rx_dispatcher(struct snd_sof_dev *sdev, void *msg_buf);
801 void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev);
802 int sof_suspend_clients(struct snd_sof_dev *sdev, pm_message_t state);
803 int sof_resume_clients(struct snd_sof_dev *sdev);
805 static inline int sof_client_dev_register(struct snd_sof_dev *sdev, const char *name, in sof_client_dev_register()
811 static inline void sof_client_dev_unregister(struct snd_sof_dev *sdev, in sof_client_dev_unregister()
816 static inline int sof_register_clients(struct snd_sof_dev *sdev) in sof_register_clients()
821 static inline void sof_unregister_clients(struct snd_sof_dev *sdev) in sof_unregister_clients()
825 static inline void sof_client_ipc_rx_dispatcher(struct snd_sof_dev *sdev, void *msg_buf) in sof_client_ipc_rx_dispatcher()
829 static inline void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev) in sof_client_fw_state_dispatcher()
833 static inline int sof_suspend_clients(struct snd_sof_dev *sdev, pm_message_t state) in sof_suspend_clients()
838 static inline int sof_resume_clients(struct snd_sof_dev *sdev) in sof_resume_clients()