-
mdoepfer
Hi guys,
I am trying to get Pure Data working on my Raspberry Pi (Modelwith no success so far. I am running the latest regular Raspbian Wheezy distribution.
I have an external USB duplex audio card connected (Griffin iMic). Sound is working fine in ALSA (so aplay, arecord, alsamixer, etc. all work fine). I also installed Jack2 (from the Pi audio repository) and tested this with various synths and MIDI input - no problem so far!
Now onto Pure Data. I installed the vanilla version like this:
http://log.liminastudio.com/programming/running-puredata-on-the-raspberry-pi
I could load it up, but when I select "Alsa" as audio driver, I immediately get "ALSA output error (snd_pcm_open) Device or resource busy". This happens no matter if I choose plug or hardware in the audio selection, even when selecting the internal sound card (bcm...) or disabling input, using output playback only.
The same issues when starting pd from the command line (eg. with -noadc -nogui -alsa test.pd). I know about the issue with the delayed initialisation of the dsp when running in nogui mode, but as I said, pd does not even work in GUI mode.Maybe another process is using ALSA? I ran "fuser -v /dev/snd/*" but nothing showed up. As I said, other ALSA applications like asound as well as synthesizers run fine.
Then I tested the Jack interface (with jackd running in the background), but pd hangs immediately after selecting this entry in the audio menu (while jackd continues to work without error).I also tried installing pd-extended (after this instructions: http://log.liminastudio.com/writing/tutorials/how-to-build-pd-extended-on-the-raspberry-pi) and while the installation itself was successful and the program can be started, I still get the error message above.
"/proc/asound/cards" yields my USB audio as device 0 and the internal sound as 1. I tried disabling the onboard sound, no difference. I also tried the "alsaadd default" option, but that did also not help.
Do you have any ideas what I could try? Any more information I could provide? I know that many people use puredata (vanilla or pd-extended) in exactly this configuration (pi, raspbian wheezy, imic), so it must be something very simple I think
Thanks for any input!
Mike D
-
mdoepfer
Argl, I think I am going mad
Just rebooted, now the output from puredata with GUI (and no input) is:
ALSA input error (restart failed): File descriptor in bad state
output snd_ocm_delay failed: File descriptor in bad state
astate 1
audio I/O stuck.. closing audioThis is the output of "cat /proc/asound/cards":
0 [system ]: USB-Audio - iMic USB audio system Griffin Technology, Inc iMic USB audio system at usb-bcm2708_usb-1.3.1.1, full
1 [ALSA ]: BRCM bcm2835 ALSbcm2835 ALSA - bcm2835 ALSA bcm2835 ALSAThis is the output of "aplay -l":
**** List of PLAYBACK Hardware Devices ****
card 0: system [iMic USB audio system], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: 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 #7This is the output of "aplay -L":
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
sysdefault:CARD=system
iMic USB audio system, USB Audio
Default Audio Device
front:CARD=system,DEV=0
iMic USB audio system, USB Audio
Front speakers
surround40:CARD=system,DEV=0
iMic USB audio system, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=system,DEV=0
iMic USB audio system, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=system,DEV=0
iMic USB audio system, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=system,DEV=0
iMic USB audio system, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=system,DEV=0
iMic USB audio system, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=system,DEV=0
iMic USB audio system, USB Audio
IEC958 (S/PDIF) Digital Audio Output
sysdefault:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio DeviceThis is my "/etc/asound.conf":
pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}This is my "/etc/modprobe.d/alsa-base.conf":
# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7
# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; : ; }
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; }
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; }
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=0
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=0 vid=0x077d pid=0x0223
options snd-usb-audio index=1 vid=0x0218 pid=0x0306
options snd-usb-audio nrpacks=1The output of "lsmod" is:
Module Size Used by
snd_usb_audio 104097 0
snd_pcm 77560 1 snd_usb_audio
snd_page_alloc 5145 1 snd_pcm
snd_hwdep 5929 1 snd_usb_audio
snd_usbmidi_lib 18067 1 snd_usb_audio
snd_seq_midi 4591 0
snd_seq_midi_event 6544 1 snd_seq_midi
snd_rawmidi 21160 2 snd_usbmidi_lib,snd_seq_midi
snd_seq 53329 2 snd_seq_midi_event,snd_seq_midi
snd_timer 19998 2 snd_pcm,snd_seq
snd_seq_device 6438 3 snd_seq,snd_rawmidi,snd_seq_midi
snd 58447 8 snd_usb_audio,snd_hwdep,snd_timer,snd_pcm,snd_seq,snd_rawmidi,snd_usbmidi_lib,snd_seq_device
leds_gpio 2235 0
led_class 3562 1 leds_gpioNormal ALSA functionality (aplay, mpg123, etc.) is no problem, works fine.
Any idea or help to get puredata to run is very appreciated