Audio from Kodi and Roonbridge to IQAdac+ sound card + RP3

First off, thanks guys for the great job on dietPi. It’s been an amazingly simple platform to work with.

The objective is to get audio out from both Kodi and roonbridge to the sound card simultaneously and I have been unable to do so.

I was able to get Roonbrige to output audio to the sound card and it works brilliantly. Kodi will output audio from HDMI simultaneously too.

Alternatively if I set Kodi audio output to ALSA:IQAdac+ , a reboot will stop roonbridge from being seen on the network but there is still no audio out from Kodi through the soundcard.

Is this objective possible at all with ALSA?


Usually a software dmix would resolve this in /etc/asound.conf to output multiple sources to one card.
However, Roon does not allow for this as it accesses the physical card (eg hw:0,1), bypassing all default soundcard settings in /etc/asound.conf.
So when using Roon, the soundcard in use is locked and dedicated to Roon playback only.

More information here from Roon dev Brian, this is regarding the inability to pipe Roon through the default soundcard on system, with a ALSA EQ setup: DietPi: creating a lean-and-mean Roon Bridge - #205 by brian - DietPi - Roon Labs Community

So for now, Kodi + Roon > Sound card is not possible. You’d have to stop Roon playback, before starting Kodi to release the ALSA stream (lock), and visa versa.

Unless theres another way to achieve this, but i’am yet to find it :slight_smile:

I think Fai means to be able to to stream audio from one or the other (roon or kodi) at one time not simultaneously but without the need to reboot the system. Perhaps the confusion is that now he is able to play kodi audio over Hdmi while roon plays over the iqaudio dac.

The objective is to get audio out from both Kodi and roonbridge to the sound card simultaneously and I have been unable to do so.
Is this objective possible at all with ALSA?

Not sure, but maybe I read it wrong, lets wait for fai’s response :slight_smile:

Hi Fourdee, wizard is correct.

I would like to play either Kodi or Roon to the sound card, one at a time without having to reboot.


Yep quite right, I didnt read it correctly lol (apologies Wizard & Fai :slight_smile: )

Ok so, we’ll need to see if Kodi creates a ALSA stream when idle, or, when playback starts (may also require disable of menu sounds).

If Kodi has a constant stream, the only way I can see of then allow Roon to play, would be to exit Kodi.

I dont have a system ready for testing, so if you could assist with pasting the results of following commands, we can check the above.

Test 1:

  • Stop Roon playback and exit Roon client on the other system.
  • Exit Kodi
  • Launch Kodi xinit kodi
  • Leave it on the main menu
  • Run the following command and paste results (you’ll need to connect over SSH for this, let me know if this isnt possible and i’ll test when I Can)
cat /proc/asound/card*/pcm0p/sub0/hw_params

If this contains any frequency information, it means Kodi generates a dedicated and constant ALSA stream, locking the card until the program is exited.

There may be other options i’am unaware of, but lets see the results 1st and go from there.

Hi Fourdee. I reread my initial posting. Seems like I was rather confusing too with the request. :rofl:

I was fiddling around with DietPi config and somehow managed to get Kodi and Roon to share sound card one stream at a time. It’s an odd thing. I enabled alsa eq on dietpi config. Then the option to choose alsa:iqadac+ as audio output on kodi disappeared. Then I disabled alsa eq. Rebooted. Reselected the also: iqadac+ as kodi audio out and Lo and behold. Kodi switch to roon and back no issues. All plays on the sound card without requiring to reboot. When playing Kodi and trying to send audio to roon bridge resulted in roon error “Transport: Failed to open the audio device” so it seems all good for now.

As of now I have not rebooted to see if this setting will persist, because the last time i set Kodi audio out to alsa:iqadac+ , reboot would break roonbridge entirely. I would have to select Kodi audio out to HDMI and reboot to reinstate roonbridge.

What are your thoughts? Would you still like those test results?

Sounds good (no pun intended :wink:).

If this works after a reboot, indicates that Kodi releases the ALSA stream when playback (and menu sounds) are inactive. If not, the tests should help us confirm whats occurring with Kodi.