Random popping noise from speaker

Discussions about USB Audio on XMOS devices
ilkerxlm
Junior Member
Posts: 5
Joined: Mon Dec 02, 2024 7:03 pm

Random popping noise from speaker

Post by ilkerxlm »

Hi community,

I have USB to 16 channel TDM (2 wires, 8ch per wire) interface to DAC. I generated 16 channel audio file using Audacity to test the outputs. I'm pretty happy with the audio quality.
Except... I hear random popping sound from speakers. It happens with random intervals (2-5 seconds) on few speakers and/or on all of them. When I constantly change the sytem volume I continuesly hear the popping sound.

I'm using XU316-1024-QF60B and software is based on lib_xua example. Using async USB, 32-bit@48KHz samples and clock to DACs is produced by XU316-1024-QF60B. Tested on Windows11/MacOS/Linux(Ubuntu).

Things I tried/tested so far but got no result:
  • Verified that every power rail is stable and is within the recommended limits
  • Verified that TDM line is behaving as expected
  • Have precise master clock out of XU316-1024-QF60B
  • System clock is set to 600MHz. Tried to set it to 800MHz (I'm using XU316-1024-QF60B-I32, which can handle 800MHz)
  • Using 8 channel TDM (1 wire) and same result
Did anyone experience this issue before or any suggestion on how to solve this?
User avatar
infiniteimprobability
Verified
XCore Legend
Posts: 1152
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

Hi, sounds like you have tried most sensible things. The design should easily handle 16 channels at 48kHz and we test up to 32 channels anyway. Increasing the clock to 800MHz temporarily is a good strategy for checking for code timing marginalities and that didn't change the behaviour. So it is likely something different causing the issue.

The frequency of the popping event might suggest it's a buffering under/overflow. You don't describe the hardware but it sounds like a custom board if you are using the QF60B. What is very important is that the MCLK signal not only goes to the I2S tile but also the USB tile (and that port is assigned properly as MCLK2)- the reason is that the USB tiles needs to keep a count of the MCLKs so it can work out the feedback value to send to the host as the async feedback. Can you confirm this is connected properly on your HW?

What I don't immediately understand is why a volume change would also cause the popping. Volume changes cause EP0 to talk to the buffering thread to change volume multipliers. It does that directly and so large changes in volume might be audible as the gain step changes but I certainly wouldn't call that a popping noise.

Something that would be very helpful would be to see a WAV file of the noise. I find playing a low frequency sine (say 40Hz) and recording the result says a lot. If it is buffer under/overflow you should see a step change in the phase at that point or some zeros inserted. You may get a bit of ringing as the DAC sees the discontinuity but lower frequency test tones make the visible result more analysable.

If you post this we could take a look to see if buffer issues are the problem.

Ed
Engineer at XMOS
ilkerxlm
Junior Member
Posts: 5
Joined: Mon Dec 02, 2024 7:03 pm

Post by ilkerxlm »

Hi Ed, thanks for your reply. The problem was indeed a missing physical connection of MCLK from audio tile to USB tile. After connecting them together, problem is solved.
User avatar
infiniteimprobability
Verified
XCore Legend
Posts: 1152
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

That's great news! Thanks for feeding back what the root cause was. I hope the rest of the design goes well.
Engineer at XMOS