On HifiBerryOS 64, the analogue Input / alsaloop service does not start or function as expected. When an attempt to enable the service is started, it instantly goes to a failed state.
I have attached a PR that partially fixes this issue (see "Additional context"). However, the issue with the Python script running the audio loopback still persists.
This bug and the fixes were performed on a Raspberry Pi 5.
HiFiBerryOS version
20240410
HiFiBerry sound card
DAC+ ADC Pro
Steps to reproduce the behavior:
Access the GUI
Click on "SOURCES" tab
Open the Analogue Input source
Turn on the service
Service should fail to start (internally)
Expected behavior
The analogue input / alsaloop service should start and audio loopback should begin as expected.
Additional context
Solving the issue with the alsaloop service
Investigating the journalctl logs, the issue seems to be the alsaloop service failing to start.
Relevant log
```
Alsaloopwrapper thread exception: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.155" is not allowed to own the service "org.mpris.MediaPlayer2.alsaloop" due to security policies in the configuration file
```
Which suggests that the D-Bus configuration file for the alsaloop does not exist. I created the following file in /usr/share/dbus-1/system.d/alsaloop.conf which resolves the alsaloop service failing to start.
I was able to confirm that the alsaloop.py script (and consequently the full alsaloop service) works when I downgraded the version of pyalsaaudio to v0.9.2 (by cross-compiling the pyalsaaudio package and directly loading the compiled binaries from the alsaloop.py script).
This bug has been reverted, however, there have not been any releases that contain this fix (the latest version is still 0.10.0).
I am not sure what is the best fix for this as I was unable to figure out a way to get alsaloop.py to work with v0.10.0 and it seems that the other services in this repository depend on the pyalsaaudio package as well, but this should provide a good jump start.
I have implemented some changes that seem to work her. Unfortunately I don't have an analog audio source here to test this. I recommend to try with the net alpha release when it's available (hopefully next week)
Describe the bug
On HifiBerryOS 64, the analogue Input / alsaloop service does not start or function as expected. When an attempt to enable the service is started, it instantly goes to a failed state.
I have attached a PR that partially fixes this issue (see "Additional context"). However, the issue with the Python script running the audio loopback still persists.
This bug and the fixes were performed on a Raspberry Pi 5.
HiFiBerryOS version
20240410
HiFiBerry sound card
DAC+ ADC Pro
Steps to reproduce the behavior:
Expected behavior
The analogue input / alsaloop service should start and audio loopback should begin as expected.
Additional context
Solving the issue with the
alsaloop
serviceInvestigating the
journalctl
logs, the issue seems to be thealsaloop
service failing to start.Relevant log
``` Alsaloopwrapper thread exception: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.155" is not allowed to own the service "org.mpris.MediaPlayer2.alsaloop" due to security policies in the configuration file ```Which suggests that the D-Bus configuration file for the
alsaloop
does not exist. I created the following file in/usr/share/dbus-1/system.d/alsaloop.conf
which resolves thealsaloop
service failing to start.https://github.com/Wassup789/hifiberry-os/blob/a3deffddff52f890f978b3170eb128dbdba131d7/buildroot/package/hifiberry-alsaloop/dbus.conf
I have submitted a PR for this fix here: https://github.com/hifiberry/hifiberry-os/pull/539
New issue with
alsaloop.py
Though the service starts, I encountered another error specifically with the
alsaloop.py
script that crashes when the script begins audio loopback.Relevant log
``` Traceback (most recent call last): File "/opt/alsaloop/alsaloop.py", line 194, inThis appears to be a known issue with the pyalsaaudio package (see https://github.com/larsimmisch/pyalsaaudio/issues/130), which suggests an issue with specifically v0.10.0.
I was able to confirm that the
alsaloop.py
script (and consequently the fullalsaloop
service) works when I downgraded the version ofpyalsaaudio
to v0.9.2 (by cross-compiling thepyalsaaudio
package and directly loading the compiled binaries from thealsaloop.py
script).This bug has been reverted, however, there have not been any releases that contain this fix (the latest version is still 0.10.0).
I am not sure what is the best fix for this as I was unable to figure out a way to get
alsaloop.py
to work with v0.10.0 and it seems that the other services in this repository depend on thepyalsaaudio
package as well, but this should provide a good jump start.