Lines Matching defs:snd_sof_dev
117 struct snd_sof_dev;
168 int (*probe_early)(struct snd_sof_dev *sof_dev); /* optional */
169 int (*probe)(struct snd_sof_dev *sof_dev); /* mandatory */
170 void (*remove)(struct snd_sof_dev *sof_dev); /* optional */
171 void (*remove_late)(struct snd_sof_dev *sof_dev); /* optional */
172 int (*shutdown)(struct snd_sof_dev *sof_dev); /* optional */
175 int (*run)(struct snd_sof_dev *sof_dev); /* mandatory */
176 int (*stall)(struct snd_sof_dev *sof_dev, unsigned int core_mask); /* optional */
177 int (*reset)(struct snd_sof_dev *sof_dev); /* optional */
178 int (*core_get)(struct snd_sof_dev *sof_dev, int core); /* optional */
179 int (*core_put)(struct snd_sof_dev *sof_dev, int core); /* optional */
186 void (*write8)(struct snd_sof_dev *sof_dev, void __iomem *addr,
188 u8 (*read8)(struct snd_sof_dev *sof_dev,
190 void (*write)(struct snd_sof_dev *sof_dev, void __iomem *addr,
192 u32 (*read)(struct snd_sof_dev *sof_dev,
194 void (*write64)(struct snd_sof_dev *sof_dev, void __iomem *addr,
196 u64 (*read64)(struct snd_sof_dev *sof_dev,
200 int (*block_read)(struct snd_sof_dev *sof_dev,
203 int (*block_write)(struct snd_sof_dev *sof_dev,
208 void (*mailbox_read)(struct snd_sof_dev *sof_dev,
211 void (*mailbox_write)(struct snd_sof_dev *sof_dev,
220 int (*send_msg)(struct snd_sof_dev *sof_dev,
224 int (*load_firmware)(struct snd_sof_dev *sof_dev); /* mandatory */
225 int (*load_module)(struct snd_sof_dev *sof_dev,
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,
289 int (*pre_fw_run)(struct snd_sof_dev *sof_dev); /* optional */
290 int (*post_fw_run)(struct snd_sof_dev *sof_dev); /* optional */
293 int (*parse_platform_ext_manifest)(struct snd_sof_dev *sof_dev,
297 int (*suspend)(struct snd_sof_dev *sof_dev,
299 int (*resume)(struct snd_sof_dev *sof_dev); /* optional */
300 int (*runtime_suspend)(struct snd_sof_dev *sof_dev); /* optional */
301 int (*runtime_resume)(struct snd_sof_dev *sof_dev); /* optional */
302 int (*runtime_idle)(struct snd_sof_dev *sof_dev); /* optional */
303 int (*set_hw_params_upon_resume)(struct snd_sof_dev *sdev); /* optional */
304 int (*set_power_state)(struct snd_sof_dev *sdev,
308 int (*set_clk)(struct snd_sof_dev *sof_dev, u32 freq); /* optional */
313 void (*dbg_dump)(struct snd_sof_dev *sof_dev,
315 void (*ipc_dump)(struct snd_sof_dev *sof_dev); /* optional */
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,
384 struct snd_sof_dev *sdev;
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);
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;
547 struct snd_sof_dev {
703 int snd_sof_dsp_power_down_notify(struct snd_sof_dev *sdev);
707 void snd_sof_new_platform_drv(struct snd_sof_dev *sdev);
717 int sof_create_ipc_file_profile(struct snd_sof_dev *sdev,
724 int snd_sof_load_firmware_raw(struct snd_sof_dev *sdev);
725 int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev);
726 int snd_sof_run_firmware(struct snd_sof_dev *sdev);
727 void snd_sof_fw_unload(struct snd_sof_dev *sdev);
732 struct snd_sof_ipc *snd_sof_ipc_init(struct snd_sof_dev *sdev);
733 void snd_sof_ipc_free(struct snd_sof_dev *sdev);
734 void snd_sof_ipc_get_reply(struct snd_sof_dev *sdev);
735 void snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id);
736 static inline void snd_sof_ipc_msgs_rx(struct snd_sof_dev *sdev)
756 int sof_ipc_send_msg(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes,
759 static inline void snd_sof_ipc_process_reply(struct snd_sof_dev *sdev, u32 msg_id)
768 int snd_sof_dbg_init(struct snd_sof_dev *sdev);
769 void snd_sof_free_debug(struct snd_sof_dev *sdev);
770 int snd_sof_debugfs_buf_item(struct snd_sof_dev *sdev,
773 void sof_print_oops_and_stack(struct snd_sof_dev *sdev, const char *level,
777 void snd_sof_handle_fw_exception(struct snd_sof_dev *sdev, const char *msg);
778 int snd_sof_dbg_memory_info_init(struct snd_sof_dev *sdev);
779 int snd_sof_debugfs_add_region_item_iomem(struct snd_sof_dev *sdev,
783 int sof_fw_trace_init(struct snd_sof_dev *sdev);
784 void sof_fw_trace_free(struct snd_sof_dev *sdev);
785 void sof_fw_trace_fw_crashed(struct snd_sof_dev *sdev);
786 void sof_fw_trace_suspend(struct snd_sof_dev *sdev, pm_message_t pm_state);
787 int sof_fw_trace_resume(struct snd_sof_dev *sdev);
792 static inline void sof_stack(struct snd_sof_dev *sdev, const char *level,
799 static inline void sof_oops(struct snd_sof_dev *sdev, const char *level, void *oops)
810 void sof_set_fw_state(struct snd_sof_dev *sdev, enum sof_fw_state new_state);
815 void sof_io_write(struct snd_sof_dev *sdev, void __iomem *addr, u32 value);
816 void sof_io_write64(struct snd_sof_dev *sdev, void __iomem *addr, u64 value);
817 u32 sof_io_read(struct snd_sof_dev *sdev, void __iomem *addr);
818 u64 sof_io_read64(struct snd_sof_dev *sdev, void __iomem *addr);
819 void sof_mailbox_write(struct snd_sof_dev *sdev, u32 offset,
821 void sof_mailbox_read(struct snd_sof_dev *sdev, u32 offset,
823 int sof_block_write(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type,
825 int sof_block_read(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_type,
828 int sof_ipc_msg_data(struct snd_sof_dev *sdev,
831 int sof_set_stream_data_offset(struct snd_sof_dev *sdev,
835 int sof_stream_pcm_open(struct snd_sof_dev *sdev,
837 int sof_stream_pcm_close(struct snd_sof_dev *sdev,
842 int sof_client_dev_register(struct snd_sof_dev *sdev, const char *name, u32 id,
844 void sof_client_dev_unregister(struct snd_sof_dev *sdev, const char *name, u32 id);
845 int sof_register_clients(struct snd_sof_dev *sdev);
846 void sof_unregister_clients(struct snd_sof_dev *sdev);
847 void sof_client_ipc_rx_dispatcher(struct snd_sof_dev *sdev, void *msg_buf);
848 void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev);
849 int sof_suspend_clients(struct snd_sof_dev *sdev, pm_message_t state);
850 int sof_resume_clients(struct snd_sof_dev *sdev);
852 static inline int sof_client_dev_register(struct snd_sof_dev *sdev, const char *name,
858 static inline void sof_client_dev_unregister(struct snd_sof_dev *sdev,
863 static inline int sof_register_clients(struct snd_sof_dev *sdev)
868 static inline void sof_unregister_clients(struct snd_sof_dev *sdev)
872 static inline void sof_client_ipc_rx_dispatcher(struct snd_sof_dev *sdev, void *msg_buf)
876 static inline void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev)
880 static inline int sof_suspend_clients(struct snd_sof_dev *sdev, pm_message_t state)
885 static inline int sof_resume_clients(struct snd_sof_dev *sdev)