Skip to content
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

[WIP] plugins: add RoonBridge plugin #388

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[WIP] plugins: add RoonBridge plugin #388

wants to merge 1 commit into from

Conversation

shawaj
Copy link
Contributor

@shawaj shawaj commented Dec 31, 2020

This is a first attempt to add RoonBridge as a plugin (and familiarise myself with balenablocks at the same time!).

Currently, the roon support when it is pushed to balenaCloud as a single container works perfectly. However when running with all of the other services (audio, supervisor etc etc) it fails with a Device or resource busy error:

Screenshot 2020-12-31 at 17 56 23

To me it smells like me missing some pulseaudio / alsa config so the roon container can talk to the audio container but I need to spend a bit more time debugging.

Also - running the install script from Roon in the build process currently fails due to this issue - https://github.com/balena-io/balena-builder/issues/826 - so I have currently got the script directly in the repo.

To Do List

  • Work out why the merus-sound card works when it is the only container, but not in collaboration with the audio block
  • Move installation of roon scripts into start.sh script instead of on builder so we can handle architecture checks (or some other method)
  • Add environment variables to set names / add ability to disable etc
  • Decide whether to fork / maintain install script locally or pull from remote and override options
  • Speak to RoonLabs about armv6 support?!?
  • Test with multiroom functionality
  • Test with all Pi architectures and other boards and if necessary provide overrides to stop it launching on incompatible devices
  • Remove any unneeded code
  • Test with WiFi / Ethernet to make sure both work
  • Test with onboard audio and HDMI audio
  • Test with other DAC cards
  • Add / update repo documentation
  • Squash commits
  • Enjoy Roon audio 🎉

@shawaj shawaj requested review from AlexProgrammerDE and a team as code owners December 31, 2020 22:18
@ghost
Copy link

ghost commented Dec 31, 2020

Your landr site preview has been successfully deployed to https://landr-balenalabs-repo-balena-sound-preview-388.netlify.app

Deployed with Landr 6.13.1

@shawaj shawaj added enhancement New feature or request plugins For general plugin issues and requests labels Dec 31, 2020
@shawaj
Copy link
Contributor Author

shawaj commented Dec 31, 2020

Some progress...

root@2ec9b5a:/opt/RoonBridge# speaker-test -c2 -t wav

speaker-test 1.1.8

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 1048576
Period size range from 32 to 349526
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right

But RoonBridge still seems to fail with Failed to open the audio device - so must be something in the alsa / pulse config of roonbridge I guess...

Screenshot 2020-12-31 at 04 31 13

@shawaj
Copy link
Contributor Author

shawaj commented Jan 1, 2021

Weirdly, it works with the onboard Pi audio / headphone jack - but it doesn't like the soundcard. Will try with a few other soundcards and see if that makes a difference...

image

Beginning to think maybe it is some permissions issue with accessing an external soundcard or something? Although, having said that, when no other containers are running other than the roon one - it can play music fine...so maybe it is a config thing for how the sound card interacts with the audio block and roon?

@shawaj shawaj added the help wanted Extra attention is needed label Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed plugins For general plugin issues and requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant