I2S sync errors

Moderator: flatmax

Post Reply
abelian
Posts: 4
Joined: Sun Nov 26, 2017 5:00 am

I2S sync errors

Post by abelian » Wed Jan 24, 2018 6:25 pm

Running capture at 96k frames per second, I get frequent but irregular soundcard read errors, with errno saying 'Broken pipe'. Operation is restored by calling snd_pcm_prepare() again on the device.

Happens up to four times per hour, sometimes it will run for a couple of hours between occurances.

Each read error is associated with a kernel message:

bcm2835-i2s 3f203000.i2s: I2S SYNC error!

Running Rasbian 4.9.73-v7+ #1072 SMP.

Looking for suggestions to fix this.

flatmax
Posts: 609
Joined: Sat Jul 23, 2016 11:39 pm

Re: I2S sync errors

Post by flatmax » Thu Jan 25, 2018 7:51 pm

Yes - can you up the priority of the application in some way ? If you have programmed the application, then you can do it in a similar method to here :
https://github.com/flatmax2/gtkiostream ... ead.H#L160

Matt
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector

abelian
Posts: 4
Joined: Sun Nov 26, 2017 5:00 am

Re: I2S sync errors

Post by abelian » Thu Jan 25, 2018 8:54 pm

Thanks Matt,

Yes the root cause was with my application!

The I2S sync error messages appear to be a normal result of starting or restarting the ALSA read interface. Hence I get a sync error in dmesg every time the application gets a read error and calls snd_pcm_prepare().

The read errors turned out to be an overrun. The application is running real time priority but every so often writes to a log file on the SD card. This can sometimes be a little slow and blocks long enough for a read overrun. Moved the log file to RAM disk and it has run for over 12 hours now with no errors.

Also I'm finding that the sample rate is very stable. This is the 2nd Octo card I've tried. The first specimen (bought 8 months ago) had a clock that was quite unstable. This one bought recently is far better. The old one has oscillator markings L49.152 KSS OGF, the recent one has a TK49.152 NDK 12. I've not yet run it through the full temperature range but it looks very good so far.

I have to admit, this Octo card is working very well. Very clean inputs, cleaner than many studio grade PCI cards that I've tested. By far the best capture device for the Raspberry Pi. It's going to be a big hit for radio applications, music recording and scientific data collection if this stable sample rate is typical.

flatmax
Posts: 609
Joined: Sat Jul 23, 2016 11:39 pm

Re: I2S sync errors

Post by flatmax » Sat Feb 24, 2018 1:50 pm

Great to hear - thank you.

Matt
Check out our audiophile quality crossovers : https://bit.ly/2kb1nzZ
Please review the Zero sound card on Amazon USA : https://www.amazon.com/dp/B075V1VNDD
---
Check out our new forum on github : https://github.com/Audio-Injector

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests