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

Not working with Raspotify and blinkt #28

Closed ab-gh closed 4 years ago

ab-gh commented 6 years ago

Following a brief discussion with sandy on discord...

Trying to get this to work with a blinkt playing music over spotify. Installed fine, but LEDs wont light up

running aplay -L gives:


null
    Discard all samples (playback) or generate zero samples (capture)
default
pivumeter
softvol_and_pivumeter
sysdefault:CARD=sndrpihifiberry
    snd_rpi_hifiberry_dac,
    Default Audio Device
dmix:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct sample mixing device
dsnoop:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct sample snooping device
hw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Direct hardware device without any conversions
plughw:CARD=sndrpihifiberry,DEV=0
    snd_rpi_hifiberry_dac,
    Hardware device with all software conversions```
Gadgetoid commented 6 years ago

What does your /etc/asound.conf look like?

ab-gh commented 6 years ago
pcm.!default {
        type plug
        slave.pcm "softvol_and_pivumeter"
}

ctl.!default {
        type hw
        card 0
}

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

pcm.softvol_and_pivumeter {
        type softvol
        slave.pcm "pivumeter"
        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.dsp0 pivumeter
Gadgetoid commented 6 years ago

I'm guessing this is something related to Raspotify's configuration- IE: It's potentially using a specific output device directly rather than the default device. This is speculation, though! I haven't yet tried Raspotify myself. Do you know where it's config files are?

ab-gh commented 6 years ago

I do believe its in /etc/default/raspotify : https://github.com/dtcooper/raspotify#configuration

tocklime commented 5 years ago

I had this problem and fixed it by adding raspotify to the gpio group:

sudo usermod -aG gpio raspotify