-
Notifications
You must be signed in to change notification settings - Fork 6
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
Hifiberry amp+ is not an option in kodi #9
Comments
Hi, can you post the output of: |
Hi, I tried to reinstall kodi for this purpose, but cant get it active from volumio.
Verstuurd vanaf mijn iPad
… Op 21 jun. 2017 om 16:36 heeft Rachid Groeneveld ***@***.***> het volgende geschreven:
Hi, can you post the output of: cat /proc/asound/cards
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
You don't need to reinstall Kodi to post the results of As for your problem activating the plugin; I'm going to need a little more information:
|
Hey, Thanks for the info, can you post the results of |
Hi, volumio@volumio:~$ cat /etc/asound.conf
result is the same for plugin on and off regards Slawek |
Hi, Thank for posting back, you should disable the DAC in the Kodi plug-in settings. Then restart Kodi, I see my config conflicts for the Amp+ |
Can you tell me if that worked for you? |
Hi, Thanks for your suggestions. Tomorrow morning I will check and let you know. |
Hi, disabling the DAC in the Kodi plug-in settings enable ALSA setting in Kodi, but not HiFiBerry amp - it's the default bcm2835 (my hardware is RPi3) this is not working for me. If I install fresh LibreELEC - there is ALSA HiFiBerry amp option in Kodi. Maybe I can send some files to you to help you identify the problem ? |
Hi, any news ? How can I help with this problem? |
Did you restart Kodi after you saved the dac-setting in the plugin? Can you post the results of |
Yes sure I did. here is my aplay - l result
the only option to be able to select Hifiberry Amp in Kodi is to manually change the /etc/asound.conf in default section like bellow:
in that way I can select in Kodi ALSA Default (snd_rpi_hifiberry_amp Analog) Just for test I've installed on side the fresh LibreELEC and my card is detected and working without any problem. Of course in Volumio is working as well . FreshLibreELEC with one line added to config.txt:
results:
No "asound.conf" file at all
I was trying to disable default sound "card 0:" in my RPi to have only one card. Then I was able to select it in Kodi but still no sound in Kodi. In Volumio - perfect. |
I think LE (=LibreElec) might have the dtparam=audio=off setting in the config.txt and Volumio does not, this disables the onboard audio device(s). Can you confirm this maybe? Also, can you try putting that in the boot config for Volumio (NB: You won't be able to use HDMI/analog out in Volumio anymore and it might cause more trouble). I can add another option (disable onboard sound), but I'm note sure what this does to HDMI.... But first things first, can you verify that LE has this setting and Volumio doesn't? And secondly, if you add the dtparam line does the sound work in Kodi? Please make sure DAC is off in the Kodi plugin. As your card index needs to be/stay 0. |
Yes I wanted to see if the dtparam=audio=off would make any difference on the Volumio image. Also I've been reading into Open/LibreElec, this is not really comparable to Volumio. OE and LE are running on a bare arch(?) Linux variant, whereas Volumio runs on Jessie (way more bloated). For example aplay -l returns the onboard card in Jessie, but not in LE. Therefore I think the ALSA configuration differs entirely. But I will not give up so easily, let's try to make this work.... Maybe if I got my hands on a hifiberry AMP for a good price I'd give it a good go, will keep checking the bargains ;) |
You can also try to add dtdebug=1 to the /boot/config.txt |
OK tested.
so there is only one card - HiFiBerry Amp+ with number 0
DAC is off in the Kodi plugin.
System restarted. Volumio is setup, and sound is working as usual.... and surprise.... Kodi still shows the "standard Pi sound devices" and the HiFiBerry Amp+. But nothing more. still no sound from HiFiBerry. HDMI output works fine. |
Hi, |
Hi, try this steps (with NON blacklisted default onboard sound card)
after that in my case HiFiBerry Amp - always appears but no sound :-( |
What is also interesting. If I set Kodi to keep audio device alive. There is not possible to play sound in Volumio (Volumio says that device is not accessible). Looks like Kodi is somehow accessing the HiFiBerry Amp+ card. Despite that, there is no sound from Kodi. |
I'm going to try. I have installed an other plugin (volsimpleequal an equalizer) that provide a Loopback device and then the signal to the DAC (iqaudio). In that case, kodi can use the loopback and then output to the dac. But the sound is sometime chopped or repeated... maybe a buffer size issue. This is a other story but just means that kodi can see other ouput than hdmi and default board in volumio... |
well, nothing better for me. Can't see the dac. |
I made a other test on a rpi with a usb FDA (full digital amplifier).The output was ok in kodi asap I plug it. The configured volumio, and the usb output diseappears from kodi.What we can learn, the problem does not comes for i2SSo my guess (not proved ) is that volumio keep active the output and the kodi can't access it...Not sure but it needs more testing. |
In the article about Pulse and Kodi: http://kodi.wiki/view/PulseAudio in section "6.5 Known issues" author write about something similar to our problem ... maybe this is some trace to investigate? |
I've a rpi3 with HiFiBerry DAC+ Pro and it's an exact same scenario. TL;DR is the DAC support in this plugin is broken and if used it breaks DAC support in Volumio and as far as KODI is concerned, it doesn't care about it either way as the DAC is not detected regardless of whether the option is enabled or disabled. |
I'm expecting an AMP soon, so then I'll be able to really debug this. As for the remark above "the DAC support in this plugin is broken and if used it breaks DAC support in Volumio"; this is true. Only one application can claim the DAC/AMP I'm affraid. This is not something I can change, bypassing this requires the inclusion of other software (e.g. PulseAudio) and appropriate porting on both ends (Kodi and Volumio). The one thing I can look into is why the HifiBerry AMP/DAC is not properly used in Kodi (Kodi only). Then I can investigate whether and how to properly release the soundcard so that Volumio can use it again. Maybe killing Kodi suffices, but I'm not sure. Meaning, the course of action would be to close Kodi after use, so the soundcard is released for other applications (Volumio/SnapCast/etc/). |
I'm not experiencing any problems after multiple reboots. The only thing that changes after a reboot is the volume, its back to 0, every single time. Changing the volume back to 50 is all I have to do for sound. If this doesn't help, let me know. I can upload my image for you to test. |
My hardware is (now):
My software is:
I have this same volume changes to zero as you, but this is not a big deal now. If can upload your image I will test it quickly and let you know. |
Here's the link to the image: https://mab.to/MpPqvqLLa I've incorporated a test video in the Kodi installation (it's on the SD-card). Please note that I only have 16GB SD-cards, so you're gonna need at least that size (or know how to resize the image). The image is rarred (zip has a maximum of 4GB) to make it smaller (around 1.2GB). |
Hi @Saiyato, just tested. Results are identical like mine installation:
Looks that Volumio sound gauge probably setup the global ALSA mixer volume level. |
I will reflash the image tonight and retest. How do you power your Pi? Via de micro USB connector or the barrel connector or something else? |
I have exactly the same setup. Only my board doesn't have pins extending the GPIO connectors. Like this: https://www.kiwi-electronics.nl/image/cache/data/products/raspberry-pi/addon-boards/amp_plus-1000x667.jpg So I just reimaged my sd card and on first boot the hifiberry was not selectable in Kodi. Volumio however worked fine. Restarting the plugin fixed the soundcard problem. Subsequent reboots didn't change anything for me, Kodi and Volumio continued to work perfectly. Maybe ALSA is not ready when Kodi starts... Not sure how and if I can check this... But if ALSA is not ready, the sound card is unavailable, also ALSA is in the name so it must be something like that. The weird part is that I don't have your problem. Maybe the difference is in the SD card used. I use Kingston class 10's. Doesn't mean that I won't fix it, I'm just trying to understand the root cause of the problem so I can implement a good fix. Can you disable the plugin, reboot, play something in Volumio (just a few seconds), start the Kodi plug-in and see if that works for you? That may indicate a timing issue. |
There is one thing probably different from your setup. On my testing environment I have no dedicated HDMI monitor connected to RPi. I'm using my ASUS AIO computer. So RPi always start without any monitor connected. Then I have to switch my AIO input to HDMI then I can jump to Kodi on RPi. I will test with RPi connected to my TV and let you know. It will take few hours because I have to organize 12 V power supply in my saloon ;-) |
What is the output of your dmesg regarding the soundcard? Maybe that's where things go south. |
Hi,
this is working fine - both Kodi and Volumio until next reset. result of dmesg:
this same result I have for HiFiBerry Amp+ available and not available in Kodi. |
Ok, so in short, the soundcard is not available in Kodi upon boot, this is something I need to investigate. The easiest way is to keep reflashing my image, because the first boot showed this behaviour. Just to check, the sound is working fine in Volumio? After each boot? This narrows the problem down to the Kodi issue. |
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:
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). 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.
but in situation:
|
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:
|
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! Thanks for your effort in finding the culprit. |
Well the effort was for myself as well. |
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! |
Hello, Nevermind, got it @ https://github.com/Saiyato/volumio-kodi-plugin/raw/master/volumio-kodi-plugin.zip |
The not being able to save problems are related to #28, I have created a new PR for the matter: volumio/volumio-plugins#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.
The text was updated successfully, but these errors were encountered: