2

I am pretty new to Raspberry Pi, so sorry if I might be not clear on something. I am trying to set the Raspberry Pi 3 to work running a Pure Data patch while communicating with two Arduino UNO, and getting it work just plugging it, so running the patch auto-starting after boot. There are so many things I would like to ask, but I'll remain strict to the topic, also one of my first problem. I switched to Patchbox OS cause I need a minimal system for audio working. I am now using Pure Data running with jack (Pd->media->jack) cause it is not working with ALSA, but it seems to me that running jack is not the properly way: clicks and pops are showing up also if CPU meter is between 15% and 25%. So I started searching for some solution. I found in this site another related-question with a well explained answer: here. The problem with that comes just in the first steps, after calling

 patch@patchbox:~ $ cat /proc/asound/cards
 0 [ALSA           ]: bcm2835_alsa - bcm2835 ALSA
                      bcm2835 ALSA
 1 [USB            ]: USB-Audio - Scarlett 2i4 USB
                      Focusrite Scarlett 2i4 USB at usb-3f980000.usb-1.5, high speed

I call amixer this is the results:

amixer -c 1
Simple mixer control 'Internal Validity',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

So the system is not recognising real ins and outs of my audio interface. Also there is this problem with Pd, that when I chose ALSA as driver (Pd->media->ALSA) I get the problem reported on the title [ALSA input error (snd_pcm_open): No such file or directory] I hope I have been clear, Thanks to all

1 Answer 1

1

I've searched the Pd mailinglist archive for this ALSA error and found this post, Re: [PD] alsa : Invalid value for card, by IOhannes zmölning:

iirc, there's a problem if the cards are not in consecuritve order, starting with 0.

e.g. my devices are

$ cat /proc/asound/cards
 0 [DSP            ]: H-DSP - Hammerfall DSP
                      RME Hammerfall HDSP 9652 at 0xf3100000, irq 22
 1 [MID            ]: HDA-Intel - HDA Intel MID
                      HDA Intel MID at 0xf3420000 irq 33
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf3000000 irq 17
$

which means I have 3 devices with IDs 0, 1 & 2.

if however, you have something like

$ cat /proc/asound/cards
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf3000000 irq 17
$

then you are missing the device #0, and Pd gets into trouble.

a couple of workarounds:

  • use jack to talk with the soundcard, so Pd doesn't need to know

  • make sure that the card numbers start with 0 (and are consecutive, in case you want to access a not-first card); this most likely involves tweaking some kernel module parameters (for the soundcards to be loaded), and maybe some udev rules.

a reply by Nicolas Montgermont shows a solution:

editing /lib/modprobe.d/aliases.conf and changing:

options snd-usb-audio index=-2

to

options snd-usb-audio index=0

make the card number to 0 and works in pd with alsa.

That said, in your provided cat /proc/asound/cards output the cards are in consecutive order, so the problem might actually be different.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.