Skip to content

Commit e5a27a4

Browse files
jsarhamwasko
authored andcommitted
developer_guides: debugability: probes: Rewrite probes logging enable quide
One of the PRs for automatic enabling of logging through probes interface was not accepted, and since there is not better alternative to enable the logs at the moment, document the old mething for enabling them. Restructure the documrent a bit while at it. Signed-off-by: Jyri Sarha <[email protected]>
1 parent 6ec5940 commit e5a27a4

File tree

1 file changed

+28
-19
lines changed
  • developer_guides/debugability/probes

1 file changed

+28
-19
lines changed

developer_guides/debugability/probes/index.rst

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ from each buffer.
1212
Requirements
1313
************
1414

15+
.. _install-tinycompress:
16+
1517
- Install `tinycompress <https://github.com/alsa-project/tinycompress>`_ (crecord tool)
1618

1719
Enabling Probes
1820
***************
1921

22+
.. _kernel-side:
23+
2024
Kernel side
2125
===========
2226

@@ -55,6 +59,8 @@ Kernel side
5559
5660
cat /proc/asound/cards | grep sofprobes
5761
62+
.. _firmware-side:
63+
5864
Firmware side
5965
=============
6066

@@ -81,13 +87,9 @@ Firmware side
8187
CONFIG_LOG_BACKEND_SOF_PROBE=y
8288
CONFIG_ZEPHYR_LOG=y
8389

84-
This option enables the probes logging automatically when probes extraction DMA is started:
90+
Refer to :ref:`Simple logging case<simple-logging-case>` for quick guide to use probes logging interface.
8591

86-
.. code-block:: bash
87-
88-
CONFIG_LOG_BACKEND_SOF_PROBE_OUTPUT_AUTO_ENABLE=y
89-
90-
- Refer to **Step 3 Build firmware binaries** in :ref:`Build SOF from Scratch <build-from-scratch>` for reference.
92+
- Refer to **Step 3 Build firmware binaries** in :ref:`Build SOF from Scratch <build-from-scratch>` for reference on how to build SOF FW.
9193

9294
Note that you do not need to modify the audio topology file.
9395

@@ -195,22 +197,12 @@ the last stage of extraction.
195197
*/
196198
} __attribute__((packed, aligned(4)));
197199
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-
210200
2. Unpause the playback stream. (optional)
211201
#. Close the playback stream when done.
212202
#. Close the crecord tool.
213203

204+
.. _data-parsing:
205+
214206
Data parsing
215207
************
216208

@@ -230,12 +222,29 @@ Usage and ouput:
230222
As a result, ``buffer_7.wav`` is generated in the *tools/build_tools/probes* folder. The wave file can then be examined with your tool of choice
231223
such as ``Audacity``.
232224

225+
.. _simple-logging-case:
233226

234227
Simple logging case
235228
*******************
236229

237-
With the crecord and sof-probes in path, probes logging backend with auto enable option it is possible to get the firmware logs to stdout with this command combination:
230+
With the :ref:`crecord<install-tinycompress>` and :ref:`sof-probes<data-parsing>` in path, FW built with :ref:`probes logging enabled<firmware-side>`, and probes enabled from :ref:`Linux side<kernel-side>`, it should be possible to extract the logs with following steps:
231+
232+
#. crecord has to be started first:
238233

239234
.. code-block:: bash
240235
241236
crecord -c3 -d0 -b8192 -f4 -FS32_LE -R48000 -C4 | sof-probes -l
237+
238+
#. then to enable logs through probes sysfw interface use following commands as root,
239+
240+
IPC3 system:
241+
242+
.. code-block:: bash
243+
244+
echo 0,1,0 > /sys/kernel/debug/sof/probe_points
245+
246+
IPC4 system:
247+
248+
.. code-block:: bash
249+
250+
echo 0,0,0 > /sys/kernel/debug/sof/probe_points

0 commit comments

Comments
 (0)