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
checked the register differences i've captured when we record from command line and when we record from an userside application.
I think userspace application opens a playback stream and hence no noise is captured.
i did 1 more test:
aplay -f dat /dev/zero in 1 shell
Then do arecord in commandline - no noise.
Then stop playback.
Try record again. there is noise.
Seems issue happens when we try to do only capture path without using playback path.
I'm closing the issue as it doesnt seem to need a fix from sof side.
But @keqiaozhang can confirm if on ubuntu, there was any playback happening or playback device was opened ?
checked the register differences i've captured when we record from command line and when we record from an userside application.
I think userspace application opens a playback stream and hence no noise is captured.
i did 1 more test:
aplay -f dat /dev/zero in 1 shell
Then do arecord in commandline - no noise.
Then stop playback.
Try record again. there is noise.
Seems issue happens when we try to do only capture path without using playback path.
I'm closing the issue as it doesnt seem to need a fix from sof side.
But @keqiaozhang can confirm if on ubuntu, there was any playback happening or playback device was opened ?
Lance and I operated the same result as Sathya's findings.
(1). 44100MHz can reproduce in 1/5 times by arecord -f cd -d 5 /tmp/amic.wav
(2). 48000MHz can not duplicate by arecord -f dat -d 5 /tmp/amic.wav
Observation:
When noise issue was reproduced by 44100MHz (1). Subsequently do a 48000Hz recording follow by (2). Then doing the (1) in several times. Afterwards, issue is unable to reproduce anymore during the dsp fw running period of times.
Once waiting the dsp fw be reloaded, noise issue was duplicated by (1) with failure 1/5 times.
I believe why customer reported recorder app were unpronounceable since app require the 48KHz as default.
@macchian why are you referring to 44.1 kHz? we don't support this frequency on the interface. Or are you referring to 44.100 MHz as an internal clock frequency?
very hard to figure out what you observed, can you please be more specific?
@macchian why are you referring to 44.1 kHz? we don't support this frequency on the interface. Or are you referring to 44.100 MHz as an internal clock frequency?
very hard to figure out what you observed, can you please be more specific?
@plbossart , I checked the PCM hw_params sample rate is fixed at 48KHz indeed when alsa record with 44.1KHz as you pointed out. However the strange thing is the noise only be observed in 1/5 failure rate when alsa record with 44.1KHz. Non reproducible with 48KHz.
I asked Realtek to do an experiment by codec loopback internally and requested the loopback script for our testing. Will update the test result later.
So if you use a bclk of 4.8 MHz you have to use 4 slots. I don't understand how you can use 2 slots, or that means that most of the frame if empty, and you possibly have a problem sampling the data at the right time?
@plbossart
a) No need to pause/release, just run arecord several times, noise will appear
c) I just found change bclk from 2.4MHz to 4.8 MHz, this issue disappeared. So we suspect that this issue should be related to SSP clock. 4.8MHz is not the final solution, let's leave this to FW team to see if there is any SSP register not properly configurated.
@plbossart The sof-rt5682.m4 is what is used for all CML using RT5682 (the rt1011 variant reuses this for RT5682 config. only speaker config is additional)
So i see only difference, GLK with MCLK 19.2 and CML with 24.
considering the same, i want to give a try if we can set MCLK to 19.2 on CML ( for test purpose using M/N support) and see if issue is still seen.
I've reached out to vendor too on codec behavior on the experiment from @aiChaoSONG
@plbossart
a) No need to pause/release, just run arecord several times, noise will appear
c) I just found change bclk from 2.4MHz to 4.8 MHz, this issue disappeared. So we suspect that this issue should be related to SSP clock. 4.8MHz is not the final solution, let's leave this to FW team to see if there is any SSP register not properly configurated.
the only difference is a divider value.
we'd need to verify if indeed the MCLK is taken as the source clock for the codec PLL, if the behavior changes depending on the value of the BCLK, it means that either the BCLK is taken as a reference, or that the ratio between MCLK/BCLK should not be larger than a specific factor.
Update from codec vendor : based on our experiments, codec vendor make certain modifiation in driver to support 24M CLK and not use internal PLL and sees positive results. working on a clean patch for the same. will update here in couple of days
Activity
keqiaozhang commentedon Dec 9, 2019
I can reproduce this issue with Chrome OS, I attached a failed wav file(silent input).
noise.zip
dmesg
```` [ 190.017697] Port1: ASoC: pre trigger FE Port1 cmd 0 [ 190.017709] sof-audio-pci 0000:00:1f.3: pcm: trigger stream 0 dir 1 cmd 0 [ 190.018361] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x20240000 successful [ 190.018385] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60050000 [ 190.018784] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60050000 [ 190.018793] SSP0-Codec: ASoC: trigger BE SSP0-Codec cmd 0 [ 190.018819] Port1: ASoC: hw_free FE Port1 [ 190.018826] sof-audio-pci 0000:00:1f.3: pcm: free stream 0 dir 1 [ 190.018835] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60030000 [ 190.019341] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60030000 [ 190.019365] SSP0-Codec: ASoC: hw_free BE SSP0-Codec [ 190.019412] SSP0-Codec: ASoC: close BE SSP0-Codec [ 190.019504] Port1: ASoC: close FE Port1 [ 190.019510] sof-audio-pci 0000:00:1f.3: pcm: close stream 0 dir 1 [ 190.035385] SSP0-Codec: ASoC: BE SSP0-Codec event 2 dir 1 [ 190.035503] Port1: ASoC: BE capture disconnect check for SSP0-Codec [ 190.035507] Port1: freed DSP capture path Port1 <- SSP0-Codec [ 192.036862] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x20140000 successful [ 192.036919] sof-audio-pci 0000:00:1f.3: ipc tx: 0x40010000 [ 192.037166] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x40010000 [ 192.037218] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x1010f0f successful [ 192.037233] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x1000f0f successful [ 192.037240] sof-audio-pci 0000:00:1f.3: DSP core(s) enabled? 0 : core_mask f [ 192.037333] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000010 at 00000044 ````trace
BTW, I'm unable to reproduce it with Ubuntu OS(topic/sof-dev 54c96ea + master 65de27d).
bardliao commentedon Dec 12, 2019
@oder-chiou FYI
ranj063 commentedon Dec 12, 2019
@sathyap-chrome can you please make sure that there are no missing rt5682 codec patches in v0.8 compared to topic/sof-dev?
sathyap-chrome commentedon Dec 12, 2019
@ranj063 i'm on it.. thanks.
ranj063 commentedon Dec 13, 2019
@sathyap-chrome any updates?
sathyap-chrome commentedon Dec 13, 2019
i checked the sof-dev , there are no new patches wrt 5682.
i'm looking at difference in recording parameters etc if any.
sathyap-chrome commentedon Dec 13, 2019
checked the register differences i've captured when we record from command line and when we record from an userside application.
I think userspace application opens a playback stream and hence no noise is captured.
i did 1 more test:
aplay -f dat /dev/zero in 1 shell
Then do arecord in commandline - no noise.
Then stop playback.
Try record again. there is noise.
Seems issue happens when we try to do only capture path without using playback path.
regdump_app.txt
regdump_cmd_line.txt
I'm closing the issue as it doesnt seem to need a fix from sof side.
But @keqiaozhang can confirm if on ubuntu, there was any playback happening or playback device was opened ?
aiChaoSONG commentedon Dec 16, 2019
I also observed this phenomenon with our sof-dev + master branch.
** To Reproduce**
Press SPACE rapidly while recording on Headset.
without pause-release


