-
Notifications
You must be signed in to change notification settings - Fork 349
Description
Describe the bug
I have developed a test that plays different frequency sine waves in each channel to PCM0P and captures from PCM0C. The purpose of the test is volume control testing but it detects also basic issues like channel swap. The reported error indicates that the playback, ssp-loopback, or capture channels got swapped.
The topology contains also volume components and mixer in the playback path. Though since a similar topology passes in APL platform the bug in those components is unlikely. But I'll try to replicate with a minimized topology later.
To Reproduce
With PR thesofproject/sof-test#410 (to add the test) and sof PR #3509 (add the volume switch to nocodec topologies) run:
sof-test/test-case/check-volume-levels.sh
Reproduction Rate
For one sub-test (play-capture) about 50% occurrence. Below 2 of 3 sub-tests failed.
Expected behavior
No channels swapped, the test passed as it does in cAVS platforms.
Impact
Annoyance for stereo music, showstopper for applications where channels order is critical.
Environment
- Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
- Kernel: {SHA}
- SOF: {SHA}
- Name of the topology file
- Topology: sof-byt-nocodec.tplg
- Name of the platform(s) on which the bug is observed.
- Platform: Baytrail
Screenshots or console output
2020-10-14 11:20:57 UTC [INFO] Measuring volume gains
File /tmp/tmp.iat6kH01et.wav:
pass (1/3)
File /tmp/tmp.EIsHmXIzcE.wav:
Channel 1 failed lower gain limit at 0.5 - 0.9s, gain -47.2 dB, min -10.5 dB
Channel 2 failed lower gain limit at 0.5 - 0.9s, gain -27.1 dB, min 9.5 dB
Channel 2 failed lower gain limit at 1.5 - 1.9s, gain -37.1 dB, min -0.5 dB
fail (2/3)
Note: The test would pass with swapped channels.
File /tmp/tmp.3pEPEAF8DL.wav:
Channel 1 failed lower gain limit at 2.5 - 2.9s, gain -37.2 dB, min -0.5 dB
Channel 1 failed lower gain limit at 3.5 - 3.9s, gain -37.2 dB, min -0.5 dB
Channel 2 failed lower gain limit at 3.5 - 3.9s, gain -37.1 dB, min -0.5 dB
fail (3/3)
Note: The test would pass with swapped channels.
FAIL
2020-10-14 11:21:11 UTC [ERROR] Error: Failed one or more tests in volume levels check.
2020-10-14 11:21:11 UTC [ERROR] Please inspect files: /tmp/tmp.iat6kH01et.wav, /tmp/tmp.EIsHmXIzcE.wav, and /tmp/tmp.3pEPEAF8DL.wav.
2020-10-14 11:21:11 UTC [ERROR] Starting func_exit_handler(), exit status=1, FUNCNAME stack:
2020-10-14 11:21:11 UTC [ERROR] die() @ /home/singalsu/git/sof-test/case-lib/lib.sh
2020-10-14 11:21:11 UTC [ERROR] measure_levels() @ sof-test/test-case/check-volume-levels.sh:328
2020-10-14 11:21:11 UTC [ERROR] main() @ sof-test/test-case/check-volume-levels.sh:84
2020-10-14 11:21:11 UTC [ERROR] main() @ sof-test/test-case/check-volume-levels.sh:336
2020-10-14 11:21:11 UTC [INFO] Test Result: FAIL!
Please also include the relevant sections from the firmware log and kernel log in the report (and attach the full logs for complete reference). Kernel log is taken from dmesg and firmware log from sof-logger. See https://thesofproject.github.io/latest/developer_guides/debugability/logger/index.html