/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ /* * This file is provided under a dual BSD/GPLv2 license. When using or * redistributing this file, you may do so under either license. * * Copyright(c) 2022 Intel Corporation
*/
/** * struct sof_ipc4_msg - Placeholder of an IPC4 message * @header_u64: IPC4 header as single u64 number * @primary: Primary, mandatory part of the header * @extension: Extended part of the header, if not used it should be * set to 0 * @data_size: Size of data in bytes pointed by @data_ptr * @data_ptr: Pointer to the optional payload of a message
*/ struct sof_ipc4_msg { union {
u64 header_u64; struct {
u32 primary;
u32 extension;
};
};
size_t data_size; void *data_ptr;
};
/** * struct sof_ipc4_tuple - Generic type/ID and parameter tuple * @type: type/ID * @size: size of the @value array in bytes * @value: value for the given type
*/ struct sof_ipc4_tuple {
uint32_t type;
uint32_t size;
uint32_t value[];
} __packed;
/* * IPC4 messages have two 32 bit identifier made up as follows :- * * header - msg type, msg id, msg direction ... * extension - extra params such as msg data size in mailbox * * These are sent at the start of the IPC message in the mailbox. Messages * should not be sent in the doorbell (special exceptions for firmware).
*/
/* * IPC4 primary header bit allocation for messages * bit 0-23: message type specific * bit 24-28: type: enum sof_ipc4_global_msg if target is SOF_IPC4_FW_GEN_MSG * enum sof_ipc4_module_type if target is SOF_IPC4_MODULE_MSG * bit 29: response - sof_ipc4_msg_dir * bit 30: target - enum sof_ipc4_msg_target * bit 31: reserved, unused
*/
/* Value of target field - must fit into 1 bit */ enum sof_ipc4_msg_target { /* Global FW message */
SOF_IPC4_FW_GEN_MSG,
/* Module message */
SOF_IPC4_MODULE_MSG
};
/* Value of type field - must fit into 5 bits */ enum sof_ipc4_global_msg {
SOF_IPC4_GLB_BOOT_CONFIG,
SOF_IPC4_GLB_ROM_CONTROL,
SOF_IPC4_GLB_IPCGATEWAY_CMD,
/* * library loading * * Loads library (using Code Load or HD/A Host Output DMA)
*/
SOF_IPC4_GLB_LOAD_LIBRARY, /* * Prepare the host DMA channel for library loading, must be followed by * a SOF_IPC4_GLB_LOAD_LIBRARY message as the library loading step
*/
SOF_IPC4_GLB_LOAD_LIBRARY_PREPARE,
SOF_IPC4_GLB_INTERNAL_MESSAGE,
/* Notification (FW to SW driver) */
SOF_IPC4_GLB_NOTIFICATION,
/* 28 .. 31: RESERVED - do not use */
SOF_IPC4_GLB_TYPE_LAST,
};
/* Value of response field - must fit into 1 bit */ enum sof_ipc4_msg_dir {
SOF_IPC4_MSG_REQUEST,
SOF_IPC4_MSG_REPLY,
};
enum sof_ipc4_sample_type {
SOF_IPC4_MSB_INTEGER, /* integer with Most Significant Byte first */
SOF_IPC4_LSB_INTEGER, /* integer with Least Significant Byte first */
};
/* Payload data for SOF_IPC4_MOD_SET_DX */ struct sof_ipc4_dx_state_info { /* core(s) to apply the change */
uint32_t core_mask; /* core state: 0: put core_id to D3; 1: put core_id to D0 */
uint32_t dx_mask;
} __packed __aligned(4);
/* * IPC4 primary header bit allocation for replies * bit 0-23: status * bit 24-28: type: enum sof_ipc4_global_msg if target is SOF_IPC4_FW_GEN_MSG * enum sof_ipc4_module_type if target is SOF_IPC4_MODULE_MSG * bit 29: response - sof_ipc4_msg_dir * bit 30: target - enum sof_ipc4_msg_target * bit 31: reserved, unused
*/
#define SOF_IPC4_REPLY_STATUS GENMASK(23, 0)
/* Notification messages */
/* * IPC4 primary header bit allocation for notifications * bit 0-15: notification type specific * bit 16-23: enum sof_ipc4_notification_type * bit 24-28: SOF_IPC4_GLB_NOTIFICATION * bit 29: response - sof_ipc4_msg_dir * bit 30: target - enum sof_ipc4_msg_target * bit 31: reserved, unused
*/
/* Value of notification type field - must fit into 8 bits */ enum sof_ipc4_notification_type { /* Phrase detected (notification from WoV module) */
SOF_IPC4_NOTIFY_PHRASE_DETECTED = 4, /* Event from a resource (pipeline or module instance) */
SOF_IPC4_NOTIFY_RESOURCE_EVENT, /* Debug log buffer status changed */
SOF_IPC4_NOTIFY_LOG_BUFFER_STATUS, /* Timestamp captured at the link */
SOF_IPC4_NOTIFY_TIMESTAMP_CAPTURED, /* FW complete initialization */
SOF_IPC4_NOTIFY_FW_READY, /* Audio classifier result (ACA) */
SOF_IPC4_NOTIFY_FW_AUD_CLASS_RESULT, /* Exception caught by DSP FW */
SOF_IPC4_NOTIFY_EXCEPTION_CAUGHT, /* 11 is skipped by the existing cavs firmware */ /* Custom module notification */
SOF_IPC4_NOTIFY_MODULE_NOTIFICATION = 12, /* 13 is reserved - do not use */ /* Probe notify data available */
SOF_IPC4_NOTIFY_PROBE_DATA_AVAILABLE = 14, /* AM module notifications */
SOF_IPC4_NOTIFY_ASYNC_MSG_SRVC_MESSAGE,
#define SOF_IPC4_DEBUG_DESCRIPTOR_SIZE 12 /* 3 x u32 */
/* * The debug memory window is divided into 16 slots, and the * first slot is used as a recorder for the other 15 slots.
*/ #define SOF_IPC4_MAX_DEBUG_SLOTS 15 #define SOF_IPC4_DEBUG_SLOT_SIZE 0x1000
/** * struct sof_ipc4_notify_module_data - payload for module notification * @instance_id: instance ID of the originator module of the notification * @module_id: module ID of the originator of the notification * @event_id: module specific event id * @event_data_size: Size of the @event_data (if any) in bytes * @event_data: Optional notification data, module and notification dependent
*/ struct sof_ipc4_notify_module_data {
uint16_t instance_id;
uint16_t module_id;
uint32_t event_id;
uint32_t event_data_size;
uint8_t event_data[];
} __packed __aligned(4);
/* * ALSA kcontrol change notification * * The event_id of struct sof_ipc4_notify_module_data is divided into two u16: * upper u16: magic number for ALSA kcontrol types: 0xA15A * lower u16: param_id of the control, which is the type of the control * The event_data contains the struct sof_ipc4_control_msg_payload of the control * which sent the notification.
*/ #define SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_MASK GENMASK(31, 16) #define SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_VAL 0xA15A0000 #define SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_PARAMID_MASK GENMASK(15, 0)
/** @}*/
#endif
Messung V0.5
¤ Dauer der Verarbeitung: 0.2 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.