ipc4-priv.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
  2. /*
  3. * This file is provided under a dual BSD/GPLv2 license. When using or
  4. * redistributing this file, you may do so under either license.
  5. *
  6. * Copyright(c) 2022 Intel Corporation. All rights reserved.
  7. */
  8. #ifndef __SOUND_SOC_SOF_IPC4_PRIV_H
  9. #define __SOUND_SOC_SOF_IPC4_PRIV_H
  10. #include <linux/idr.h>
  11. #include <sound/sof/ext_manifest4.h>
  12. #include "sof-priv.h"
  13. /* The DSP window indices are fixed */
  14. #define SOF_IPC4_OUTBOX_WINDOW_IDX 1
  15. #define SOF_IPC4_DEBUG_WINDOW_IDX 2
  16. enum sof_ipc4_mtrace_type {
  17. SOF_IPC4_MTRACE_NOT_AVAILABLE = 0,
  18. SOF_IPC4_MTRACE_INTEL_CAVS_1_5,
  19. SOF_IPC4_MTRACE_INTEL_CAVS_1_8,
  20. SOF_IPC4_MTRACE_INTEL_CAVS_2,
  21. };
  22. /**
  23. * struct sof_ipc4_fw_data - IPC4-specific data
  24. * @manifest_fw_hdr_offset: FW header offset in the manifest
  25. * @num_fw_modules : Number of modules in base FW
  26. * @fw_modules: Array of base FW modules
  27. * @nhlt: NHLT table either from the BIOS or the topology manifest
  28. * @mtrace_type: mtrace type supported on the booted platform
  29. * @mtrace_log_bytes: log bytes as reported by the firmware via fw_config reply
  30. */
  31. struct sof_ipc4_fw_data {
  32. u32 manifest_fw_hdr_offset;
  33. int num_fw_modules;
  34. void *fw_modules;
  35. void *nhlt;
  36. enum sof_ipc4_mtrace_type mtrace_type;
  37. u32 mtrace_log_bytes;
  38. };
  39. /**
  40. * struct sof_ipc4_fw_module - IPC4 module info
  41. * @sof_man4_module : Module info
  42. * @m_ida: Module instance identifier
  43. * @bss_size: Module object size
  44. * @private: Module private data
  45. */
  46. struct sof_ipc4_fw_module {
  47. struct sof_man4_module man4_module_entry;
  48. struct ida m_ida;
  49. u32 bss_size;
  50. void *private;
  51. };
  52. extern const struct sof_ipc_fw_loader_ops ipc4_loader_ops;
  53. extern const struct sof_ipc_tplg_ops ipc4_tplg_ops;
  54. extern const struct sof_ipc_tplg_control_ops tplg_ipc4_control_ops;
  55. extern const struct sof_ipc_pcm_ops ipc4_pcm_ops;
  56. extern const struct sof_ipc_fw_tracing_ops ipc4_mtrace_ops;
  57. int sof_ipc4_set_pipeline_state(struct snd_sof_dev *sdev, u32 id, u32 state);
  58. int sof_ipc4_mtrace_update_pos(struct snd_sof_dev *sdev, int core);
  59. #endif