Lines Matching refs:snd_sof_dev

125 struct snd_sof_dev;
168 int (*probe)(struct snd_sof_dev *sof_dev); /* mandatory */
169 int (*remove)(struct snd_sof_dev *sof_dev); /* optional */
170 int (*shutdown)(struct snd_sof_dev *sof_dev); /* optional */
173 int (*run)(struct snd_sof_dev *sof_dev); /* mandatory */
174 int (*stall)(struct snd_sof_dev *sof_dev, unsigned int core_mask); /* optional */
175 int (*reset)(struct snd_sof_dev *sof_dev); /* optional */
176 int (*core_get)(struct snd_sof_dev *sof_dev, int core); /* optional */
177 int (*core_put)(struct snd_sof_dev *sof_dev, int core); /* optional */
184 void (*write8)(struct snd_sof_dev *sof_dev, void __iomem *addr,
186 u8 (*read8)(struct snd_sof_dev *sof_dev,
188 void (*write)(struct snd_sof_dev *sof_dev, void __iomem *addr,
190 u32 (*read)(struct snd_sof_dev *sof_dev,
192 void (*write64)(struct snd_sof_dev *sof_dev, void __iomem *addr,
194 u64 (*read64)(struct snd_sof_dev *sof_dev,
198 int (*block_read)(struct snd_sof_dev *sof_dev,
201 int (*block_write)(struct snd_sof_dev *sof_dev,
206 void (*mailbox_read)(struct snd_sof_dev *sof_dev,
209 void (*mailbox_write)(struct snd_sof_dev *sof_dev,
218 int (*send_msg)(struct snd_sof_dev *sof_dev,
222 int (*load_firmware)(struct snd_sof_dev *sof_dev); /* mandatory */
223 int (*load_module)(struct snd_sof_dev *sof_dev,
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,
275 int (*pre_fw_run)(struct snd_sof_dev *sof_dev); /* optional */
276 int (*post_fw_run)(struct snd_sof_dev *sof_dev); /* optional */
279 int (*parse_platform_ext_manifest)(struct snd_sof_dev *sof_dev,
283 int (*suspend)(struct snd_sof_dev *sof_dev,
285 int (*resume)(struct snd_sof_dev *sof_dev); /* optional */
286 int (*runtime_suspend)(struct snd_sof_dev *sof_dev); /* optional */
287 int (*runtime_resume)(struct snd_sof_dev *sof_dev); /* optional */
288 int (*runtime_idle)(struct snd_sof_dev *sof_dev); /* optional */
289 int (*set_hw_params_upon_resume)(struct snd_sof_dev *sdev); /* optional */
290 int (*set_power_state)(struct snd_sof_dev *sdev,
294 int (*set_clk)(struct snd_sof_dev *sof_dev, u32 freq); /* optional */
299 void (*dbg_dump)(struct snd_sof_dev *sof_dev,
301 void (*ipc_dump)(struct snd_sof_dev *sof_dev); /* optional */
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,
368 struct snd_sof_dev *sdev;
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;
530 struct snd_sof_dev {
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)
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)
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,
774 static inline void sof_oops(struct snd_sof_dev *sdev, const char *level, void *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,
835 static inline void sof_client_dev_unregister(struct snd_sof_dev *sdev,
840 static inline int sof_register_clients(struct snd_sof_dev *sdev)
845 static inline void sof_unregister_clients(struct snd_sof_dev *sdev)
849 static inline void sof_client_ipc_rx_dispatcher(struct snd_sof_dev *sdev, void *msg_buf)
853 static inline void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev)
857 static inline int sof_suspend_clients(struct snd_sof_dev *sdev, pm_message_t state)
862 static inline int sof_resume_clients(struct snd_sof_dev *sdev)