thesofproject / linux

Linux kernel source tree
Other
91 stars 133 forks source link

[SDW][BUG]Pop noise occurred when do pause/release or switch to background/foreground during aplay0,0(RT711) or aplay0,2(RT1308) #1376

Closed YvonneYang2 closed 4 years ago

YvonneYang2 commented 5 years ago

Describe the bug Pop noise occurred when do pause/release or switch to background/foreground during aplay0,0(RT711) or aplay0,2(RT1308)

To Reproduce

  1. Boot up.
  2. Aplay 0,2 via "aplay -Dhw:0,2 -r48000 -c2 -fs16_le wav/48California_Dreaming.wav -vv -i"
  3. PUSH_PAUSE and PUSE_RELEASE. Interval time between pause/release is about 0.5s

frequency Not each PUSH_RAUSE/PUSH_RELEASE will occur pop noise. Pause/release 10 times, reproduced 5 times.

Expected result Pause/release has no pop noise.

Actual result Pause/release will have pop noise.

Environment kernel: https://github.com/thesofproject/linux/tree/integration/soundwire-latest commit: 15f27d8 + PR1359 FW: https://github.com/thesofproject/sof/commits/master commit: 89ef0af tplg: Same with FW branch, sof-cml-rt711-rt1308-rt715.tplg platform: CML SDW Laptop with ALC711+ ALC1308+ ALC715

dmesg.log logger.log

plbossart commented 5 years ago

@YvonneYang2 I don't think there's anything we can do to avoid pops/clicks if there is an underflow during playback.

For pops for pause push/resume, this also goes back to the 'feature'. We will not have the ability to do a ramp down/up, so I don't think we can prevent such issues from happening due to discontinuites between samples. This is a standard audio problem, for me this is not a bug we can fix. It is what it is.

@bardliao please chime in.

mengdonglin commented 5 years ago

Realtek will check this issue

bardliao commented 5 years ago

It looks like a depop issue on codec and @shumingfan can reproduce the issue on his side. He will look into it.

shumingfan commented 5 years ago

Hi all, please try to apply the PR #1385 and test again.

YvonneYang2 commented 5 years ago

Issue can still be reproduced on CML laptop.

Test recipe: kernel: https://github.com/thesofproject/linux/tree/integration/soundwire-latest commit: 661d261 + PR #1385 + https://github.com/thesofproject/linux/pull/1359/commits/eea61267cd5ead04e9fd153d996fb583d1cb1716 FW: https://github.com/thesofproject/sof/commits/master commit: 0e8cf66 tplg: https://github.com/bardliao/sof/commits/soundwire-tplg (commit: 0408153), sof-cml-rt711-rt1308-rt715.tplg platform: CML SDW Laptop with ALC711+ ALC1308+ ALC715

Logs: dmesg.log logger.log

shumingfan commented 5 years ago

@YvonneYang2 Oh, I notice how do you reproduce this issue. This test method doesn't close/reopen the process of playback. The pop noise shouldn't come from the codec. You could try to play the silence data to test it and that will proof my explanation. "aplay -Dhw:0,2 -r48000 -c2 -fs16_le /dev/zero -vv -i" I tested it and can't hear the pop noise.

I did the patches yesterday that fixed the pop noise while the playback off.

YvonneYang2 commented 5 years ago

Test with latest soundwire-latest (661d261)+ #1385 + https://github.com/thesofproject/linux/pull/1359/commits/eea61267cd5ead04e9fd153d996fb583d1cb1716 and master (0e8cf66e) branch, issue still reproduced when pause/release on "Aplay 0,2 via "aplay -Dhw:0,2 -r48000 -c2 -fs16_le wav/48California_Dreaming.wav -vv -i"

@shumingfan Yes, confirmed that "aplay -Dhw:0,2 -r48000 -c2 -fs16_le /dev/zero -vv -i" cannot reproduce the issue with or without #1385 .

plbossart commented 5 years ago

@YvonneYang2 I don't think we can fix further, this should be tagged as closed or won't fix.

YvonneYang2 commented 5 years ago

Won't fix it since it's a standard audio problem.

YvonneYang2 commented 5 years ago
  1. Play a video, do pause/release, issue cannot be reproduced.
  2. Paplay via "paplay test.wav" , switch to background and back to foreground, issue also cannot be reproduced.
  3. Suspend with deep mode when system is idle with headphone connected, will has one pop noise. (s2idle mode is blocked by https://github.com/thesofproject/linux/issues/1387)

Test recipe: kernel: https://github.com/thesofproject/linux/tree/integration/soundwire-latest commit: 35dd388 FW: https://github.com/thesofproject/sof/commits/master commit: 9844920 tplg: same path as FW branch, sof-cml-rt711-rt1308-mono-rt715.tplg platform: CML SDW Laptop with ALC711+ ALC1308+ ALC715

plbossart commented 5 years ago

@YvonneYang2 is this the right bug? You closed this 7 days ago?

libinyang commented 4 years ago

We found starting or stopping (ctrlC) playback in aplay will also meet a similar issue. I'm not sure if it is the same bug with this issue. I suggest we reopen this issue or maybe better to open a new bug for aplay starting or stopping with ctrlC.

mengdonglin commented 4 years ago

Seems to the same issue to https://github.com/thesofproject/sof/issues/2203

YvonneYang2 commented 4 years ago

Split background/foreground scenario to https://github.com/thesofproject/linux/issues/1866 Split terminate via "Ctrl+c" scenario to https://github.com/thesofproject/linux/issues/1865 Split Start scenario to https://github.com/thesofproject/linux/issues/1867 Split pause/resume secnario to https://github.com/thesofproject/linux/issues/1869