Skip to content

Commit c43759a

Browse files
committed
test-case: manual: Simple probes functionality test
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
1 parent dab6da8 commit c43759a

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Probes test
2+
Simple probes functionality test.
3+
4+
# Preconditions
5+
1. Linux kernel should have these optios enabled:
6+
CONFIG_SND_SOC_SOF_DEBUG_PROBES=y
7+
CONFIG_SND_SOC_SOF_HDA_PROBES=y
8+
9+
2. Firmware should have these options enabled:
10+
CONFIG_PROBE=y
11+
CONFIG_PROBE_POINTS_MAX=16
12+
CONFIG_PROBE_DMA_MAX=4
13+
14+
2. Enable the module, by creating file /etc/modprobe.d/sof-probes.conf, with
15+
following line as content:
16+
options snd_sof_probes enable=1
17+
18+
3. Add following line to /etc/modprobe.d/sof.conf:
19+
options snd slots=,,,snd_sof_probes
20+
21+
4. Have tiny compress installed:
22+
git clone https://github.com/alsa-project/tinycompress.git
23+
sudo ./gitcompile --prefix= $OUT
24+
sudo make install
25+
26+
5. Have sof-probes from sof/tools/probes installed
27+
./sof-probes -p /tmp/extract.wav
28+
29+
30+
# Test Description
31+
* Enable probe capture, start playback, bind the probe capture to a buffer
32+
in playback pipeline, convert the capture to wav, verify the wav contains
33+
the content played.
34+
35+
The probes functionality is described in more generic way here:
36+
https://github.com/thesofproject/sof-docs/blob/master/developer_guides/debugability/probes/index.rst
37+
38+
# Simple probe capture case
39+
## Check preconditions
40+
1. Look for comprY under /proc/asound/cardX/, you should find for example:
41+
/proc/asound/card3/compr0/
42+
2. Check that you have a working tiny compress "crecord" binary available.
43+
3. Check that you have a working sof tools "sof-probes" binary available.
44+
45+
## Run Instructions
46+
1. Start a capture on probe alsa device (3 and 0 are from
47+
/proc/asound/card3/compr0):
48+
```
49+
crecord -c3 -d0 -b8192 -f4 -FS32_LE -R48000 -C4 /tmp/extract.wav
50+
```
51+
2. Start a playback
52+
```
53+
aplay -Dplughw:0,0 test.wav -v -q
54+
```
55+
56+
3. Bind probe capture to a buffer on playback pipeline (as super user):
57+
```
58+
echo 36,1,0 > /sys/kernel/debug/sof/probe_points
59+
```
60+
The first number refers to the playback buffer being captured (it should be
61+
found from the topology), second tells its a capture (always 1 as insertion
62+
is not supported), and the last number is ignored in capture case.
63+
64+
4. See that the probes capture file is growing:
65+
```
66+
ls -l /tmp/extract.wav
67+
```
68+
69+
5. Convert the captured file to a regular wav-file:
70+
```
71+
sof-probes -p /tmp/extract.wav
72+
```
73+
74+
6. Check that the resulting wav-file resembles the one that was being played
75+
during the capture:
76+
```
77+
aplay -Dplughw:0,0 buffer_36.wav -v -q
78+
```

0 commit comments

Comments
 (0)