scottlawsonbc / audio-reactive-led-strip

:musical_note: :rainbow: Real-time LED strip music visualization using Python and the ESP8266 or Raspberry Pi
MIT License
2.7k stars 641 forks source link

ALSA Unknown and Jack Server is not running - Error on Pi Zero #262

Open poiley opened 4 years ago

poiley commented 4 years ago

After installing everything correctly on a Pi Zero W, I try to run visualization.py. I keep getting this in response:

ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
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

I have tried this on both the latest version of Raspbian Buster (2020-02-13) and on the most recent version of Raspbian Stretch (2019-04-08). Both produce the same error.

I tried this on a Raspberry Pi 4B and got it working after running the same commands, but I would like to get this running on the Zero W. Any help would be much appreciated.

scottlawsonbc commented 4 years ago

I have a Pi zero W myself, so I may be able to give this a try.

It looks like something weird is happening in your audio device configuration. What audio input device are you using? is it a USB audio adapter?

poiley commented 4 years ago

Yup, it's a USB Audio Adapter

poiley commented 4 years ago

Any update? I've tried on a third Raspberry Pi with a different audio adapter and getting the same issue.

akameswaran commented 3 years ago

Sorry if this is late to the party. I don't think those errors are actually preventing anything from working. I get those errors on my headless rpi4 everytime, and it still works. I don't believe pyaudio actually needs Jack, but it tries. You could install jackd on the pi zero, but again, I know the visualization works with those exact errors. The one that really kills you is if you get one that says something like "dsnoop" (Sorry I don't get it anymore so...) that's the thing that has to work in my experience.