with pause-release
macchian commentedon Dec 17, 2019
Lance and I operated the same result as Sathya's findings.
(1). 44100MHz can reproduce in 1/5 times by arecord -f cd -d 5 /tmp/amic.wav
(2). 48000MHz can not duplicate by arecord -f dat -d 5 /tmp/amic.wav
Observation:
When noise issue was reproduced by 44100MHz (1). Subsequently do a 48000Hz recording follow by (2). Then doing the (1) in several times. Afterwards, issue is unable to reproduce anymore during the dsp fw running period of times.
Once waiting the dsp fw be reloaded, noise issue was duplicated by (1) with failure 1/5 times.
I believe why customer reported recorder app were unpronounceable since app require the 48KHz as default.
plbossart commentedon Dec 17, 2019
@macchian why are you referring to 44.1 kHz? we don't support this frequency on the interface. Or are you referring to 44.100 MHz as an internal clock frequency?
very hard to figure out what you observed, can you please be more specific?
ranj063 commentedon Dec 17, 2019
@aiChaoSONG This looks like it may be a pause/release xrun. Its different and most likely a FW issue. Can you please file a new issue?
aiChaoSONG commentedon Dec 18, 2019
@ranj063 see here #2224
macchian commentedon Dec 24, 2019
@plbossart , I checked the PCM hw_params sample rate is fixed at 48KHz indeed when alsa record with 44.1KHz as you pointed out. However the strange thing is the noise only be observed in 1/5 failure rate when alsa record with 44.1KHz. Non reproducible with 48KHz.
I asked Realtek to do an experiment by codec loopback internally and requested the loopback script for our testing. Will update the test result later.
lancedkhou commentedon Jan 13, 2020
@plbossart
May I know which foil mentioned this information?
I would need written material for external communication.
23 remaining items
keyonjie commentedon Mar 12, 2020
@tlauda @jajanusz FYI.
plbossart commentedon Mar 12, 2020
I am having a hard-time with the results.
a) does the 'noise' problem ever happen without doing pause/release?
b) how does 'noise' appear when using an Audio Precision tester? Can you describe the setup?
c) our settings for rt5682 are all over the place:
sof-glk-rt5682.m4
sof-cml-rt5682.m4
sof-cml-rt1101-rt5682.m4
So if you use a bclk of 4.8 MHz you have to use 4 slots. I don't understand how you can use 2 slots, or that means that most of the frame if empty, and you possibly have a problem sampling the data at the right time?
aiChaoSONG commentedon Mar 13, 2020
@plbossart
a) No need to pause/release, just run arecord several times, noise will appear
c) I just found change bclk from 2.4MHz to 4.8 MHz, this issue disappeared. So we suspect that this issue should be related to SSP clock. 4.8MHz is not the final solution, let's leave this to FW team to see if there is any SSP register not properly configurated.
sathyap-chrome commentedon Mar 13, 2020
@plbossart The sof-rt5682.m4 is what is used for all CML using RT5682 (the rt1011 variant reuses this for RT5682 config. only speaker config is additional)
So i see only difference, GLK with MCLK 19.2 and CML with 24.
considering the same, i want to give a try if we can set MCLK to 19.2 on CML ( for test purpose using M/N support) and see if issue is still seen.
I've reached out to vendor too on codec behavior on the experiment from @aiChaoSONG
sathyap-chrome commentedon Mar 13, 2020
@aiChaoSONG can you try if below change works on CML ?
I'm trying to see if we can use MCLK as 19.2 ( hope M/N can take care of this ? )
aiChaoSONG commentedon Mar 13, 2020
@sathyap-chrome Changing mclk to 19200000 doesn't help with this issue, I got
tplg component load failedandfailed to instantiate cardsathyap-chrome commentedon Mar 13, 2020
Thankd for checking @aiChaoSONG
plbossart commentedon Mar 13, 2020
the only difference is a divider value.
we'd need to verify if indeed the MCLK is taken as the source clock for the codec PLL, if the behavior changes depending on the value of the BCLK, it means that either the BCLK is taken as a reference, or that the ratio between MCLK/BCLK should not be larger than a specific factor.
sathyap-chrome commentedon Mar 17, 2020
Update from codec vendor : based on our experiments, codec vendor make certain modifiation in driver to support 24M CLK and not use internal PLL and sees positive results. working on a clean patch for the same. will update here in couple of days
sathyap-chrome commentedon Mar 17, 2020
https://patchwork.kernel.org/patch/11441955/ is the fix from codec vendor for the issue.
Thanks to all for help in debug.
Closing the issue now.