thesofproject / sof

Sound Open Firmware
Other
541 stars 309 forks source link

[BUG] [HIFI4] PeakVol.Quality issues for audio formats #9213

Closed gbernatxintel closed 1 month ago

gbernatxintel commented 3 months ago

Describe the bug There is a problem processing signals of 11025, 22050, 44100, 88200, 176400 Hz by the HIFI4 module. The main problem is that, for example, for the frequency f=44.1kHz frame is 44 or 45. Some samples are not processed.

To Reproduce

  1. Run the test: pytest -s "tests/avs/fw_01_base_fw_modules/test_09_peak_vol.py::TestPeakVolFull::test_01_09_peakvol_quality[44100Hz_16in16bit_1ch-0]"

Reproduction Rate 100%

Expected behavior The entire signal should be processed correctly and no glitches should occur

Impact It is not possible to use HIFI4, for MTL. Using HIFI3 does not use the full capabilities of the platform. The program runs sub optimally and uses several percent more CPU cycles than when using HIFI4

Environment 1) Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).

Notes A PR has been added that fixes the problem for frequencies of 88.2kHz and above. However, it does not solve the problem completely. You can find the link here: https://github.com/thesofproject/sof/pull/9158

Screenshots or console output

image

cc:

marc-hb commented 3 months ago

@gbernatxintel can you please confirm that any other HiFi4 hardware other than MTL is or would be affected in the same way? In other words, a pure software bug?

EDIT: this is what #9208 seems to imply. Please confirm.

gbernatxintel commented 3 months ago

can you please confirm that any other HiFi4 hardware other than MTL is or would be affected in the same way? In other words, a pure software bug?

The problem is replicated on the LNL platform. The way it works is exactly the same as for MTL. The output signal looks the same for LNL when using HIFI4.

The fix 9208 that is here fixes the problem for the LNL platform

marc-hb commented 2 months ago

@gbernatxintel can this be closed?

lgirdwood commented 1 month ago

@singalsu can this be closed ?

singalsu commented 1 month ago

@singalsu can this be closed ?

No, I'm working with this issue. The merged fix is a workaround. @gbernatxintel has started a real fix and I'm contributing to that work.

singalsu commented 1 month ago

Small progress, I'm now able replicate the issue with Linux & SOF topology in LNL platform.

singalsu commented 1 month ago

@wszypelt Would it be possible to check if #9408 fixes the issue with test pytest -s "tests/avs/fw_01_base_fw_modules/test_09_peak_vol.py::TestPeakVolFull::test_01_09_peakvol_quality[44100Hz_16in16bit_1ch-0]"

wszypelt commented 1 month ago

@singalsu all passed at MTL and LNL with #9408

singalsu commented 1 month ago

Fixed by #9408 merge