Skip to content

Commit 9dcf2d6

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

File tree

1 file changed

+86
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)