Max2Play Home 2016 (en) › Forums › Max2Play on Raspberry PI › Kodi sound via Hifiberry Amp2 on max2play
Tagged: max2play; hifiberry; amp2; kodi
This topic contains 16 replies, has 2 voices, and was last updated by Heiner premium 3 years ago.
Posted in: Max2Play on Raspberry PI
8. Juli 2019 at 20:07 #46202
raspberry pi 3 with hifiberry amp2 and installed max2play.
Now I am able to listen to music over the hifiverry amp2 via shairport. But there is no sound via hifiberry amp2 in kodi. Is there a howto for configuring kodi for hifiberry amp2? I did not find any.
What I made:
I choose to use hifiberry for max2play and there the hifiberry amp 2.
In /boot/config.txt is automatic dtoverlay=hifiberry-dacplus. Has dtparam=audio= to be on or off?
At the max2play webpage I get an information: „The chosen soundcard is located at hw:0 but the settings for squeezelite and shairport in the advanced options in the audioplayer tab are not pointing to hw:0 ! You need to change this to get your audio card working correctly! “
Has this something to do with kodi?
In kodi I am able to choose the hifiberry as audio output device: ALSA: Default (snd_rpi_hifiberry_dacplus_Analog).
Does anyone have a tutorial for me how to configure max2play right to use hifiberry in kodi?
Daniel!9. Juli 2019 at 10:08 #46212
If the snd_hifiberry output is selected in Kodi, you should hear sound. Try deactivating Shairport to make sure that this is not the cause.12. Juli 2019 at 17:02 #46300
Now I can hear sound via hifiberry in kodi. I think it was the option „disable internal audio“ under „raspberry settings“. Now the error about hw:0 is also gone.
Shairport gets automatic stopped if you start kodi.
But now I have the problem, that (if kodi is stopped) my iPhone doesnt find the raspberry via airplay. If I choose „non“ as „installed hifiberry card“ my iPhone finds it.
And also squeezelite could not be started. Gives me the following errors:
[17:01:06.902331] test_open:384 playback open error: No such file or directory
[17:01:06.902516] output_init_common:382 unable to open output device
Many thanks for your help!15. Juli 2019 at 15:26 #46312
Make sure the shairport and squeezelite output devices are different (sysdefault hifiberry and default hifiberry), you can also add -C 5 to automatically close the port for the player after 5 secs of inactivity to make sure your players don’t overlap.17. Juli 2019 at 15:54 #46350
I think we are getting closer to what I want, but it already didn’t work at all.
-C 5 option was already set for squeezelite but not for shairport. I set it yet. There I recognized, that hw:1 was set for both sqeezelite and shairport. I changed it to hw:0 for both and now squeezelite is also able to start and with it iPhone finds the raspberry via airplay.
But now my first problem is present again. In Kodi the hifiberry card is choosen as audio device, but no sound in Kodi. Shairport and Squeezelite are stopped while Kodi is running. (incidentally: there is no option to run Shairport and Kodi simultanously?). The option „disable internal audio“ is still enabled.
Again thanks for your help!!!!18. Juli 2019 at 10:36 #46356
Sorry, I wasn’t clear on the command line options.
Shairport doesn’t have the command line option -C 5, so you need to remove it again. Here’s an overview of shairport’s command line options.
When you start Kodi, the audioplayers are stopped. Check to see if Kodi has the right audio output device selected in its settings.28. Juli 2019 at 20:27 #46511
Sorry for my late response, had no time the last few days.
I tried some settings:
If I deactivate the option „disable internal audio“ under tab „raspberry settings“, the hifiberry card is located at hw:1, so I have to set hw:1 as option in the settings of squeezelite and shairplay to play music via Iphone.
If I enable the option „disable internal audio“, hifiberry is on hw:0, which then I have to set in the option.
In both ways, I only can get sound in kodi via hdmi.
If option „disable internal audio“ is not set, hifiberry isn‘t available in kodi.
If option „disable internal audio“ is set, I can choose hifiberry card in kodi, but no sound.
So actually there is only the problem with kodi…29. Juli 2019 at 9:40 #46514
As mentioned, the card might be somehow occupied by these players. In Squeezelite, please make sure there’s a „-C 5“ in the command line options which disconnects the card from Sqlite after 5 seconds of inactivity, opening it for Kodi.13. August 2019 at 20:44 #46764
I’m sorry for being annoying, but I dont‘ get this.
Now I downloaded the newest max2play image and copied it to a new SD-card. I only set the necessary settings: Hifiberry card, disable internal audio (only with this option I can choose hifiberry in kodi), an I set the hifiberry card in kodi as audio output.
Squeezelite and Shareplay are disabled. Nevertheless -C 5 option in Squeezelite is set.
Actually I don’t worry about sound via Squeezelite and Shairplay. I am only trying to get sound in kodi. But I don’t get it, but once I had a setup where I got sound in kodi, but not via shairplay and actually I can’t reproduce it.
I don’t know what to do. Meanwhile I doubt I can get kodi running with sound.
So if there are any further suggestions, please give it to me. Hope is the last to die.14. August 2019 at 9:59 #46765
Sorry about the confusion. When they aren’t running, the -C 5 value is obviously of no concern.
Make sure you have build in audio disabled in the Raspberry Settings, reboot and check the Kodi audio settings for hifiberry option for audio output.14. August 2019 at 10:29 #46768
built in audio is disabled. If it is enabled, hifiberry amp is not an option in kodi. So I disabled it an I can choose hifiberry as audio output in kodi, but there is no sound.15. August 2019 at 10:23 #46777
That’s very odd. If no other player is running and Kodi has the hifiberry output selected, there is really no reason for it not put out sound. Have you tried adjusting the volume upwards? It might be that Kodi’s volume level is lower than shairport.16. August 2019 at 12:26 #46781
would have been nice, if it only was the volume. My hope rised for a short time, but sadly not the solution.
Maybe I will try hifiberry with a simple kodi installation and not max2play.23. August 2019 at 9:25 #46829
now I tried two installations of kodi: Once with manually installed kodi under raspbian, where I have to make some settings in raspbian, but then I got hifiberry running under kodi. And once with kodi installed via Noobs, where hifiberry was running instantly.
I further don’t know whats the problem under max2play, but my hope is rising! I will go on trying 🙂28. August 2019 at 11:25 #46895
Thanks for sharing, please let us know when you have another update and when you try a fresh install of Max2Play, please follow these steps:
– Select HiFiBerry
– Select AMP2 (reboot)
– Start Kodi
– Select audio output
– If no hifiberry option appears, deactivate build in audio in Raspberry Settings, reboot and start Kodi again23. März 2020 at 10:57 #48204
I have good news for this topic:
Because of sound in kodi via hifiberry wasn’t working, I decided to use max2play only in the other rooms and in the living room I installed stand alone kodi on raspberry (without max2play). The last days I started reinstalling my max2play-raspi with the new max2play version (v2.51).
Originally I wanted to test another thing (HDMI CEC) and for that I pluged a raspberry with newest max2play version in my TV. Surprisingly sound via hifiberry in kodi works out of the box. I actually haven’t made a decision, but maybe I will again install max2play on my raspberry in the living room to listen to music and watch videos via kodi.25. März 2020 at 18:00 #48265
Thanks for the update! And please keep us posted in the future as well 🙂
You must be logged in to reply to this topic.