Sound Open Firmware
Loading...
Searching...
No Matches
probe.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2022 Intel Corporation. All rights reserved.
4 */
5
6/*
7 * This file contains structures that are exact copies of an existing ABI used
8 * by IOT middleware. They are Intel specific and will be used by one middleware.
9 *
10 * Some of the structures may contain programming implementations that makes them
11 * unsuitable for generic use and general usage.
12 *
13 * This code is mostly copied "as-is" from existing C++ interface files hence the use of
14 * different style in places. The intention is to keep the interface as close as possible to
15 * original so it's easier to track changes with IPC host code.
16 */
17
25#ifndef __SOF_IPC4_PROBE_H__
26#define __SOF_IPC4_PROBE_H__
27
29#include "base-config.h"
30#include <rtos/bit.h>
31#include <stdint.h>
32
36#define PROBE_LOGGING_BUFFER_ID 0x01000000
37
39#define PROBE_PURPOSE_EXTRACTION 0
41#define PROBE_PURPOSE_INJECTION 1
42
44#define PROBE_TYPE_INPUT 0
46#define PROBE_TYPE_OUTPUT 1
48#define PROBE_TYPE_INTERNAL 2
49
51#define IPC4_PROBE_MODULE_INJECTION_DMA_ADD 1
53#define IPC4_PROBE_MODULE_INJECTION_DMA_DETACH 2
55#define IPC4_PROBE_MODULE_PROBE_POINTS_ADD 3
57#define IPC4_PROBE_MODULE_DISCONNECT_PROBE_POINTS 4
59#define IPC4_PROBE_MODULE_AVAILABLE_PROBE_POINTS 5
60
65struct probe_dma {
66 uint32_t stream_tag;
67 uint32_t dma_buffer_size;
68} __attribute__((packed, aligned(4)));
69
74typedef union probe_point_id {
75 uint32_t full_id;
76 struct {
77 uint32_t module_id : 16;
78 uint32_t instance_id : 8;
79 uint32_t type : 2;
80 uint32_t index : 6;
81 } fields;
82} __attribute__((packed, aligned(4))) probe_point_id_t;
83
88struct probe_point {
89 probe_point_id_t buffer_id;
90 uint32_t purpose;
91 uint32_t stream_tag;
92} __attribute__((packed, aligned(4)));
93
99 uint32_t num_elems;
100 union {
101 struct probe_dma probe_dma[0];
102 struct probe_point probe_point[0];
103 };
104} __attribute__((packed, aligned(4)));
105
113} __packed __aligned(4);
114
115#endif /* __SOF_IPC4_PROBE_H__ */
IPC4 audio formats, sampling frequencies, bit depths, and pin descriptors.
Base module configuration parameters provided upon module instantiation.
Definition base-config.h:160
Probe module configuration structure.
Definition probe.h:110
struct probe_dma gtw_cfg
Associated probe gateway DMA configuration.
Definition probe.h:112
struct ipc4_base_module_cfg base_cfg
Base module configuration parameters.
Definition probe.h:111
Host DMA channel descriptor allocated for audio probes.
Definition probe.h:39
uint32_t stream_tag
Stream tag associated with this DMA channel.
Definition probe.h:40
uint32_t dma_buffer_size
Size of host DMA buffer in bytes.
Definition probe.h:41
Packed identifier identifying target audio buffer for probe attachment.
Definition probe.h:48
uint32_t module_id
Target module ID.
Definition probe.h:77
uint32_t instance_id
Target module instance ID.
Definition probe.h:78
uint32_t index
Pin / queue index inside target module.
Definition probe.h:80
uint32_t type
Probe point type (PROBE_TYPE_xxx).
Definition probe.h:79
Probe tap point descriptor binding a pipeline buffer to a probe purpose.
Definition probe.h:56
Reply to INFO queries (SOF_IPC_PROBE_DMA_INFO, SOF_IPC_PROBE_POINT_INFO).
Definition probe.h:76
uint32_t num_elems
Count of elements in array.
Definition probe.h:78