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.
Periodic popping noise on XUF208-128
-
- Member
- Posts: 8
- Joined: Tue Nov 07, 2017 4:41 pm
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 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.
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.
Engineer at XMOS
-
- Member
- Posts: 8
- Joined: Tue Nov 07, 2017 4:41 pm
Thanks for the reply. Any suggestions on how to go about debugging the ALSA layer?
Thanks,
Jim
Thanks,
Jim
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 am
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. ..
Engineer at XMOS
-
- Member
- Posts: 8
- Joined: Tue Nov 07, 2017 4:41 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.
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 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?
What board is it? Does it do it the same on our reference board?
Engineer at XMOS
-
- Member
- Posts: 8
- Joined: Tue Nov 07, 2017 4:41 pm
-
- Member
- Posts: 8
- Joined: Tue Nov 07, 2017 4:41 pm
Looks like the image upload didn't work. Is there another way I can send it to you?
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 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).
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).
Engineer at XMOS
-
- Member
- Posts: 8
- Joined: Tue Nov 07, 2017 4:41 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.
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.