-
Notifications
You must be signed in to change notification settings - Fork 19
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
shairport-sync-docker not finding sound card running on latest Libreelec #12
Comments
Thanks for the post. If you run |
Hi Mike, I didn't think to run the container with the -h and look in the log. It did output to the log, but nothing very specific, just Available audio backends: Saving the log and opening it in notepad allowed it to get past most of the special character copy and paste problems in the log. As a check that I am doing things right, I setup debian 10, docker, and shairport-sync-docker on another computer and everything worked as expected. Here is alsamixer output for the hdmi: LibreELECWyse:~ # alsamixer -m docker run -d --restart unless-stopped --net host --device /dev/snd Available mDNS backends: i\ Available audio backends: y Thanks! |
Thanks. I'm afraid I can not make sense of that at all.
You can see that it gives the names of the devices. It's by no means infallible, but might offer a guide. It is troubling that you can't get a clean output -- there should be no special characters in it. HDMI devices sometimes do not provide a 44,100 frames per second capability (which Shairport Sync must have), only 48,000 fps -- I wonder if that is the problem. |
I will look into the frames per second capability. I should have mentioned it is a displayport++ port with an adapter to hdmi. It has worked well with every other audio I have played through it so far. It also has a front headphone jack as you saw from the aplay output. It would be nice get that jack working as a proof of concept, but the intent is use the hdmi cable to the reciever. The Wyse 5060 should be fast enough your Airplay2 project which I am also going to start testing on another box. Have you heard of anyone having success with shairport-sync-docker on Libreelec? Also, I didn't copy far enough and didn't see the 'hardware output devices:' line in the log since it was appended to the prior line. It shows no hardware output devices. Thanks again! Settings and options for the audio backend "alsa": Settings and options for the audio backend "pipe": |
Looking at this thread https://forums.linuxmint.com/viewtopic.php?f=90&t=349665&sid=e57211f93906b6b1f64a78a784765649&start=20 , I was able gather some more hdmi hardware info. Playing a flac on the Kodi music screen: Code info: |
Speaker-test gave good results that I could hear from the left and right channels.
|
Thanks. So, it looks as if the HDMI output can indeed do 44,100 fps, but it looks as if it can't be seen from inside the Docker image. To check that, try running:
inside the Docker image, and post the output. On the Pi, it looks like this:
|
Yes, it looks like it can't be seen by docker. Docker engine version:
At the libreelec command line:
|
I should have asked — what version of the Docker image are you using, please? |
This what the libreelec devs have in the latest 10.0 beta: Docker can be install directly from Libreelec addon repository. There is another addon from which containers can be directly added to docker. Installing containers from ssh works as well as I have been doing for shairport-sync-docker. Ideally shairport-sync-docker would be provided by linuxserver.io in the future. Thanks again. |
Thanks. What I was really looking for was the version of the Shairport Sync image itself. I guess the version of Shairport Sync itself would be enough -- you can get it by doing:
inside the Docker image. Then I can do some checking here. |
Oops. Not the latest, but close.
|
Thanks. So, a couple of things.
Looking at the output of
One would be called Of course, it is possible that there is something about how Docker is installed on |
I will give those card suggestions a try. If that's not working I will follow up with the Libreelec team to see why /proc/asound is not being exposed. Thanks for the great help so far. |
Hi Mike. I found two things to make progress with.
"Runs as UID 1000, GID 63 (audio on LibreElec). Needs to run as a UID:GID that has rw access to /dev/snd - change as appropriate for your system." I tried multiple ways to run the container with these permissions but nothing worked. I don't know if these permissions can be added to your container without affecting other uses and users or if there is a way to set those permissions from the docker command line. Thanks again. |
Thanks -- excellent stuff. I think that you can indeed add a group to the current user in the Docker container. However, there might be a slight problem, so it may take a little experimentation. So, if you try something like:
It will add group numbered 63 to the groups that the user inside the Docker image will run with. What might be the "slight problem"? Well, inside the Docker image, Shairport Sync does not run as the initial user -- it runs as an extra user If you get the name of the container that you started with the command line above and then, assuming it is still running, do:
The |
Hi Mike, Running:
Still getting:
With container running, these are the /etc/group: On Libreelec:
In Container:
I tried a lot of other things yesterday as well. Libreelec does not have tools available for interacting with -vu output:
Thanks again! |
Thanks again. So one slightly wild thing to try is the AirPlay 2
I think it's worth a try. |
Hi Mike. It seems it is not taking the -- -d hw:0,3 and other parameters and only looking for the "default" device. I tried a lot of variations beides these:
Thanks again. |
Thanks for this. Here is an interesting issue, just concluded, that seems to parallel yours to some extent. |
HI Mike. robacst did leave much context for what he did with 'mount /etc/asound.conf:/etc/asound.conf'. I would like to try the same if I knew where to put it and what the syntax is. Do you have some idea? Thanks again,. |
I made a docker container to run speaker-test and did get sound output using Libreelec attached to my 7.1 reciever in both 2 channel and 8 channel so I think it might not be Libreelec blocking acces to the sound card. Dockerfile:
|
Fantastic stuff. Now, could you run there speaker test at a rate of 44100, see if it works? I think you'd add |
44100 works too and is audible.
Thanks again. |
That’s good stuff. Can I ask what the |
Sure. That's the semi-random name of the container made with "docker build -t aucdb ." |
Thanks for the info. Yikes, we might be related. It seems we've been here in Dublin since before 1600. But TBH it's a common enough surname. Let me experiment a little here. |
So, doing a little experiment here, Shairport Sync should accept an
returns. |
Hi Mike. I tried One thing that seems like an anomaly is the PCM mixer is on card 1, not card 0 per I looked through the alsa C code for I did get the python airplay2 receiver to work in docker with an Thanks again. From
Running
I did get this python airplay2 receiver to run, but sound drops out periodically:
I had to add
|
Thanks -- I'd reformatted you post slightly for clarity. I'll take a look at the C code! |
Well, I had a look at the C code and But I did notice that your Including a rate request for 44,100 frames per second, this might be something like:
[Update -- forget this; you've done it already!] |
One other thing I notice is that you tried:
and it generated errors, but when you tried:
it worked. However, in the latter you included the parameter |
Hi Mike. I have done so many permutations I that I did not pay attention to I started by running another instance within the container ( I then spun up a new local container with
I have a working version now. I think the root cause may be that LibreELEC is so stripped down it does not the concept of users other than Along the way I tried spinning up an OpenWRT container and adding Shairport Sync there, but making a fully working OpenWRT container is more difficult than OpenWRT itself. I was glad to see version 3.3.8 in the latest versions. Long term it would be great to see I will look into getting I will move forward with testing your AirPlay2 version now that I think I can get it to work. Thanks again for all your help on this. |
One other thing. I tried every combination i could think of to get a hardware mixer with no luck, |
Fantastic stuff, thanks. I've taken the liberty of editing for format and for reference for anyone looking at this thread. There are implications for the standard Docker image -- mainly it is probably a good idea to drop the idea of a (I might copy out the genealogy stuff if that's okay?) |
Sounds good on all accounts.
It's nice having the living room in sync with the rest of the house now.
Your airplay2 worked also from spotify but not from itunes and tuneblade.
It seemed like tuneblade was sending sound data but there was no sound.
Thanks again.
…On Sun, Aug 15, 2021 at 4:13 AM Mike Brady ***@***.***> wrote:
Fantastic stuff, thanks. I've taken the liberty of editing for format and
for reference for anyone looking at this thread.
There are implications for the standard Docker image -- mainly it is
probably a good idea to drop the idea of a shairport-sync user inside the
container. The idea was to offer a small measure of extra security because
the shairport-sync user would have fewer privileges, but it seems to just
get in the way.
(I might copy out the genealogy stuff if that's okay?)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARERVLYXHHMBP2AUX4GG2A3T46AL7ANCNFSM5ASLJEEQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Thanks Mike for your work on this. It took me some time to figure out how to make it work on my Pi running ArchLinux (alarm) but now it works great. Anyway for people not using Debian-based operating systems and who want to keep running it root-less, they just need to figure out the GUI of the
Then edit the Dockerfile accordingly:
Don't forget to build a new image after making this change.
I support this anyway 👍 |
Hi Mike. I am trying to get shairport-sync-docker running on the latest Libreelec 10 beta running on Linux 5.10.41 x86_64 GNU/Linux on a Wyse thin client 5060 AMD GX-424 SOC Radeon R5E graphics.
No matter what I try for
hw:X,X
on the command line I get these_snd_pcm_hw_open
errors in the Portainer log forshairport-sync
as soon as I start playing to the instance.Per the
aplay -l
output below this command line should work for the HDMI interface:I have tried every combination I could think of for
hw:X,X
for either sound device with no luck.Any assistance you can provide is greatly appreciated. It will be nice to get the home theater sound in sync with the five other shairport-sync instances running in the house. Please let me know if there is anything else I can provide.
Thanks!
ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card,
The text was updated successfully, but these errors were encountered: