Open riesch opened 7 years ago
Ok, I might just have found a fix to force Kodi to use ALSA, can you edit your systemd unit (/etc/systemd/system/kodi.service) to this:
# Kodi as-a-service
[Unit]
Description = Kodi Media Center
# if you don't need the MySQL DB backend, this should be sufficient
After = systemd-user-sessions.service network.target sound.target
# if you need the MySQL DB backend, use this block instead of the previous
#After = systemd-user-sessions.service network.target sound.target mysql.service
#Wants = mysql.service
[Service]
User = kodi
#Group = root
Type = simple
#PAMName = login # you might want to try this one, did not work on all systems
Environment="AE_SINK=ALSA"
ExecStart = /usr/bin/kodi-standalone -- :0 -nolisten tcp vt7
Restart = on-abort
RestartSec = 5
[Install]
WantedBy = multi-user.target
Note: I added the Environment parameter (AE_SINK), this should force Kodi to use ALSA output (your default card) as opposed to have Kodi decide which card is used.
Volumio sound is always working fine - via HiFiBerry Amp+ card (of course). The fix you suggest doesn't help. I have this same symptoms.
What is your plugin doing when we run stop then start operation in Volumio ?
Maybe automatic plugin start with Volumio startup after reset is performed to fast/early - before system stabilise and ALSA subsystem is available to Kodi ? Maybe Volumio is "somehow blocking" the ALSA driver for little time after start - e.g. initial welcome sound ?
One observation: when Volumio is playing something e.g. internet radio and I stop/start plugin then stop playing in Volumio and switch to Kodi - HiFiBerry Amp+ card is not available in Kodi.
Only if Volumio playback is paused/stopped - the operation of start/stop make HiFiBerry Amp+ card is available in Kodi.
Volumio: ++++++++-----------+++++++----
Plugin: on.........off/on.............
Kodi ->> ALSA available
but in situation:
Volumio: +++++++++++++++++++++++-------
Plugin: on.........off/on.............
Kodi ->> ALSA not available
Ok, one last test then, if you stop the Kodi plugin and then reboot. Then Kodi should not start automatically, if the UI is visible and you start Kodi; is everything ok?
This should confirm a timing issue.
have you try to set : "boot_priority":10 in package.json to force the plugin to load in very last place ?
If I follow scenario:
with "boot_priority":10 in package.json the situation is little better. After restart Kodi is able to see the ALSA card but not HiFiBerry Amp+. Only the standard Bluetooth output
and disabling startup sound ?
Good find balbuze! :) Thanks.
I had to change some work to do and tomorrow night is also no option, but I'll try to do some tests too this weekend.
Hi guys,
I did final test ;-)
Now its working as expected. No plugin "boot_priority" change , no AE_SINK parameter in kodi.service.
So I think you can leave it as is or find the way to "un-glue" Volumio from HiFiBerry Amp+ ALSA driver during plugin startup.
Have a nice weekend.
Really? Is the startup sound the culprit? Damn! Makes me wonder why I don't have this problem on my setup... oh well, good to know, no I can look for workarounds/fixes.
Thanks for your effort in finding the culprit.
Well the effort was for myself as well. Now I have my YTPC of my dreams
And little bonus.... Polish translation. Ready to merge ;-)
I merged the Polish translations, thanks! I did some editing in the translation (minor), if you want you can send me a new file, if it's ok then you don't need to do anything ;)
It's OK
Awesome! I have not been presented any issues regarding the HifiBerry Amp, will try to figure out a neat way to inform the user when HifiBerry is used.
Hi there! I'm running the hifiberry dac on rpi3 and have the same issue that the soundcard is just available after disabling the kodi plugin in volumio browser settings and starting it again (Thanks for the intense bug research in here and the workaround). Unfortunately I can't save the setting "enabling dac for kodi" in my volumio kodi plugin. When I hit save and come back to the plugin the setting is disabled again like nothing was changed. Am I missing the trick to save the settings permanently?
Hello, Bro Saiyato or anybody, please post again the image as the https://mab.to/MpPqvqLLa seems to point me to another site. My gadget: rPI 2, hifiberry amp+
Nevermind, got it @ https://github.com/Saiyato/volumio-kodi-plugin/raw/master/volumio-kodi-plugin.zip Tq Saiyato
The not being able to save problems are related to #28, I have created a new PR for the matter: https://github.com/volumio/volumio-plugins/pull/314
After install of the plugin, playback options are hdmi, analog or both. In de settings of the plugin I selected the dac playback option.