Page 1 of 2

Periodic popping noise on XUF208-128

Posted: Tue Nov 07, 2017 4:46 pm
by jimvaughan
Hi,

I'm working with a board that has a XUF208-128-TQ64 and is connected to a Linux machine by USB. When playing one stream it works well, but when two streams are sent, there is a popping noise with an approximate 2 second interval.

Any suggestions?

Thanks, Jim.

Re: Periodic popping noise on XUF208-128

Posted: Wed Nov 08, 2017 10:20 am
by infiniteimprobability
Periodic popping could be buffer under-run or over-run caused by mismatch of clocks. The xmos USB audio uses asynchronous clocking meaning that the sound card is the clock master. So normally the host will read/write samples at a rate defined by the device's clock.

If it works playing a single stream but not multiple then it sounds to me like the OS audio layer (normally ALSA) isn't handling the rate matching properly.

Re: Periodic popping noise on XUF208-128

Posted: Fri Nov 10, 2017 5:26 pm
by jimvaughan
Thanks for the reply. Any suggestions on how to go about debugging the ALSA layer?

Thanks,
Jim

Re: Periodic popping noise on XUF208-128

Posted: Mon Nov 13, 2017 3:51 pm
by infiniteimprobability
I'm afraid not (I'm not an expert in that area) - I'm not sure if you explicitly need to add an ASRC or intermediate device if you have multiple playback sources. I'm actually surprised though - I would have though the OS would be configured to support multiple streams. ..

Re: Periodic popping noise on XUF208-128

Posted: Mon Nov 13, 2017 8:59 pm
by jimvaughan
After more testing, I have discovered that popping noise occurs when only one stream is being played, it just takes longer to manifest itself.

Re: Periodic popping noise on XUF208-128

Posted: Tue Nov 14, 2017 11:10 am
by infiniteimprobability
Can you get a capture of what happens to a sinewave when it pops? This could help reveal more.

What board is it? Does it do it the same on our reference board?

Re: Periodic popping noise on XUF208-128

Posted: Wed Nov 15, 2017 7:40 am
by jimvaughan
I can't upload an audio sample to this forum, but here is a screenshot of 1001Hz with the pop at the red line.
We are using a custom board.
Image

Re: Periodic popping noise on XUF208-128

Posted: Wed Nov 15, 2017 7:41 am
by jimvaughan
Looks like the image upload didn't work. Is there another way I can send it to you?

Re: Periodic popping noise on XUF208-128

Posted: Wed Nov 15, 2017 11:16 am
by infiniteimprobability
Upload worked OK - it's a little difficult to see but looks like the sine is discontinuous. This indicates buffer under/overflow. This would be different from a USB side issue where corrupted packets would be a glitch with no phase change of the sine.

If it's a custom board then that also means the software will have been changed. On some systems where there are 2 MCLKs (one for each tile) where the XUD tile MCLK is disconnected, streaming still works but feedback calc is incorrect leading to buffer level issues and the sort of issue you are seeing. However, it looks like you are using the XUF208 which only has a single MCLK - please confirm this..

So it's a case of working out what changes you have made to the reference firmware (which will run indefinitely without buffer over/underflow) and checking hardware (clocks would be the most obvious things to check).

Re: Periodic popping noise on XUF208-128

Posted: Wed Nov 15, 2017 4:23 pm
by jimvaughan
Thanks again for the reply

I should also point out there is a frequency shift, the input sample is 1001Hz, but when frequency analysis is done on the output, it peaks at 1003Hz. I don't believe that is a problem in itself.

It is an XUF209-128-TQ64. I can send you the schematic, but I cannot post it publicly.

I didn't personally work on the firmware, but I believe the changes from reference were basically configuration options to get a rate of 48000. I can send you it if it helps - again I cannot post it publicly.