Periodic popping noise on XUF208-128

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

Periodic popping noise on XUF208-128

Postby jimvaughan » Tue Nov 07, 2017 4:46 pm

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 Expert
Posts: 875
Joined: Thu May 27, 2010 10:08 am
Contact:

Postby infiniteimprobability » Wed Nov 08, 2017 10:20 am

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

Postby jimvaughan » Fri Nov 10, 2017 5:26 pm

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

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

Postby infiniteimprobability » Mon Nov 13, 2017 3:51 pm

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

Postby jimvaughan » Mon Nov 13, 2017 8:59 pm

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 Expert
Posts: 875
Joined: Thu May 27, 2010 10:08 am
Contact:

Postby infiniteimprobability » Tue Nov 14, 2017 11:10 am

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

Postby jimvaughan » Wed Nov 15, 2017 7:40 am

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

Postby jimvaughan » Wed Nov 15, 2017 7:41 am

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

Postby infiniteimprobability » Wed Nov 15, 2017 11:16 am

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

Postby jimvaughan » Wed Nov 15, 2017 4:23 pm

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.

Return to “Q&A”

Who is online

Users browsing this forum: No registered users and 9 guests