Sharing audio device with another program

Need help with MPD?
Post Reply
Posts: 18
Joined: January 21st, 2014, 8:44 am

Sharing audio device with another program

Post by tremby »

On my raspberry pi running OSMC I want to run both Kodi and MPD (not a fan of the bulit-in Kodi audio player). They both need to use the same audio interface (Hifiberry Amp2). I believe they're currently both using ALSA (MPD certainly is).

Currently they conflict, since if one is already running, the other can't connect to the busy audio device.

What are my options to allow both to use the same audio device?

It's important to me that both can control the volume via the device's hardware mixer.

They don't necessarily need to output sound at the same moment -- I'm OK to pause one program before playing on the other, if that makes a difference. I just don't want to have to manually run any commands to switch between the two.

I've read that ALSA's dmix might be an option, but not a good one (high CPU usage, reduced audio quality).

I suppose installing Pulseaudio might be another option?

Are there any further options?

Posts: 100
Joined: October 31st, 2013, 4:59 pm

Re: Sharing audio device with another program

Post by conta »

Hi tremby,
i run the same combination like you. And had the same problem... ;)

MPD is not the problem in this case. In Kodi you have a setting to release the audio-interface, when not in use. When you have set this correct, there are no further problems.

I run Kodi in german language, so i cannot tell you the exact setting in Kodi, but it is easy to find in the settings-menu.

Post Reply