@@ -124,7 +124,7 @@ the last stage of extraction.
124
124
- Add probe points via the ``debugfs `` "probe_points" entry in ``/sys/kernel/debug/sof ``
125
125
126
126
127
- For example, to add buffer 7 with a probe point:
127
+ For example, to add buffer 7 with a probe point (IPC3) :
128
128
129
129
.. code-block :: bash
130
130
@@ -161,6 +161,52 @@ the last stage of extraction.
161
161
strnlen(tw->sname, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) > 0
162
162
? tw->sname : "none");
163
163
164
+ For IPC4 system, the above example looks like this:
165
+
166
+ .. code-block :: bash
167
+
168
+ echo 2,0,0 > probe_points
169
+
170
+ The semantics of the buffer_id are quite different on IPC4 system:
171
+
172
+ .. code-block :: c
173
+
174
+ typedef union probe_point_id {
175
+ uint32_t full_id;
176
+ struct {
177
+ uint32_t module_id : 16; /**< Target module ID */
178
+ uint32_t instance_id : 8; /**< Target module instance ID */
179
+ uint32_t type : 2; /**< Probe point type as specified by ProbeType enumeration */
180
+ uint32_t index : 6; /**< Queue index inside target module */
181
+ } fields;
182
+ } __attribute__((packed, aligned(4))) probe_point_id_t;
183
+
184
+ .. code-block :: c
185
+
186
+ /**
187
+ * Description of probe point
188
+ */
189
+ struct probe_point {
190
+ probe_point_id_t buffer_id; /**< ID of buffer to which probe is attached */
191
+ uint32_t purpose; /**< PROBE_PURPOSE_xxx */
192
+ uint32_t stream_tag; /**< Stream tag of DMA via which data will be provided for injection.
193
+ * For extraction purposes, stream tag is ignored when received,
194
+ * but returned actual extraction stream tag via INFO function.
195
+ */
196
+ } __attribute__((packed, aligned(4)));
197
+
198
+ Enabling the log in IPC3 system (in case auto enable is not on):
199
+
200
+ .. code-block :: bash
201
+
202
+ echo 0,1,0 > probe_points
203
+
204
+ And on IPC4 system:
205
+
206
+ .. code-block :: bash
207
+
208
+ echo 0,0,0 > probe_points
209
+
164
210
2. Unpause the playback stream. (optional)
165
211
#. Close the playback stream when done.
166
212
#. Close the crecord tool.
0 commit comments