thesofproject / sof

Sound Open Firmware
Other
532 stars 307 forks source link

[BUG][LNL] [SDW] audio glitches on LNL-SDW #8809

Open keqiaozhang opened 7 months ago

keqiaozhang commented 7 months ago

Describe the bug The JD issue has been fixed on LNL-SDW platforms, so now we are able to check the audio quality on LNL-SDW. Now I observed the audio glitches on both playback and capture, but the reproduction rate is low, not easy to reproduce manually. Here are the failures we captured in CI daily test.

On playback: image There're a lot of xrun warning during the test.

2024-01-28 22:11:39 UTC [REMOTE_INFO] Starting /usr/local/bin/mtrace-reader.py >& /home/ubuntu/sof-test/logs/check-alsabat/2024-01-28-22:11:38-10012/mtrace.txt &
2024-01-28 22:11:39 UTC [REMOTE_INFO] check the PCMs before alsabat test
2024-01-28 22:11:41 UTC [REMOTE_COMMAND] alsabat -Phw:sofsoundwire,0 --standalone -n 240000 -r 48000 -c 2 -f S16_LE -F 821 -k 2.1
2024-01-28 22:11:42 UTC [REMOTE_COMMAND] alsabat -Chw:CODEC,0 -c 2 -r 48000 -f S16_LE -F 821 -k 2.1
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)

On capture: image

To Reproduce

Playback test:~/sof-test/test-case/check-alsabat.sh -p hw:sofsoundwire,0 -c hw:CODEC,0 -C 2 -F 821

Capture test:~/sof-test/test-case/check-alsabat.sh -c hw:sofsoundwire,1 -p hw:CODEC,0 -C 2 -F 821

Reproduction Rate Low, less than 10%.

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

wav-file.gz

cc:

plbossart commented 7 months ago

probably the same as https://github.com/thesofproject/linux/issues/4754, it's not worth investigating audio quality issues until fw-based aggregation is merged in firmware and kernel

lgirdwood commented 7 months ago

probably the same as thesofproject/linux#4754, it's not worth investigating audio quality issues until fw-based aggregation is merged in firmware and kernel

Ok, lets wait until aggregation is fully ready. I've put in v2.10 for the moment, can be moved to v2.9 if needed.

lgirdwood commented 3 months ago

@plbossart @bardliao @ujfalusi whats the status today ?

plbossart commented 3 months ago

I don't think we can reach any conclusions, we still have FAILs in alsa-bat, and I don't get if this is still related to the jack setup or now.

bardliao commented 3 months ago

@plbossart @lgirdwood I checked some recent daily test results, check-alsabat-headset-playback seems pass consistently and some of the check-alsabat-headset-capture are failed. But they are all because of the signal is too low not like this issue's description. And the issue is tracking at https://github.com/thesofproject/linux/issues/5076.

But the reproduction rate of this issue is low. So, I don't know if it is fixed or just not reproduced recently.

lgirdwood commented 3 months ago

@fredoh9 @marc-hb @ssavati anyone seen this on daily test recently ? If not we can close. This is different from the bank switch and missing IRQ.

ujfalusi commented 3 months ago

I cannot find anything like this, but we have at least two corrupted alsabat: https://sof-ci.ostc.intel.com/#/result/planresultdetail/41949?model=LNLM_SDW_AIOC&testcase=check-alsabat-headset-playback-599 https://sof-ci.ostc.intel.com/#/result/planresultdetail/41810?model=LNLM_SDW_AIOC&testcase=check-alsabat-headset-playback-599

plbossart commented 3 months ago

we are not even looking at quality issues for now, the priority is to deal with timeouts.

marc-hb commented 3 months ago

I've seen this "Underrun: Broken pipe" recently. Also, alsabat (which is the only "real" audio test in sof-test) is still failing left and right on LNL.

marc-hb commented 3 months ago

I've seen this "Underrun: Broken pipe" recently.

One just now:

plbossart commented 3 months ago

One just now:

  • [LNL HDA alsabat capture failed, "Peak freq too low" #9164 (comment)]

Different issue. We're tracking SoundWire issues here, the HDA alsabat stuff is a different problem relying on a different topology and a different physical interface/timing.

marc-hb commented 2 months ago

Sorry my bad, went too fast. To make amend, here's the SDW, "signal too weak" failure of the day:

https://sof-ci.01.org/softestpr/PR931/build518/devicetest/index.html?model=LNLM_SDW_AIOC&testcase=check-alsabat-headset-capture-599

marc-hb commented 2 months ago

... and still wrong, there is yet another issue about that: thesofproject/linux#5076. Really sorry, I'm losing track

kv2019i commented 2 months ago

Reproduction rate low in past week, continue with P2 and assign to v2.11.

marc-hb commented 2 months ago

Recent "Underrun: Broken pipe(-32)" in https://sof-ci.01.org/softestpr/PR1217/build594/devicetest/index.html?model=LNLM_SDW_AIOC&testcase=check-alsabat-headset-playback-599

EDIT: also an overrun in https://github.com/thesofproject/linux/issues/5076#issuecomment-2231565735

Still failing, August 14th https://sof-ci.01.org/sofpr/PR9351/build6997/devicetest/index.html?model=LNLM_SDW_AIOC&testcase=check-alsabat-headset-playback-599

kv2019i commented 6 days ago

Reviewing a week worth of daily test plans with this configurations (starting 2024-09-02), this test is passing all the time. It is likely https://github.com/zephyrproject-rtos/zephyr/pull/77805 fix was responsible for the occasional 1ms glitches seen in this test and those are now gone.

kv2019i commented 5 days ago

Murphy's law, the next daily plan shows a fail again, 2024-09-09 run has a fail. Console has a overrun and the captured bat.wav look like this:

image

... rest of file is clean. Reopening.

lrudyX commented 2 days ago

@kv2019i please create new ticket for this problem

marc-hb commented 2 days ago

@lrudyX can you summarize how it is a different issue now?

kv2019i commented 2 days ago

@lrudyX I think this is exactly the original problem (quoting the original bug report from January):

2024-01-28 22:11:39 UTC [REMOTE_INFO] Starting /usr/local/bin/mtrace-reader.py >& /home/ubuntu/sof-test/logs/check-alsabat/2024-01-28-22:11:38-10012/mtrace.txt &
2024-01-28 22:11:39 UTC [REMOTE_INFO] check the PCMs before alsabat test
2024-01-28 22:11:41 UTC [REMOTE_COMMAND] alsabat -Phw:sofsoundwire,0 --standalone -n 240000 -r 48000 -c 2 -f S16_LE -F 821 -k 2.1
2024-01-28 22:11:42 UTC [REMOTE_COMMAND] alsabat -Chw:CODEC,0 -c 2 -r 48000 -f S16_LE -F 821 -k 2.1
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)
Underrun: Broken pipe(-32)

We still see the underruns on certain DUT configurations.