Can't get mopidy output sound (kodibuntu+mopidy)



  • moderate linux experiance
  • having xbmcbuntu instllation (recently upgraded) - meaning Ubuntu booted directly to XBMC/Kodi
  • no problems whatsoever inside xbmc, sound works as expected
  • no sound from mopidy

I am not entirely sure whether xbmc uses pulse or alsa, but i think it is alsa.
I was trying different approaches, one of them running pacmd - which can’t be found.
On the other hand alsamixer works (at least opens) and i can do aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

In xbmc output goes to HDMI and I would also like mopidy to use HDMI.
Now, the problem is i tried like 15 different configuration options in mopidy.conf, but there is just no sound from mopidy.

If someone is kind enough to help me out with this, i would really appreciate it.
Is also entitled for a cup of :coffee: :smile:

Try with this in your mopidy.conf:

output = alsasink device=hw:0,3

The 0,3 is card,device taken from your aplay -l output.

1 Like

OMG, i feel so extremelylame right now.
I had so many different configs, but all more complicated than this one.
Sometimes simplest things make wonders.

Thx 100 times jodal.
It works perfectly now.


I like how you post separate topics for each issue. Much easier to answer, and we get lots of helpful threads for newcomers that way :slight_smile:

I was happy too soon as it turned out.
After some testing and playing with mopidy/kodi, i am now pretty sure that after mopidy plays some music, kodi sound stops to work. I have to restart the system for kodi to be back again.

Edit: it is actually enough to stop mopidy service

I had an impression this should not be a problem, but seems it is.
Is there a way to fix this or should I maybe go with pulse?

This is a copy/paste from kodi wiki:

Linux has two different audio systems, these are PulseAudio and Advanced Linux Sound Architecture (ALSA).
If you have a PC that is exclusively used for XBMC then using ALSA maybe the best solution.
If you have a PC runs many applications other than XBMC then using PulseAudio maybe the the best solution.

I am really not sure what to do right now.

Seeing as you boot directly to Kodi it sounds like you are option 1. I run Mopidy alongside my Xbian (XBMC on raspberry Pi) system using ALSA without issue. I think there was an option to have them share the sound device, streamsilence (or something ).

Streamsilence in advanced settings XML was recently removed.

I am using moped as my frontend (but there is actually no difference with other frontends - related to this question). When I play something, there is a Pause button - which, well, yes, pauses the stream/music.

Is there any way to stop mopidy to play music, not just pausing it?
I think this could actually be a main problem causing xbmc not be able to output sound after mopidy has played something.

So, mopidy > stop?

Might well be. You can test this by issuing a stop command with mpc (‘mpc
stop’!). I think musicbox-webclient has a stop button but only for streams
(due to some sort of concern over the buffering which I never really
understood) .

‘mpc stop’ does the trick and releases device apparently.
So, maybe add a pull request to moped with additional stop button would be accepted? Or maybe just add it for myself :flushed:

You never know until you try! Glad to know that’s the trick as I’ll likely
need it too when I eventually upgrade to kodi.

@svashtar: Thanks for sharing this!

@tkem sure, i’m glad solutions to my own problems help someone else , too :beers:

PS: i am actually juggling my thoughts on creating a brand new shiny mopidy web player - i need some time and beer to think it through. I am very new to mopidy and have no idea whether there is any “demand” on new players? Well, competition is always good i think, anyway. :innocent: