-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I2S Sync error with 4.9.20 on Raspbian #1949
Comments
The I2S sync error is harmless, it has been there forever (when bcm2835-i2s is configured as clock slave). "DMA transfer could not be terminated" is the real issue, that usually occurs when a soundcard (acting as I2S clock master) fails to set up the clocks. I did a quick test here with the Cirrus Logic audio card (which is a I2S clock master as well) and couldn't reproduce the issue - 192kHz 32bit audio played fine with kenel 4.9.20 on RPi3.. |
@iqaudio @hifiberry @shawaj Have you seen any issues with high sample rates on 4.9 kernels? The rpi-update firmware currently includes 4.9.20. |
The Mambo and IQaudIO boards act as slave and still the issue with 192k and hang. According to a colleague of mine no issues with 4.9.20 and rates on Archlinux. I noticed that most recent release of Raspbian still on 4.4 so perhaps this is unique to Raspbian or the particular 2016-03-18 release that I'm using. Btw I used rpi-update to bump to 4.9.20. |
For this particular issue the distribution should be irrelevant with the same kernel and kernel config settings. |
Thats what I thought. |
Not had any reports of this here. What issue are you seeing? |
|
Did another test, with IQaudio DAC+ (I2S slave) on RPi2, Raspbian lite with all updates and all looks well. I tested with aplay, output looks like this:
@moodeaudio could you also check with aplay? |
@HiassofT, that result would suggest its not a 4.9 issue. You used J-Lite 2017-03-02 image then rpi-update, correct? |
@moodeaudio I've been testing with an older Raspbian lite Jessie release (probably end of 2016) with all package updates installed. Did an apt-get update/upgrade and rpi-update before the tests. I've tested with aplay and play, both worked fine. I also did another test with the current LibreELEC 8 tree (also on kernel 4.9.20) and the Cirrus Logic card on RPi3, 192kHz/32bit worked fine as well with kodi. At this point I wouldn't rule anything out, just trying to reproduce your issue. |
@HiassofT, I'm able to confirm a success case using 2017-03-02 J-Lite + apt update/upgrade + rpi-update to 4.9.20 and the generic audio test cmd below with IQ DAC+ and Mambo LS. Audio is fine. speaker-test -c 1 -r 192000 -F S32_LE -f 440 -t sine -l 1 But I have a side issue after I create a full Moode/MPD build on top of 2017-03-02 J-Lite + 4.9.20. The 96k rate sounds fine but 192 rate sounds at least 1/2 octave lower using the generic audio test cmds below. Also same result If I play a native 24/192 song file or resample everything to 24/192 using MPD/SoX. NOTE: no issue using 4.4.50. speaker-test -c 1 -r 96000 -F S32_LE -f 440 -t sine -l 1 (sounds fine) So I think "I2S SYNC error..." issue can be closed. Further investigation required to analyze the side issue since it seems tied to the particular combination of Moode full build / 4.9.20 / Raspbian latest release. |
@HiassofT, Below is a repro of the 192k / I2S SYNC / DMA issue using plain Raspbian and speaker-test util. The issue occurs after running the tvservice app. This app is run during Moode startup which explains why 192k was failing on full Moode build. --Start with latest 2017-03-02 Raspbian release sudo nano /boot/config.txt sudo apt-get update --This is the success case speaker-test -c 2 -r 192000 -F S32_LE -f 440 -t sine -l 1 speaker-test 1.0.28 Playback device is default --This is the failure case tvservice -o speaker-test -c 2 -r 192000 -F S32_LE -f 440 -t sine -l 1 speaker-test 1.0.28 Playback device is default DMESG |
@moodeaudio I followed the steps you outlined but still can't reproduce the issue. I did a fresh install of Raspbian Lite, had a (DVI) monitor connected, enabled ssh and ran the commands via ssh on a RPi2 with IQaudio dac plus (on a fresh boot, removed power before):
config.txt:
Edit: added the FW version info:
|
@HiassofT, try headless without monitor connected. |
@moodeaudio thanks, I've finally been able to reproduce the issue with the following setup:
Another interesting test:
@pelwell @popcornmix this looks like a clock or firmware issue, could you have a look at it? |
It sounds like a simple case of a clock being disabled when it shouldn't (or not being enabled when it should) - I hope it proves as simple to fix. Thanks for doing the legwork on this, @HiassofT. |
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
@pelwell 's fix is in latest rpi-update kernel. Can you test it fixes your problem? |
Yes of course, I will test and post back results asap. |
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
After retesting I can confirm that latest 4.9.24 via rpi-update fixes the issue. Many thanks! |
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: #1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
commit de8fc98 Author: Phil Elwell <phil@raspberrypi.org> Date: Wed Apr 26 17:28:47 2017 +0100 clk: bcm2835: Limit PCM clock to OSC and PLLD_PER It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: raspberrypi/linux#1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Gbp-Pq: Topic rpi Gbp-Pq: Name rpi_1236_de8fc98ea2924e33836dd30e3653d36fff13f5df.patch
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: raspberrypi#1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
commit 1e46658 Author: Phil Elwell <phil@raspberrypi.org> Date: Wed Apr 26 17:28:47 2017 +0100 clk: bcm2835: Limit PCM clock to OSC and PLLD_PER It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: raspberrypi/linux#1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Gbp-Pq: Topic rpi Gbp-Pq: Name rpi_1238_1e466581a64f5b7e42b404aa0a935be01a29aed1.patch
I am also having this issue, but only when trying to use jackd together with a HiFiBerry Digi+ I/O or a HiFiBerry Digi+ pro. It doesn’t happen with regular HiFiBerry, or IQAudioDAC. I checked with two OS, Raspbian with kernel 4.14.71 and my own build root build with kernels 4.14.34 and 4.14.74. Jack startup looks ok but jackd fails shortly after: ... JackAudioDriver::ProcessAsync: read error, stopping... When that comes, dmesg shows: The problem is confirmed with two different cards respectively and two different pis. |
commit 1e46658 Author: Phil Elwell <phil@raspberrypi.org> Date: Wed Apr 26 17:28:47 2017 +0100 clk: bcm2835: Limit PCM clock to OSC and PLLD_PER It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: raspberrypi/linux#1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Gbp-Pq: Topic rpi Gbp-Pq: Name rpi_1238_1e466581a64f5b7e42b404aa0a935be01a29aed1.patch
+1 |
Hi, Of course the solution (in my case) was stupid simple: Run alsamixer and unmute (press M) on the "Output Mixer HiFi" so it shows "oo". Then run sudo alsactl store to enable these settings post-reboot. I have put an issue on the audioinjector forum as this should be included, at the very least, in the setup instructions. My theory: dma termination won't work if there is no endpoint. And that endpoint, for some reason beyond my understanding, doesn't exist/enumerate/etc. until the target output is UN-muted. Tl;dr: play around with alsamixer settings for your particular sound card and see if it fixes this. |
It is unwise to use sources other than the oscillator and PLLD_PER for the PCM peripheral (and perhaps others - TBD) because their rate can change and they may even be switched off, so explicitly restrict the choice using dummy entries in the list of potential parents (item index is significant). See: raspberrypi/linux#1949 Signed-off-by: Phil Elwell <phil@raspberrypi.org> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Hi,
With 4.9.20 on Raspbian (2016-03-18 release) I see "I2S SYNC error!" in DMESG, no audio and unresponsive system when feeding 192k sample rate via MPD/SoX to I2S audio devices.
Tested with Pi2 and 3, Mamboberry LS, IQaudIO DAC PRO, Hifiberry DAC Pro. Rates less than 192k work ok and all rates work ok with 4.4.50.
[ 19.900705] bcm2835-i2s 3f203000.i2s: I2S SYNC error!
[ 30.566913] bcm2835-dma 3f007000.dma: DMA transfer could not be terminated
-Tim
The text was updated successfully, but these errors were encountered: