You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No idea why this happens. Our 'all green' status for CI devices lasted only a couple of hours. @lgirdwood@lyakh FYI, not sure if anything changed at the firmware level?
@plbossart@singalsu This seems to be the same random issue as thesofproject/sof#1988 that was closed without a fix.
Xiuli has checked the dumped WAV by CI and cannot see obvious wave distortion but cannot pass alsabat check. @aiChaoSONG will check the wav file with new CI tool.
Amp spectrum(whole wave, local area)
side lobe peaks in dB: -27.356dB -23.496dB
Amp spectrum (exclude the first 20000 samples, ignore ramp, local area)
unit of frequency axis is frequency bin, so the peak located at about 1600 is not an error.
The ramp at the beginning of the recorded wave introduces higher side lobe, which may cause alsabat failed.
we can:
add threshold in alsabat, make it less sensitive
try to avoid the ramp at the very beginning
implement wave analysis in wavetool.py, and use it for alsabat test.
@aiChaoSONG@singalsu can't we just skip the first part of the captured stream? if we are doing a frequency analysis it has to be done in steady-state, no?
Yep exactly, the ramp part need to be excluded from analysis to get state. Also the FFT needs to be windowed if it's length is not synchronized to sine wave period. I'm usually using "kaiser(N, beta)" and using beta that gives suitable tradeoff between sidelobes attenuation and tone frequency bins spread. When applying window the level seen for sine wave is also impacted. Maybe start with beta = 10 for kaiser.
For playing with impact of windows and FFT length interactively I recommend to check this bat.wav file with sound editor called "snd" (from Ubuntu packages). Check from waveform the "f" checkbox on. Then go to transform options (single transform, dB, log freq, min dB 140, type Kaiser, size 1024, beta 0 - 1.0 (correspond to 0 - 15 as seen in plot), etc. If you select instead of single transform the sonogram, you'll see the distortion components of the ramp.
I also checked wave file recorded by other platform, mainly JSL, the side lobe peak is not that high. So I am not sure if there is issue with BYT devices.
@aiChaoSONG I edited my response above. To me the spectra in the bat.wav attached here looks quite OK. It's not 24 bit high-end quality but pretty good. There's some DC output above the noise floor (-100 dB or so, so very small, we may miss proper rounding somewhere in the test system and/or firmware but it's a minor issue).
@aiChaoSONG The side lobes appear due to no windowing or insufficient windowing and due to different lenght of FFT than sine wave period (or integer multiple). E.g. the kaiser window with large enough beta is needed for >= 16 bit applications like SOF is. So it's a measurement technique issue.
Good finding @aiChaoSONG ! Computing of kaiser windows is somewhat tricky. Not sure any open-source library provide the needed functions. Does alsabat by chance use a fixed FFT length so the window could be pre-computed into a data file?
Good finding @aiChaoSONG ! Computing of kaiser windows is somewhat tricky. Not sure any open-source library provide the needed functions. Does alsabat by chance use a fixed FFT length so the window could be pre-computed into a data file?
@singalsu Unfortunately, it doesn't, the FFT size it used is calculated by truncating time_length * sample_rate to 2^N, and time_length is given by user from command line.
Activity
mengdonglin commentedon Aug 31, 2020
@singalsu Can you reproduce this failure locally?
mengdonglin commentedon Aug 31, 2020
@plbossart @singalsu This seems to be the same random issue as thesofproject/sof#1988 that was closed without a fix.
Xiuli has checked the dumped WAV by CI and cannot see obvious wave distortion but cannot pass alsabat check. @aiChaoSONG will check the wav file with new CI tool.
xiulipan commentedon Aug 31, 2020
@aiChaoSONG WAV files and pic uploaded. Please try some other measure method to confirm the error in the wav.
bat.wav.zip
aiChaoSONG commentedon Aug 31, 2020
@keqiaozhang @mengdonglin @xiulipan @plbossart
Amp spectrum (whole wave, amp normalized to 1.0)

Amp spectrum(whole wave, local area)

side lobe peaks in dB: -27.356dB -23.496dB
Amp spectrum (exclude the first 20000 samples, ignore ramp, local area)

unit of frequency axis is frequency bin, so the peak located at about 1600 is not an error.
The ramp at the beginning of the recorded wave introduces higher side lobe, which may cause alsabat failed.
we can:
singalsu commentedon Aug 31, 2020
@aiChaoSONG It would be better to plot with dB y-axis, but I agree with your proposals. The ramp in the beginning impacts the spectra.
plbossart commentedon Aug 31, 2020
@aiChaoSONG @singalsu can't we just skip the first part of the captured stream? if we are doing a frequency analysis it has to be done in steady-state, no?
singalsu commentedon Sep 1, 2020
Yep exactly, the ramp part need to be excluded from analysis to get state. Also the FFT needs to be windowed if it's length is not synchronized to sine wave period. I'm usually using "kaiser(N, beta)" and using beta that gives suitable tradeoff between sidelobes attenuation and tone frequency bins spread. When applying window the level seen for sine wave is also impacted. Maybe start with beta = 10 for kaiser.
For playing with impact of windows and FFT length interactively I recommend to check this bat.wav file with sound editor called "snd" (from Ubuntu packages). Check from waveform the "f" checkbox on. Then go to transform options (single transform, dB, log freq, min dB 140, type Kaiser, size 1024, beta 0 - 1.0 (correspond to 0 - 15 as seen in plot), etc. If you select instead of single transform the sonogram, you'll see the distortion components of the ramp.
aiChaoSONG commentedon Sep 1, 2020
I also checked wave file recorded by other platform, mainly JSL, the side lobe peak is not that high. So I am not sure if there is issue with BYT devices.
singalsu commentedon Sep 1, 2020
@aiChaoSONG I edited my response above. To me the spectra in the bat.wav attached here looks quite OK. It's not 24 bit high-end quality but pretty good. There's some DC output above the noise floor (-100 dB or so, so very small, we may miss proper rounding somewhere in the test system and/or firmware but it's a minor issue).
singalsu commentedon Sep 1, 2020
@aiChaoSONG The side lobes appear due to no windowing or insufficient windowing and due to different lenght of FFT than sine wave period (or integer multiple). E.g. the kaiser window with large enough beta is needed for >= 16 bit applications like SOF is. So it's a measurement technique issue.
aiChaoSONG commentedon Sep 1, 2020
@singalsu In this case, alsabat is helping us to do wave analysis, after check its source code, I don't think it uses any window function.
https://github.com/alsa-project/alsa-utils/tree/master/bat
singalsu commentedon Sep 1, 2020
Good finding @aiChaoSONG ! Computing of kaiser windows is somewhat tricky. Not sure any open-source library provide the needed functions. Does alsabat by chance use a fixed FFT length so the window could be pre-computed into a data file?
aiChaoSONG commentedon Sep 1, 2020
@singalsu Unfortunately, it doesn't, the FFT size it used is calculated by truncating
time_length * sample_rateto 2^N, and time_length is given by user from command line.12 remaining items
marc-hb commentedon Oct 14, 2020
New
[BUG] BYT: Random stereo channels swaps happen with sof-byt-nocodec.tplgthesofproject/sof#3520kv2019i commentedon Oct 23, 2020
One case where BYT alsabat fails with audio produced (no timeout), but the wave file is clipping. Wrong gains in DUT or test setup?
https://sof-ci.01.org/linuxpr/PR2518/build4747/devicetest/
xiulipan commentedon Jan 26, 2021
any update? @thesofproject/test-maintainers I think we have update the alsa-bat test with wavtool and new hardware.
mengdonglin commentedon Jun 8, 2021
The logic of alsabat may need to modify: sometimes there can be peak in the side lope, and this is acceptable for human.
mengdonglin commentedon Jun 8, 2021
Lower the priority as this failure hasn't been observed recently.
marc-hb commentedon Aug 1, 2024
assumed fixed