-
-
Notifications
You must be signed in to change notification settings - Fork 628
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
Add support for asoundrc #2124
Add support for asoundrc #2124
Conversation
@mcrosson, thanks for creating a pull request! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Card and device numbers will vary across devices, so
.asoundrc
needs to be dynamic too. - Have you checked if there's audio on your mini PC's 3.5mm jack? If there's no
.asoundrc
config (or the config is blank), if could be that it defaults to the audio jack.
docker-compose.yml.tmpl
Outdated
@@ -37,6 +37,7 @@ services: | |||
restart: always | |||
volumes: | |||
- resin-data:/data | |||
- /home/${USER}/.asoundrc:/data/.asoundrc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you've accidentally placed this in the anthias-server
section. Please move this to anthias-viewer
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that, I've updated the PR accordingly. If you'd like me to squash the commits just let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be fine. We can just squash and merge later if this pull request gets approved
I think for the moment an empty file (by default) that users can adjust is sufficient. Users can I tracked down what Thinking in a more 'long-term' way I could imagine updating the web gui
I did not have the ability to test the 3.5mm jack when developing the patch. If I get creative, I can probably test it sometime in the next few days. Just let me know if you'd like me to give it a test. Even if the 3.5mm jack does work, I still need to use HDMI audio for my production deployment(s) which will require me to have an |
I was able to carve out some time to do a quick test of this device with no
|
@mcrosson, I;m still thinking abouit options. We can either let users do one of the following:
|
Understood re evaluating options. For the web ui text field: could you set it up to have a url parm to enable editing of the file and/or have it setup behind an 'advanced sound options (you probably dont want this)' toggle or similar? Such an approach could be a good compromise for the time being. I think the python approach may be 'best' long-term but I have a feeling that'll involve a ton of programming... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcrosson, would you be able to make changes so that:
- .asoundrc will be created from the viewer docker container instead?
- Make sure to store it inside
/data
. - In the viewer container,
$HOME
is set to/data
. That path is mounted as a volume, so it will be persisted.
- Make sure to store it inside
If the viewer container will take care of creating an .asoundrc
file (if it doesn't exist yet), changes to the Ansible files can be removed.
The The other option would be to bind mount the whole of
This is already addressed by the |
Although there's no bind mount for Anthias/docker-compose.yml.tmpl Lines 48 to 73 in 47947f4
Here's the voluime declaration: Anthias/docker-compose.yml.tmpl Lines 149 to 152 in 47947f4
One caveat when creating an I'll keep you posted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcrosson, also make sure to test this with existing installation.
Here's a suggestion on how to test it:
- Do a fresh installation (
master
). - Then try to install your changes.
- You might want to temporarily modify the install script and use that modified script instead.
Let me know if you need details on the how-tos.
I've tested the ansible updates and they are working as expected and will not override an existing Also: given the web ui code for hdmi/3.5mm audio toggle should work with rpi devices: would it be good to apply the I'd prefer leave the bind mount for |
2f6da0d
to
cbd6a9b
Compare
The changes to |
@mcrosson, let me re-test this thoroughly. I'll rebase and merge this when ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcrosson, here are some comments:
- Make sure that your branch is up to date. Rebase if needed.
- Resolve the typo.
- Add the following in your
bin/upgrade_containers.sh
:
sed -i '/\.asoundrc/d' \
/home/${USER}/screenly/docker-compose.yml
Make sure to add it just below the block below:
if [ "$DEVICE_TYPE" = "x86" ]; then
sed -i '/devices:/ {N; /\n.*\/dev\/vchiq:\/dev\/vchiq/d}' \
/home/${USER}/screenly/docker-compose.yml
After that, your upgrade_containers.sh
would look like the following:
if [ "$DEVICE_TYPE" = "x86" ]; then
sed -i '/devices:/ {N; /\n.*\/dev\/vchiq:\/dev\/vchiq/d}' \
/home/${USER}/screenly/docker-compose.yml
sed -i '/\.asoundrc/d' \
/home/${USER}/screenly/docker-compose.yml
fi
That change is needed so that your changes will only take effect on x86 devices.
The typo has been fixed. |
Quality Gate passedIssues Measures |
@mcrosson, should you have some more changes to make, feel free to create another pull request since I just merged this one. |
Some x86_64 mini pc's need an
~/.asoundrc
file within theviewer
container for sound output to work. This PR enables support for setups that need an~/.asoundrd
.This has been tested with a MeLE PCG02 Mini PC 'Stick'. The
~/.asoundrc
this device needs is: