pimoroni / pivumeter

ALSA plugin for displaying VU meters on various Raspberry Pi add-ons - derived from ameter
GNU General Public License v3.0
59 stars 22 forks source link

Locks up audio stream #8

Closed n0xa closed 6 years ago

n0xa commented 7 years ago

I'm running the lastest Raspbian Jessie/PIXEL build with all updates on a Raspberry Pi 3 with a BLINKT! attached. I compiled pivumeter and ran setup.sh which seems to have installed properly. I'm running headless, so I've only tried pianobar and mpg123 so far. Both will occasionally light up one LED on the BLINKT!, however the audio stream freezes and I have to hard-kill the audio player apps. I've tried with HDMI attached and without, and with audio output manually set to HDMI and headphone port. In all cases, the results are the same.

Removing asound.conf allows audio to play just fine, however, the BLINKT! is obviously not doing anything at that point.

Welcome to pianobar (2014.06.08)! Press ? for a list of commands. (i) Login... Ok. (i) Get stations... Ok. 0) q 1200 Micrograms Radio 1) 80s Pop Radio 2) q Armin Van Buuren Radio 3) Binary Finary Radio [ ... ] [?] Select station: 2 |> Station "Armin Van Buuren Radio" (2034637540235068767) (i) Receiving new playlist... Ok. |> "Bright Morningstar" by "Tiesto" on "Elements Of Life" ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front Using device: blinkt -08:19/08:19

And that's all I get. The timer doesn't move, and I get no audio.

n0xa commented 7 years ago

Here's the asound.conf that setup.sh built for me:

pcm.!default { type plug slave.pcm { type meter slave.pcm "softvol" scopes.0 pivumeter } }

ctl.!default { type hw card 0 }

pcm.dmixer { type dmix ipc_key 1024 ipc_perm 0666 slave.pcm 'hw:0,0' slave { period_time 0 period_size 1024 buffer_size 8192 } bindings { 0 0 1 1 } }

ctl.dmixer { type hw card 0 }

pcm.softvol { type softvol slave.pcm "dmixer" control { name "PCM" card 0 }
}

pcm_scope.pivumeter { type pivumeter decay_ms 500 peak_ms 400 brightness 128 output_device blinkt }

pcm_scope_type.pivumeter { lib /usr/local/lib/libpivumeter.so }

pcm.pivumeter { type meter slave.pcm 'hw:0,0' scopes.0 pivumeter }

pcm.dsp0 pivumeter

Gadgetoid commented 7 years ago

I believe this is related to: https://github.com/pimoroni/speaker-phat/issues/13 but I'm not sure.

Trying without the dmixer might work, I think you need to change softvol to type plug and use slave.pcm "hw:0,0"