# HiFiBerry Digi+ / I2S SYNC error

**URL:** <https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372>\
**Category:** Pi MusicBox (archive)\
**Created:** [November 27, 2014, 2:05pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372 "2014-11-27T14:05:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![UweK](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/uwek/32/58_2.png) [@UweK](https://discourse.mopidy.com/u/UweK)\
**Post date:** [November 27, 2014, 2:05pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/1 "2014-11-27T14:05:17Z")

</div>

Hello,  
I tried to install Pi Musicbox on my B+ with the HiFiBerry Digi+ module for some weeks now. I always get the same error and no sound over spdif or toslink:

```
bcm2708-i2s bcm2708-i2s.0: I2S SYNC error!

```

Here is what I did:

I tried the latest stable Image of Pi Musicbox and also the Prerelease versions (last one was musicbox0.5.1rc2.img). After installation I get sound over HDMI. I checked the Digi+ module with the test image from HiFiBerry - it also works and prodcues the test tone over spdif and toslink. So basically Pi Musicbox installation and the Digi+ module seem to be okay.

I updated /etc/modules:

```
snd_bcm2835
snd_soc_bcm2708_i2s
bcm2708_dmaengine
snd_soc_hifiberry_digi
ipv6
bcm2708_wdog

```

and changed the settings.ini of the Pi Musicbox:

```
output = hifiberry_digi

```

The Pi Musicbox still automatically selects the HDMI output and ignores the Digi+ although it recognizes the presence of the Hifiberry digi. So I checked /opt/musicbox/setsound.sh – the script looks for the device  
identification snd-rpi-hifiberry-digi:

```
elif [[${dev[1]} == "snd-rpi-hifiberry-digi" ]]; then

```

but the id supplied is simply snd-hifiberry-digi, so I changed it to:

```
elif [[${dev[1]} == "snd-hifiberry-digi" ]]; then

```

After rebooting the right output is selected but the SYNC error is shown and no sound at all.

```
bcm2708-i2s bcm2708-i2s.0: I2S SYNC error!

```

I posted this topic on the HiFiBerry support forum before but Daniel from the forum asked me to investigate in this forum. You can find more informations in my [post there](http://www.hifiberry.com/forums/topic/digi-and-pimusicbox-sync-error/)

Any help would be appreciated.  
Thanks in advance, Uwe

---

<div class="post-metadata">

**Author:** ![renekreijveld](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/renekreijveld/32/56_2.png) [@renekreijveld](https://discourse.mopidy.com/u/renekreijveld)\
**Post date:** [November 27, 2014, 2:13pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/2 "2014-11-27T14:13:55Z")

</div>

Uwe, checkout this thread. Maybe this can help you: [Will it run out-of-the-box on a RPI B+?](https://discourse.mopidy.com/t/will-it-run-out-of-the-box-on-a-rpi-b/351)

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [November 27, 2014, 4:50pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/3 "2014-11-27T16:50:08Z")

</div>

Aside from Mopidy, shairport is the other process possibly using the soundcard. You’d maybe need to comment out the bottom part of `/etc/monit/monitrc` to prevent monit from automatically restarting it once you kill it.

---

<div class="post-metadata">

**Author:** ![UweK](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/uwek/32/58_2.png) [@UweK](https://discourse.mopidy.com/u/UweK)\
**Post date:** [November 28, 2014, 9:36am UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/4 "2014-11-28T09:36:15Z")

</div>

Rene, thank you for the hint. I read your post before (and a lot other posts, too) and I think I did it all the same way, you did. Except that I use the Digi+ instead of the Dac plus. So I set `output = hifiberry_digi` instead of `hifiberry_dacplus`. The strange thing is that the Digi+ was still ignored so I had to change setsound.h as shown in my first post.

---

<div class="post-metadata">

**Author:** ![UweK](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/uwek/32/58_2.png) [@UweK](https://discourse.mopidy.com/u/UweK)\
**Post date:** [November 28, 2014, 9:44am UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/5 "2014-11-28T09:44:31Z")

</div>

Shairport is disabled by default but I also removed it from the monitrc. Still no difference. Maybe there is some problem with my configuration:

```
root@MusicBox:~# lsmod
Module Size Used by
iptable_filter 1485 1 
xt_REDIRECT 1968 1 
xt_tcpudp 2110 2 
iptable_nat 2607 1 
nf_conntrack_ipv4 12965 1 
nf_defrag_ipv4 1491 1 nf_conntrack_ipv4
nf_nat_ipv4 3630 1 iptable_nat
nf_nat 15166 3 nf_nat_ipv4,xt_REDIRECT,iptable_nat
nf_conntrack 87622 4 nf_nat,nf_nat_ipv4,iptable_nat,nf_conntrack_ipv4
ip_tables 11694 2 iptable_filter,iptable_nat
x_tables 17030 4 ip_tables,xt_tcpudp,iptable_filter,xt_REDIRECT
bcm2708_wdog 3545 1 
ipv6 316254 20 
snd_soc_hifiberry_digi 2572 0 
snd_soc_wm8804 7932 1 
snd_soc_pcm512x 9034 0 
snd_soc_bcm2708_i2s 6210 2 
regmap_mmio 2818 1 snd_soc_bcm2708_i2s
snd_soc_core 127849 4 snd_soc_pcm512x,snd_soc_wm8804,snd_soc_hifiberry_digi,snd_soc_bcm2708_i2s
snd_compress 8259 1 snd_soc_core
regmap_i2c 1661 3 snd_soc_pcm512x,snd_soc_wm8804,snd_soc_core
snd_pcm_dmaengine 5505 1 snd_soc_core
regmap_spi 1913 3 snd_soc_pcm512x,snd_soc_wm8804,snd_soc_core
snd_pcm 83845 3 snd_soc_core,snd_pcm_dmaengine
snd_page_alloc 5132 1 snd_pcm
snd_seq 55484 0 
snd_seq_device 6469 1 snd_seq
snd_timer 20998 2 snd_pcm,snd_seq
leds_gpio 2079 0 
led_class 4118 1 leds_gpio
snd 62252 7 snd_soc_core,snd_timer,snd_pcm,snd_seq,snd_seq_device,snd_compress
i2c_bcm2708 4943 0 
root@MusicBox:~# cat /sys/class/sound/card*/device/modalias
platform:snd-hifiberry-digi
root@MusicBox:~# aplay -l
****List of PLAYBACK Hardware Devices****
card 0: sndrpihifiberry [snd_rpi_hifiberry_digi], device 0: HifiBerry Digi HiFi wm8804-spdif-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
root@MusicBox:~# cat /etc/asound.conf
pcm.!default {
    type hw
    card 0
}
ctl.!default {
    type hw
    card 0
}
root@MusicBox:~# cat /etc/modules
# /etc/modules: kernel modules to load at boot time.

#snd_bcm2835
snd_soc_bcm2708_i2s
bcm2708_dmaengine
snd_soc_hifiberry_digi

ipv6
bcm2708_wdog

#8188eu
#8192cu
root@MusicBox:~# cat /etc/modprobe.d/raspi-blacklist.conf 
# blacklist spi and i2c by default (many users don't need them)

blacklist spi-bcm2708
#blacklist i2c-bcm2708
blacklist snd_soc_tas5713
```

---

<div class="post-metadata">

**Author:** ![funt0mas](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@funt0mas](https://discourse.mopidy.com/u/funt0mas)\
**Post date:** [November 30, 2014, 6:37pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/6 "2014-11-30T18:37:46Z")

</div>

I have same issue. I previously used version 0.5 and with help of [this](https://github.com/woutervanwijk/Pi-MusicBox/issues/100) thread I was able to listen through SPDIF. Can somebody to guide me how can I fix this in version 0.5.1rc2?

---

<div class="post-metadata">

**Author:** ![woutervanwijk](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/woutervanwijk/32/15_2.png) [@woutervanwijk](https://discourse.mopidy.com/u/woutervanwijk)\
**Post date:** [November 30, 2014, 8:20pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/7 "2014-11-30T20:20:38Z")

</div>

cannot test this, don’t have a Digi+…

---

<div class="post-metadata">

**Author:** ![hifiberry](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/hifiberry/32/63_2.png) [@hifiberry](https://discourse.mopidy.com/u/hifiberry)\
**Post date:** [December 8, 2014, 7:30pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/8 "2014-12-08T19:30:23Z")

</div>

Hi Wouter,

the configuration of the Digi and Digi+ is the same. Both boards are based on the same hardware, only the form factor is different. Do you have a Digi? I can also provide a Digi+ to you if you want to test this.

Best regards  
Daniel

---

<div class="post-metadata">

**Author:** ![robvtrickey](https://avatars.discourse-cdn.com/v4/letter/r/df788c/32.png) [@robvtrickey](https://discourse.mopidy.com/u/robvtrickey)\
**Post date:** [January 18, 2015, 7:23pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/9 "2015-01-18T19:23:33Z")

</div>

I have this same issue as well.

I noticed that as well as the sync error message, I was also getting ‘DMA transfer could not be terminated’ which would also prevent alsa force-reload from working once I had attempted to play any sound.

The same error would crop up again during shutdown - I don’t really understand these things, but I think something to do with the bcm2708\_dmaengine driver is locking the digi somehow and not releasing.

I’ve hit the limit of my understanding/googling, so have given up and gone back to volumio (which is nowhere near as good - but I can get it to play music) ☹

---

<div class="post-metadata">

**Author:** ![Daniel\_Swenson](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/daniel_swenson/32/87_2.png) [@Daniel\_Swenson](https://discourse.mopidy.com/u/Daniel_Swenson)\
**Post date:** [February 12, 2015, 11:42am UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/10 "2015-02-12T11:42:53Z")

</div>

Hey this is how i got my Pi Musicbox on my B+ with the HiFiBerry Digi+ to work.

1. Chose sound card HiFiBerry Digi
2. restart it it won’t work directly.
3. ssh into it  
ssh root@ip
4. aplay -l check the card number of HiFiBerry Digi+
5. change asound.conf with the above card nummber  
nano /etc/asound.conf  
pcm.!default {  
type hw  
card 1  
}  
ctl.!default {  
type hw  
card 1  
}
6. Stop mopidy  
service mopidy stop  
7 reload alsa  
alsa force-reload
7. Start mopidy  
service mopidy start

Now it works:)

You have to do it every time you restart but after some time you get very fast at it 😄

---

<div class="post-metadata">

**Author:** ![peter\_nicolai](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@peter\_nicolai](https://discourse.mopidy.com/u/peter_nicolai)\
**Post date:** [March 28, 2015, 2:53pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/11 "2015-03-28T14:53:49Z")

</div>

Hi,  
This works!  
Changing the asound.conf did the trick.  
Is there someone who can make this work after a reboot?  
Or tell me the how to fix it.  
Maybe Wouter van Wijk himself?  
Please help!  
Musicbox is fantastic, but i need this digital output!

Regards, Peter

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [March 28, 2015, 3:14pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/12 "2015-03-28T15:14:49Z")

</div>

Someone with a digi+ needs to provide the output of ‘aplay -l’

---

<div class="post-metadata">

**Author:** ![peter\_nicolai](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@peter\_nicolai](https://discourse.mopidy.com/u/peter_nicolai)\
**Post date:** [March 28, 2015, 3:47pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/13 "2015-03-28T15:47:53Z")

</div>

Hi,

I have to manualy type this…

\*\*\*\* List of PLAYBACK Hardware Devices \*\*\*\*\*  
Card 0: ALSA [bcm2835 ALSA] device 0: bcm2835 ALSA [bcm2835 ALSA]  
Subdevices: 8/8  
Subdevice #0: subdevice #0  
Subdevice #0: subdevice #1  
Subdevice #0: subdevice #2  
Subdevice #0: subdevice #3  
Subdevice #0: subdevice #4  
Subdevice #0: subdevice #5  
Subdevice #0: subdevice #6  
Subdevice #0: subdevice #7  
card 0: ALSA [bcm2835 ALSA], device 1 bcm2835 ALSA [bcm2835 IEC958/HDMI]  
Subdevices: 1/1  
Subdivice #0: subdevice #0  
card 1: sndrpihifiberry [sbd\_rpi\_hifiberry\_digi], device 0; HifiBerry Digi HiFi wm8804-spdif-0 []  
Subdevices: 1/1  
Subdivice #0: subdevice #0

this is for the HiFi Digital DAC PiCobbe from Geekroo

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [March 28, 2015, 4:05pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/14 "2015-03-28T16:05:23Z")

</div>

And you are saying the very latest version of [setsound.sh](http://setsound.sh) (from github)  
doesn’t detect it when you specify hifiberry\_digi in the settings?

---

<div class="post-metadata">

**Author:** ![peter\_nicolai](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@peter\_nicolai](https://discourse.mopidy.com/u/peter_nicolai)\
**Post date:** [March 28, 2015, 4:27pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/15 "2015-03-28T16:27:25Z")

</div>

Hi kingosticks,  
I am not sure if i use the latest version [setsound.sh](http://setsound.sh)  
I installed a fresh image from musicbox0.5.3 so i think i have the latest version.  
Linux is new for me… but i am trying…

it keeps playing over my HDMI port  
but if i use the sollution from Daniel Swenson (post of 12feb) it works ok, but after a reboot musicbox plays over HDMI again.

I would like to have the setting fixed.

---

<div class="post-metadata">

**Author:** ![peter\_nicolai](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@peter\_nicolai](https://discourse.mopidy.com/u/peter_nicolai)\
**Post date:** [March 28, 2015, 8:18pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/16 "2015-03-28T20:18:25Z")

</div>

Hi,  
i managed to find your [setsound.sh](http://setsound.sh)  
[https://raw.githubusercontent.com/woutervanwijk/Pi-MusicBox/master/filechanges/opt/musicbox/setsound.sh](https://raw.githubusercontent.com/woutervanwijk/Pi-MusicBox/master/filechanges/opt/musicbox/setsound.sh)

i will try again.

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [March 28, 2015, 8:32pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/17 "2015-03-28T20:32:09Z")

</div>

Thats the one. dont forget to make the new version executable with `chmod +x /opt/musicbox/setsound.sh`

---

<div class="post-metadata">

**Author:** ![peter\_nicolai](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@peter\_nicolai](https://discourse.mopidy.com/u/peter_nicolai)\
**Post date:** [March 28, 2015, 8:48pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/18 "2015-03-28T20:48:53Z")

</div>

fresh image installed  
set output to hifiberry-digi

root@MusicBox:~# aplay -l  
\*\*\*\* List of PLAYBACK Hardware Devices \*\*\*\*  
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]  
Subdevices: 8/8  
Subdevice #0: subdevice #0  
Subdevice #1: subdevice #1  
Subdevice #2: subdevice #2  
Subdevice #3: subdevice #3  
Subdevice #4: subdevice #4  
Subdevice #5: subdevice #5  
Subdevice #6: subdevice #6  
Subdevice #7: subdevice #7  
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]  
Subdevices: 1/1  
Subdevice #0: subdevice #0  
card 1: sndrpihifiberry [snd\_rpi\_hifiberry\_digi], device 0: HifiBerry Digi HiFi wm8804-spdif-0 []  
Subdevices: 1/1  
Subdevice #0: subdevice #0  
root@MusicBox:~#

copy-pasted this via ssh into [setsound.sh](http://setsound.sh) with nano (did not know how to copy via putty)  
[https://raw.githubusercontent.com/woutervanwijk/Pi-musicBox/master/filechanges/opt/musicbox/setsound.sh](https://raw.githubusercontent.com/woutervanwijk/Pi-musicBox/master/filechanges/opt/musicbox/setsound.sh)

reboot

Start a stream:

On the HDMI monitor: [188.801121] bcm2708-i2s bmc2708-i2s.0: I2S SYNC error!

Oh… just saw your post… chmod +x /opt/musicbox/setsound.sh  
no response like ok or something just a command prompt.

lets try…

Reboot…  
wait…  
start a stream  
nope… again: bcm2708-i2s bmc2708-i2s.0: I2S SYNC error!

root@MusicBox:~# aplay -l  
\*\*\*\* List of PLAYBACK Hardware Devices \*\*\*\*  
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]  
Subdevices: 8/8  
Subdevice #0: subdevice #0  
Subdevice #1: subdevice #1  
Subdevice #2: subdevice #2  
Subdevice #3: subdevice #3  
Subdevice #4: subdevice #4  
Subdevice #5: subdevice #5  
Subdevice #6: subdevice #6  
Subdevice #7: subdevice #7  
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]  
Subdevices: 1/1  
Subdevice #0: subdevice #0  
card 1: sndrpihifiberry [snd\_rpi\_hifiberry\_digi], device 0: HifiBerry Digi HiFi wm8804-spdif-0 []  
Subdevices: 0/1  
Subdevice #0: subdevice #0  
root@MusicBox:~#

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [March 28, 2015, 9:58pm UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/19 "2015-03-28T21:58:01Z")

</div>

Just so we are 100% clear. You need to completely replace the old version  
of [setsound.sh](http://setsound.sh) with the one from github. You then need to make the file  
executable. You then need to set hifiberry\_digi (underscore, I think, not  
hyphen) in settings.ini and reboot.

---

<div class="post-metadata">

**Author:** ![peter\_nicolai](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@peter\_nicolai](https://discourse.mopidy.com/u/peter_nicolai)\
**Post date:** [March 29, 2015, 9:07am UTC](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372/20 "2015-03-29T09:07:39Z")

</div>

Yes, but i did the setting to hifiberry-digi first.

First tried with original [setsound.sh](http://setsound.sh), and setting audio output to hifiberry-digi. update and reboot…  
this didn’t work. (i checked its setting in settings.ini)  
I did edit the file [setsound.sh](http://setsound.sh) . Removed all lines and then pasted your [setsound.sh](http://setsound.sh) lines into the old file.  
saved it (ctrl-o)  
chmod +x [setsound.sh](http://setsound.sh)  
did a reboot.  
Tried to play a stream and then i got the i2s sync error.

info:  
Raspberry pi model B  
DAC: Geekroo Digital DAC HiFi Picobber Using WM8804G

[Next page](https://discourse.mopidy.com/t/hifiberry-digi-i2s-sync-error/372.md?page=2)
