Open GMFalka opened 5 years ago
Do you run the commands as the same user? The user with which it works might have an .asoundrc
file that sets the default device to listen to.
My systemd unit file is also just
[Unit]
Description=cpiped
After=network.target snapserver.service
[Service]
Type=simple
User=root
ExecStart=/root/cpiped/cpiped -s '/root/cpiped-snapcast-ctrl/playing.py chromecast' -e '/root/cpiped-snapcast-ctrl/silence.py chromecast' -t 600 /tmp/snapchromecast
[Install]
WantedBy=multi-user.target
but my root
user does have an .asoundrc with the following content:
pcm.!default {
type hw
card 1
device 0
rate 44100
}
ctl.!default {
type hw
card 1
}
Im using the init.d file thats provided here (not using any systemd file) and i think im running the two commands with the same user.
@GMFalka, I don't have anything helpful to add. @maweki is likely on the right track.
@b-fitzpatrick
Thanks! I think i got past that error, now it just says:
cpiped: pcm.c:1245: snd_pcm_drain: Assertion 'pcm' failed.
I think im naming the wrong hw in the config file. I'm using a PC motherboard with onboard line-in. What should be in my .asoundrc?
arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
sysdefault:CARD=PCH
HDA Intel PCH, ALC887-VD Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
Front speakers
dmix:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
Direct sample mixing device
dmix:CARD=PCH,DEV=2
HDA Intel PCH, ALC887-VD Alt Analog
Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
Direct sample snooping device
dsnoop:CARD=PCH,DEV=2
HDA Intel PCH, ALC887-VD Alt Analog
Direct sample snooping device
hw:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
Direct hardware device without any conversions
hw:CARD=PCH,DEV=2
HDA Intel PCH, ALC887-VD Alt Analog
Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
HDA Intel PCH, ALC887-VD Analog
Hardware device with all software conversions
plughw:CARD=PCH,DEV=2
HDA Intel PCH, ALC887-VD Alt Analog
Hardware device with all software conversions
I think you were running cpiped in user context before and in user context the user pulseaudio daemon gave you an audio pipe. In root context the server didn't.
What are you trying to do? If you have pulseaudio you don't need cpiped. You can create a filesink using pulseaudio.
Thank you! You are right, i can use pulseaudo to do filesink, but it was actually filling up the SSD. I will try that route!
I am getting this same error message every time I try to start cpiped. It was working yesterday, but I had a power cut and I fear all my alsa device have moved around. if I start cpiped manually, it just returns:
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
I'm invoking cpiped with out a -d argument, so I'm hoping to use a default device, simply because I can't figure out what the card are called, or how to declare the name of a device with -d
Hello!
Thanks for making this :)
Can i have some help?
if i do
/usr/local/bin/cpiped -D /tmp/snapfifo
it works for a few hours, but if i use the init.d script, it just saysthis is the cpiped config file