-
Notifications
You must be signed in to change notification settings - Fork 59
test-case: manual: Simple probes functionality test #923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # Probes test | ||
| Simple probes functionality test. | ||
|
|
||
| # Preconditions | ||
| 1. Linux kernel should have these config options enabled: | ||
| CONFIG_SND_SOC_SOF_DEBUG_PROBES=y | ||
| CONFIG_SND_SOC_SOF_HDA_PROBES=y | ||
|
|
||
| These options are not user selectable but are automatically | ||
| selected by the SOF platform options supporting probes. These | ||
| platforms select SND_SOC_SOF_INTEL_SKL/APL/CNL/ICL/TGL/MTL. Those | ||
| options in term select SND_SOC_SOF_HDA_COMMON, which selects | ||
| SND_SOC_SOF_HDA_PROBES, which selects SND_SOC_SOF_DEBUG_PROBES. | ||
|
|
||
| 2. Firmware should have these config options enabled: | ||
| CONFIG_PROBE=y | ||
|
|
||
| The following defaults are Ok: | ||
| CONFIG_PROBE_POINTS_MAX=16 | ||
| CONFIG_PROBE_DMA_MAX=4 | ||
jsarha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| In fact PROBE_DMA_MAX is ignored as inection is not currently supported | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/inection/injection
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If CONFIG_PROBE is enabled through menuconfig the CONFIG_PROBE_DMA_MAX option appears with the default value of 4, so I think it causes less confusion to mention it than leaving it out.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For me it comes with 0 as default, but never checked the kconfig file to be honest..
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you have put the zero there. If enabled for the first time (I think I had not touched the items before), the two numeric options appear as above. |
||
|
|
||
| 2. Enable the module, by creating file /etc/modprobe.d/sof-probes.conf, with | ||
| following line as content: | ||
| options snd_sof_probes enable=1 | ||
|
|
||
| 3. Add following line to /etc/modprobe.d/sof.conf: | ||
jsarha marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| options snd slots=,,,snd_sof_probes | ||
|
|
||
| to make the sound card for the probes to be locked at card3. | ||
|
|
||
| 4. Have tiny compress installed: | ||
| git clone https://github.com/alsa-project/tinycompress.git | ||
| sudo ./gitcompile --prefix= $OUT | ||
| sudo make install | ||
|
|
||
| 5. Have sof-probes from sof/tools/probes installed | ||
|
|
||
|
|
||
| # Test Description | ||
| * Enable probe capture, start playback, bind the probe capture to a buffer | ||
| in playback pipeline, convert the capture to wav, verify the wav contains | ||
| the content played. | ||
|
|
||
| The probes functionality is described in more generic way here: | ||
| https://github.com/thesofproject/sof-docs/blob/master/developer_guides/debugability/probes/index.rst | ||
|
|
||
| # Simple probe capture case | ||
| ## Check preconditions | ||
| 1. Look for comprY under /proc/asound/cardX/, you should find for example: | ||
| /proc/asound/card3/compr0/ | ||
| 2. Check that you have a working tiny compress "crecord" binary available. | ||
| 3. Check that you have a working sof tools "sof-probes" binary available. | ||
|
|
||
| ## Run Instructions | ||
| 1. Start a capture on probe alsa device (3 and 0 are from | ||
| /proc/asound/card3/compr0): | ||
| ``` | ||
| crecord -c3 -d0 -b8192 -f4 -FS32_LE -R48000 -C4 /tmp/extract.wav | ||
| ``` | ||
| 2. Start a playback | ||
| ``` | ||
| aplay -Dplughw:0,0 test.wav -v -q | ||
| ``` | ||
|
|
||
| 3. Bind probe capture to a buffer on playback pipeline (as super user): | ||
| ``` | ||
| echo 36,1,0 > /sys/kernel/debug/sof/probe_points | ||
| ``` | ||
| The first number refers to the playback buffer being captured (it should be | ||
| found from the topology), second tells its a capture (always 1 as insertion | ||
| is not supported), and the last number is ignored in capture case. | ||
|
|
||
| 4. See that the probes capture file is growing: | ||
| ``` | ||
| ls -l /tmp/extract.wav | ||
| ``` | ||
|
|
||
| 5. Convert the captured file to a regular wav-file: | ||
| ``` | ||
| sof-probes -p /tmp/extract.wav | ||
| ``` | ||
|
|
||
| 6. Check that the resulting wav-file resembles the one that was being played | ||
| during the capture: | ||
| ``` | ||
| aplay -Dplughw:0,0 buffer_36.wav -v -q | ||
| ``` | ||
Uh oh!
There was an error while loading. Please reload this page.