@@ -124,7 +124,7 @@ the last stage of extraction.
124124 - Add probe points via the ``debugfs `` "probe_points" entry in ``/sys/kernel/debug/sof ``
125125
126126
127- For example, to add buffer 7 with a probe point:
127+ For example, to add buffer 7 with a probe point (IPC3) :
128128
129129 .. code-block :: bash
130130
@@ -161,6 +161,52 @@ the last stage of extraction.
161161 strnlen(tw->sname, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) > 0
162162 ? tw->sname : "none");
163163
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+
1642102. Unpause the playback stream. (optional)
165211#. Close the playback stream when done.
166212#. Close the crecord tool.
0 commit comments