-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ALSA Resample Input - Use more Player with Snapcast #45
Comments
If you explain us exactly what you did (preferebly all commands and config file changes), we may can help you... |
Hi, i create a /ets/asound.conf with this input Now the sound from the raspberry card should also routed to the snapcast fifo. The spotify connect client is startet with ./spotify-connect-web.sh --username 12345678 --password xyz123 --bitrate 320 so it uses the default alsa card. I can´t get sound to the snapcast client. The test with sudo cat /dev/urandom > /tmp/snapfifo is working fine. You can use --device on the spotify client i try that with --device default but nothing :( I think it´s a alsa routing problem ... |
First of all, directly piping the audio stream to your hardware device via alsa doesn't make any sense because you'll loose synchronicity (your other devices will have ~1 second delay). Did you get snapclients on other devices working? If yes, you should remove
and also install snapclient on your device with spotify connect web client. Because you configured the file plugin as your default alsa device, it'll not work out of the box (this would be a loop because snapclient would also stream to the file). So you would have to stop snapclient
and then list your pcm devices with |
Ok but the first problem is that no sound is comming to the snapcast clients. i think some of the alsa stuff is wrong here so the sound issn´t put to the fifo from snapcast ... |
I don't know if snapcast is working with the alsa file plugin, obviously it's not listed in the docs atm. First step is to remove the line I mentioned above, then you should debug your alsa configuration and snapserver/snapclients with a simple .wav audio file and aplay. As soon as this works, you can go ahead with Spotify-Connect-Web. Furthermore, I would recommend to change the title of this issue. This is nothing specific to spotify connect webclient - if you manage to get it working with the alsa file plugin, this solution would work for nearly every linux audio player software out there. Normally, the pipe is like this:
What you try to achieve is this:
This would remove the requirement that the audio player should support streaming audio to a file (and we currently have this requirement according to the docs: The only requirement is that the player's audio can be redirected into the Snapserver's fifo). |
Ok with this asound.conf i have it perfect running now :) pcm.!default { pcm.writeFile { pcm.card0 { ctl.card0 { |
I don't get it. What is the purpose of this?
|
you need the |
a cleaner version pcm.!default { pcm.writeFile { pcm.card0 { ctl.card0 { |
Even cleaner should be:
@badaix: I think it would be a good idea to take this into the documentation because it opens up much more use cases for snapcast :) |
You´re right. |
^ That would be great. Especially with the new, more modular setup of Volumio 2 (RC1 released a few days ago!) it would be awesome to integrate snapcast. Finally a true open source hard and software multiroom audio system :) |
Nice discussion 😄 and cool to see what people are doing with Snapcast. Edit: done From my point of view are two things missing:
|
I have the spotify-connect and volumio running :) |
@badaix |
I just install voumio2 and there is the snapcast entry already in the mpd.conf with label multiroom so maybe it´s in when the release comes |
@bjwelker |
I have just been fiddling with Volumio2 RC1, really starts to be something. Maybe the best part: snapcast was already installed (both client and server) and present in the mpd config. Though I should mention it was version 2.6.xxx But hey, it is a (good) start at least :) |
Hi bjwelker, I am curious how your setup with spotify-connect and volumio is?
My goal is to use them both seperatedly but also in multiroom option. |
@Anjerlaan you need the settings if postet for alsa. then you need to install the snapcast server AND the client on the server raspberry. On the client raspberry you need to install the snapcast client only. Then you can use spotify-connect and volumio on the server and client both as multiroom and both as single. |
Maybe the asound.conf that I posted in #43 is off value here as well. It enables snapcast in combination with other players that all share the same USB -DAC. |
@bjwelker how do you install snapcast on volumio 1.55, by source or by .deb package? By source i have some difficulties with the client. If i follow the by source steps soms errors occur during installation and if i follow the steps on the volumio forum too. A combination of both did install stuff, but i only get audio from the 3.5mm plug. But i have a behringer uac202 USB dac, which i can't get sound from anymore. Snapcast.git is placed in the /root folder just like Spot. Connect. If I list the PCM devices i get 21 devices, i tried the sysdefault USB dac with -s 12 ( which i think is the dac) in the snapclient settings but the sound keeps comming only from the 3.5mm plug. And i can't find the snapclient.service file in that directory as badaix explained on the volumio forum. |
@Anjerlaan just take the .deb for armhf and install it. |
Server is Rpi2b with hdmi audio to AV receiver and client is Rpi1b wireless with behringer dac. |
If the client should also work with and without snapcast i think you need a special alsa.conf so the device is not blocked. |
Mmmm...maybe not nessecary with my setup. I will only use the (mobile) Rpi Client in my garden. if I don't want music in the livingroom I turn of the AV receiver or switch to another HDMI channel (to watch TV for instance). And if i don't wan't music in the garden I turn off the Rpi. |
Okay install went smoothly on both devices, with no errors. Started webradio stream on volumio server/client: DLNA stream to volumio Server/Client: Spotify Connect on Server/Client What am i doing wrong? |
Did you Switch to hdmi Sound out? |
Working!....figuring out which audio device the clients use with snapcast -l Only Spotify Connect is not yet working... |
@Anjerlaan you need to make a asound.conf in the spotify-connect chroot dir. spotify-connect don´t use the /etc/asound.conf |
@badaix can you route the snapclient output in the alsaequal or is a alsa output not possible ? |
@bjwelker aha, now I understand why it didn't work! So that's why the Audio Device of the (Server) Client didn't work out of the box. |
@bjwelker, does pausing playback via the Spotify app work for you? As explained in #75, whenever I pause, the snapserver just starts playback over again at the beginning of the snapfifo file that spotify-connect-web wrote. So if I start a fresh session of spotify-connect-web and play a song for 5 seconds and then pause, all snapcast clients will loop this 5 second part endlessly. I have no clue what's wrong with my setup |
Hello, regarding to the post:
Spotify-connect-web works perfectly in When you start spotify-connect-web you can use the parameter
B. |
Hello everyone! -I created a asound.conf file in the RPI 3 /etc directory following the clean version from @pfink of course I am missing something but I don't know what, |
@djidji73 Are you sure your Client is connected to your Server (RPI 3 logs the HELLO-Command)? Sometimes for some weird reason they don't actually see each other (zeroconf / avahi can be a bit bitchy). I usually set the servers hostname in the clinet's parameters, e.g.: |
@s1lvester Thank you for your reply! Yes I've checked and my RPI1 connects to the snapserver perfectly, I think I'm missing something around the ALSA and asound.conf because playing noise via What I can't understand : I tried to play a .wav on the RPI3 and I hear it only on the RPI1, but when I play a song on spotify on RPI3, I hear it only on RPI3 not on RPI1 Any advice is welcome! |
Hi @djidji73, Where did you create the
Important is that the
In my setup I did also a bind-mount from Another important thing is, that you have to specify the When you run
|
just wanted to say thank you for the great instructions. This worked perfectly implementing plexamp-headless via docker and allowing me to direct its audio output to a snapcast pipe. |
Hi someone get snapcast runnig with the spotify-connect-web client ?
https://github.com/Fornoth/spotify-connect-web
I try to route the alsa output to the fifo but i didn´t get it working ...
The text was updated successfully, but these errors were encountered: