Skip to content

Commit 8a791ed

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

File tree

1 file changed

+77
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)