Audio from Kodi and Roonbridge to IQAdac+ sound card + RP3 Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
fai

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

Post by fai »

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?
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Audio from Kodi and Roonbridge to IQAdac+ sound card + R

Post by Fourdee »

fai wrote: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?
Hi,

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: https://community.roonlabs.com/t/dietpi ... dan_knight

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 :)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
wizardofoz
Posts: 13
Joined: Sat Dec 17, 2016 6:34 am

Re: Audio from Kodi and Roonbridge to IQAdac+ sound card + R

Post by wizardofoz »

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.
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Audio from Kodi and Roonbridge to IQAdac+ sound card + R

Post by Fourdee »

wizardofoz wrote: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 :)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
fai

Re: Audio from Kodi and Roonbridge to IQAdac+ sound card + R

Post by fai »

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.
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Audio from Kodi and Roonbridge to IQAdac+ sound card + R

Post by Fourdee »

fai wrote: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.
simultaneously
Yep quite right, I didnt read it correctly lol (apologies Wizard & Fai :) )

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)

Code: Select all

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.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
fai

Re: Audio from Kodi and Roonbridge to IQAdac+ sound card + R

Post by fai »

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

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?
User avatar
Fourdee
Site Admin
Posts: 2782
Joined: Tue Feb 06, 2007 1:36 pm

Re: Audio from Kodi and Roonbridge to IQAdac+ sound card + R

Post by Fourdee »

fai wrote: 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.
What are your thoughts? Would you still like those test results?
Sounds good (no pun intended ;)).

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.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply