Periodic popping noise on XUF208-128

If you have a simple question and just want an answer.
jimvaughan
Member
Posts: 8
Joined: Tue Nov 07, 2017 4:41 pm

Periodic popping noise on XUF208-128

Post 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.


User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post 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.
jimvaughan
Member
Posts: 8
Joined: Tue Nov 07, 2017 4:41 pm

Post by jimvaughan »

Thanks for the reply. Any suggestions on how to go about debugging the ALSA layer?

Thanks,
Jim
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post 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. ..
jimvaughan
Member
Posts: 8
Joined: Tue Nov 07, 2017 4:41 pm

Post 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.
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post 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?
jimvaughan
Member
Posts: 8
Joined: Tue Nov 07, 2017 4:41 pm

Post 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
jimvaughan
Member
Posts: 8
Joined: Tue Nov 07, 2017 4:41 pm

Post by jimvaughan »

Looks like the image upload didn't work. Is there another way I can send it to you?
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post 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).
jimvaughan
Member
Posts: 8
Joined: Tue Nov 07, 2017 4:41 pm

Post 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.
Post Reply