Skip to content

[BYT][NOCODEC] alsa-bat check-alsabat-headset-playback.sh FAIL #379

Closed

Description

@plbossart

tracking https://sof-ci.01.org/linuxpr/PR2396/build4392/devicetest/

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?

Activity

  1. mengdonglin commented on Aug 31, 2020

    @mengdonglin
    Contributor

    @singalsu Can you reproduce this failure locally?

  2. mengdonglin commented on Aug 31, 2020

    @mengdonglin
    Contributor

    @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.

  3. xiulipan commented on Aug 31, 2020

    @xiulipan
    Contributor

    @aiChaoSONG WAV files and pic uploaded. Please try some other measure method to confirm the error in the wav.
    bat.wav.zip

    image

  4. aiChaoSONG commented on Aug 31, 2020

    @aiChaoSONG

    @keqiaozhang @mengdonglin @xiulipan @plbossart

    Amp spectrum (whole wave, amp normalized to 1.0)
    Screenshot from 2020-08-31 18-27-33

    Amp spectrum(whole wave, local area)
    side lobe peaks in dB: -27.356dB -23.496dB
    Screenshot from 2020-08-31 18-27-57

    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.
    Screenshot from 2020-08-31 18-47-53

    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.
  5. singalsu commented on Aug 31, 2020

    @singalsu
    Contributor

    @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.

  6. plbossart commented on Aug 31, 2020

    @plbossart
    MemberAuthor

    @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?

  7. singalsu commented on Sep 1, 2020

    @singalsu
    Contributor

    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.

    Screenshot from 2020-09-01 12-34-44
    Screenshot from 2020-09-01 12-37-06
    Screenshot from 2020-09-01 12-37-34

  8. aiChaoSONG commented on Sep 1, 2020

    @aiChaoSONG

    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.

  9. singalsu commented on Sep 1, 2020

    @singalsu
    Contributor

    @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).

  10. singalsu commented on Sep 1, 2020

    @singalsu
    Contributor

    @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.

  11. aiChaoSONG commented on Sep 1, 2020

    @aiChaoSONG

    @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

  12. singalsu commented on Sep 1, 2020

    @singalsu
    Contributor

    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?

  13. aiChaoSONG commented on Sep 1, 2020

    @aiChaoSONG

    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.

  14. 12 remaining items

  15. marc-hb commented on Oct 14, 2020

    @marc-hb
    Collaborator

    New [BUG] BYT: Random stereo channels swaps happen with sof-byt-nocodec.tplg thesofproject/sof#3520

  16. kv2019i commented on Oct 23, 2020

    @kv2019i
    Contributor

    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/

  17. xiulipan commented on Jan 26, 2021

    @xiulipan
    Contributor

    any update? @thesofproject/test-maintainers I think we have update the alsa-bat test with wavtool and new hardware.

  18. added
    P3Low-impact bugs or features
    and removed
    state:ping-for-closeWill be closed if submitter is not responsive
    P2Critical bugs or normal features
    on Jun 8, 2021
  19. mengdonglin commented on Jun 8, 2021

    @mengdonglin
    Contributor

    The logic of alsabat may need to modify: sometimes there can be peak in the side lope, and this is acceptable for human.

  20. mengdonglin commented on Jun 8, 2021

    @mengdonglin
    Contributor

    Lower the priority as this failure hasn't been observed recently.

  21. marc-hb commented on Aug 1, 2024

    @marc-hb
    Collaborator

    assumed fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P3Low-impact bugs or featuresarea:non-audio FailureFalse positives: failing when we don't want totype:bugSomething doesn't work as expected

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions