HELP: Snips Controll when Music is playing

Hey i’m new to snips so maybe someone can help me. I try to make Snips controll my Spotify. It allready works fine to start spotify on the Raspi, but when Music is playing and ic say “Hey Snips” the Output throughts an Error because on the Output device Spotify is Playing Music. I tried to make multiple Output possible with ALSA like this:

pcm.dmixed {
type dmix
ipc_key 1024
ipc_key_add_uid 0
slave.pcm “hw:1,0”
}
pcm.dsnooped {
type dsnoop
ipc_key 1025
slave.pcm “hw:1,0”
}

pcm.duplex {
type asym
playback.pcm “dmixed”
capture.pcm “dsnooped”
}

pcm.!default {
type plug
slave.pcm “duplex”
}

ctl.!default {
type hw
card 0
}
But the Error still comes up. Somebody any suggestions ?

Hey Jones7991!

Did you try to add the parameter ipc_perm 0666 to the pcm.dmixed device?

pcm.dmixed {
type dmix
ipc_key 1024
ipc_key_add_uid 0
ipc_perm 0666
slave.pcm “hw:1,0”
}
1 Like

For my Respeaker Mic Array 2.0 the /etc/asound.conf looks like this if I want to play things from multiple sources at the same time (and it works):

pcm.dmixer {
  type dmix
  ipc_key 1024
  ipc_perm 0666
  slave.pcm "hw:1,0"  # Respeaker Playback
  slave {
    period_size 2000
    buffer_size 8000
    rate 44100  # These params are Respeaker specific
    format S24_3LE
    channels 2
  }
}

pcm.music {
    type plug
    slave.pcm "dmixer"
}

pcm.!default {
    type asym
    playback.pcm {
        type plug
        slave.pcm "dmixer"
    }
    capture.pcm {
        type plug
        slave.pcm "hw:1,0"  # Respeaker Capture
    }
}

Yhea perfekt. Thx a lot. That was the problem. now everything works fine!!!

1 Like