sonic-pi-net / sonic-pi

Code. Music. Live.
https://sonic-pi.net
Other
10.74k stars 918 forks source link

Error Sonic Pi with i2s DACs #2136

Open slaattnes opened 5 years ago

slaattnes commented 5 years ago

After installing i2s DAC support on Raspbian Buster Sonic Pi 3.1.0 will not start.

I've installed DAC with curl -sS https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/i2samp.sh | bash which adds dtoverlay=hifiberry-dac dtoverlay=i2s-mmap and comments out dtparam=audio=on in /boot/config.txt

Error log:

`Sonic Pi Boot Error Report

System Information

GUI Log

/home/pi/.sonic-pi/log/gui.log

[GUI] - Detecting port numbers...
[GUI] - GUI OSC listen port 4558
[GUI] -    port: 4558 [OK]
[GUI] - Server OSC listen port 4557
[GUI] -    port: 4557 [OK]
[GUI] - Server incoming OSC cues port 4559
[GUI] -    port: 4559 [OK]
[GUI] - Scsynth port 4556
[GUI] -    port: 4556 [OK]
[GUI] - Server OSC out port 4558
[GUI] - GUI OSC out port 4557
[GUI] - Scsynth send port 4556
[GUI] - Erlang router port 4560
[GUI] -    port: 4560 [OK]
[GUI] - OSC MIDI out port 4561
[GUI] -    port: 4561 [OK]
[GUI] - OSC MIDI in port 4562
[GUI] -    port: 4562 [OK]
[GUI] - Init script completed
[GUI] - using default editor colours
[GUI] - launching Sonic Pi Server:
[GUI] - starting UDP OSC Server on port 4558...
[GUI] - UDP OSC Server ready and listening
[GUI] - Ruby server pid registered: 1759
[GUI] - waiting for Sonic Pi Server to boot...
............................................................
[GUI] - Critical error! Could not boot Sonic Pi Server.
[GUI] - stopping UDP OSC Server...
[GUI] - UDP OSC Server no longer listening

Server Errors

/home/pi/.sonic-pi/log/server-errors.log

Failed to load the fast_osc c-extension, falling back to pure Ruby version
Overriding fast_osc c-extension FastOsc::decode_single_message, falling back to pure Ruby version
ruby: No such file or directory -- /usr/app/server/ruby/bin/task-register.rb (LoadError)

ATTENTION: The playback device "hw:0" is already in use. Please stop the application using it and run JACK again
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
ruby: No such file or directory -- /usr/app/server/ruby/bin/task-register.rb (LoadError)
ruby: No such file or directory -- /usr/app/server/ruby/bin/task-register.rb (LoadError)
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel

ATTENTION: The playback device "hw:0" is already in use. Please stop the application using it and run JACK again
JackTemporaryException : now quits...
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
terminate called without an active exception

Server Output

/home/pi/.sonic-pi/log/server-output.log

Sonic Pi server booting...
Using protocol: udp
Detecting port numbers...
Send port: 4558
Listen port: 4557
  - OK
Scsynth port: 4556
  - OK
Scsynth send port: 4556
  - OK
OSC cues port: 4559
  - OK
Erlang port: 4560
  - OK
OSC MIDI out port: 4561
  - OK
OSC MIDI in port: 4562
  - OK
Booting server...

Booting Sonic Pi
----------------

Booting on Raspberry Pi
Jackd not running on system. Starting...
jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|2048|3|44100|0|2|nomon|swmeter|-|32bit
Released audio card Audio0
audio_reservation_finish
Boot - Starting the SuperCollider server...
Boot - scsynth -u 4556 -m 131072 -a 1024 -D 0 -R 0 -l 1 -i 2 -o 2 -z 128 -c 128 -U /usr/lib/SuperCollider/plugins:/usr/app/server/native/extra-ugens/ -b 4096 -B 127.0.0.1

Scsynth Output

/home/pi/.sonic-pi/log/scsynth.log

# Starting SuperCollider 2019-09-12 20:47:20
Found 0 LADSPA plugins
*** ERROR: open directory failed '/usr/app/server/native/extra-ugens/': No such file or directory
jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
Released audio card Audio0
audio_reservation_finish
could not initialize audio.

Process Log

/home/pi/.sonic-pi/log/processes.log

`

slaattnes commented 5 years ago

With the same setup Sonic Pi works on the 2019-04-08-raspbian-stretch image

rbnpi commented 5 years ago

Where did you get Sonic Pi 3.1 from? It has not been released for buster on Rsspberry Pi. The stretch version will not work. However you can build it (or later 3.2dev) from source which I have done see this url. https://in-thread.sonic-pi.net/t/building-sp3-2dev-from-source-on-a-pi4/2645

My build works fine with the IQaudio card on i2s so the hifiberry cards should be fine too.