[Solved] USB Dac Wont Play Through Mopidy But Works Everywhere Else

I have a USB Dac hooked up to my Pi Zero running Jessie (It’s a Daffodil US01 USB Sound Card 7.1 Channel / Plug and Play / Microphone In and 3.5mm Speaker Out. ‘alas-info’ lists it as: USB-Audio - C-Media USB Headphone Set).

It works great when I do: aplay /usr/share/sounds/alsa/Front_Center.wav -D sysdefault:CARD=Set

It also works great if I do airplay streaming to it.

It does NOT work however in Mopidy.
When I try and play my music I get no sound.

I have installed gstreamer0.10-alsa as well as Mopidy-ALSAMixer.
I don’t get any errors or warnings in the logs.

If I go into alsamixer the USB sound card is set as the main card, and if I run ‘mixer controls’ I get:
Simple mixer control ‘Headphone’,0
Simple mixer control ‘Mic’,0
Simple mixer control ‘Auto Gain Control’,0

My config /etc/mopidy/mopidy.conf:

[audio]
output = alsasink
mixer = alsamixer

[alsamixer]
card = 1
control = Headphone

Again, no errors or warnings in either the mopidy log file or the main messages log file.
Anyone have any ideas or suggestions?

So I was re-reading the doc “Default Core Configuration” at https://docs.mopidy.com/en/latest/config/#default-core-configuration and noticed the part that talks about “Custom audio sinks” and testing if the setup is working from the command line as it’s what Mopidy uses and if it doesn’t work, then Mopidy won’t work.

So I ran the default command it shows:
gst-launch-0.10 audiotestsrc ! audioresample ! autoaudiosink

And I got the audio fine.
Remember, if I set my config to use ‘autoaudiosink’ I still get no audio out of Mopidy.

I then tried the command with alsasink.
gst-launch-0.10 audiotestsrc ! audioresample ! alsasink

Once again, I got the audio fine.

This is almost starting to look like a bug with Mopidy…
I don’t know… Anyone???

Are you running the test commands and Mopidy as the same user? Mopidy running as a service runs as the mopidy user. This might be a permissions problem?

When I read this I thought you probably had it, but I jumped in and did a good old sudo su - mopidy and then ran both the tests and both worked fine.

So I reinstalled Mopidy and now I am getting an actual error when I try and play ANYTHING (reinstalling did fix a bunch of other issues I was having with Mopidy, so something was up with my install, but this one issue still persists)

The error is:

ERROR [2208:MainThread] mopidy.audio.gst: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.

Any time I try and play a new item this shows again.

Running the GStreamer debugging I found some important information.

INFO              GST_STATES gstelement.c:2460:gst_element_continue_state:<streamsynchronizer0> completed state change to READY
INFO              GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<streamsynchronizer0> notifying about state-changed NULL to READY (VOID_PENDING pending)
INFO              GST_STATES gstbin.c:2526:gst_bin_change_state_func:<playsink0> child 'streamsynchronizer0' changed state to 2(READY) successfully
INFO              GST_STATES gstelement.c:2460:gst_element_continue_state:<playsink0> completed state change to READY
INFO              GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<playsink0> notifying about state-changed NULL to READY (VOID_PENDING pending)
INFO              GST_STATES gstbin.c:2526:gst_bin_change_state_func:<playbin20> child 'playsink0' changed state to 2(READY) successfully
INFO              GST_STATES gstelement.c:2460:gst_element_continue_state:<playbin20> completed state change to READY
INFO              GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<playbin20> notifying about state-changed NULL to READY (VOID_PENDING pending)
DEBUG    [2500:MainThread] mopidy.audio.gst
  Got state-changed message: old=GST_STATE_NULL new=GST_STATE_READY pending=GST_STATE_VOID_PENDING
DEBUG    [2500:Audio-3] mopidy.audio.gst
  State change to GST_STATE_READY: result=GST_STATE_CHANGE_SUCCESS
DEBUG    [2500:LocalBackend-7] mopidy.backend
  Backend translated URI from local:track:Dropbox/Falco/Falco-One%20Night%20in%20Bangkok.mp3 to file:///music/Dropbox/Falco/Falco-One%20Night%20in%20Bangkok.mp3
INFO      GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-0.10/libgstdecodebin2.so" loaded
INFO     GST_ELEMENT_FACTORY gstelementfactory.c:376:gst_element_factory_create: creating element "uridecodebin"
INFO              GST_STATES gstelement.c:2460:gst_element_continue_state:<uridecodebin0> completed state change to READY
INFO              GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<uridecodebin0> notifying about state-changed NULL to READY (VOID_PENDING pending)
INFO                playsink gstplaysink.c:1105:do_async_start:<playsink0> Sending async_start message
INFO              GST_STATES gstelement.c:2460:gst_element_continue_state:<streamsynchronizer0> completed state change to PAUSED
INFO              GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<streamsynchronizer0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
INFO              GST_STATES gstbin.c:2526:gst_bin_change_state_func:<playsink0> child 'streamsynchronizer0' changed state to 3(PAUSED) successfully
INFO              GST_STATES gstbin.c:2532:gst_bin_change_state_func:<playbin20> child 'playsink0' is changing state asynchronously to PAUSED
INFO     GST_ELEMENT_FACTORY gstelementfactory.c:374:gst_element_factory_create: creating element "filesrc" named "source"
INFO        GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstBaseSrc@0x23a40a0> adding pad 'src'
INFO                 filesrc gstfilesrc.c:374:gst_file_src_set_location: filename : /music/Dropbox/Falco/Falco-One Night in Bangkok.mp3
INFO                 filesrc gstfilesrc.c:375:gst_file_src_set_location: uri      : file:///music/Dropbox/Falco/Falco-One%20Night%20in%20Bangkok.mp3
DEBUG    [2500:Audio-3] mopidy.audio.gst
  Got source-setup: element=/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstFileSrc:source (__main__.GstFileSrc)
INFO     GST_ELEMENT_FACTORY gstelementfactory.c:376:gst_element_factory_create: creating element "decodebin2"
INFO     GST_ELEMENT_FACTORY gstelementfactory.c:374:gst_element_factory_create: creating element "typefind" named "typefind"
INFO        GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstTypeFindElement@0x31f0838> adding pad 'sink'
INFO        GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstTypeFindElement@0x31f0838> adding pad 'src'
INFO        GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad typefind:sink
INFO                GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link sink:proxypad3 and typefind:sink
INFO                GST_PADS gstpad.c:2161:gst_pad_link_full: linked sink:proxypad3 and typefind:sink, successful
INFO        GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstDecodeBin2@0x23a6078> adding pad 'sink'
INFO        GST_ELEMENT_PADS gstutils.c:1698:gst_element_link_pads_full: trying to link element source:(any) to element decodebin20:sink
INFO        GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad decodebin20:sink
INFO                GST_PADS gstutils.c:1596:prepare_link_maybe_ghosting: source and decodebin20 in same bin, no need for ghost pads
INFO                GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link source:src and decodebin20:sink
INFO                GST_PADS gstpad.c:2161:gst_pad_link_full: linked source:src and decodebin20:sink, successful
INFO              GST_STATES gstelement.c:2460:gst_element_continue_state:<typefind> completed state change to READY
INFO              GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<typefind> notifying about state-changed NULL to READY (VOID_PENDING pending)
INFO              GST_STATES gstbin.c:2526:gst_bin_change_state_func:<decodebin20> child 'typefind' changed state to 2(READY) successfully
INFO              GST_STATES gstelement.c:2435:gst_element_continue_state:<decodebin20> committing state from NULL to READY, pending PAUSED, next PAUSED
INFO              GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<decodebin20> notifying about state-changed NULL to READY (PAUSED pending)
INFO              GST_STATES gstelement.c:2442:gst_element_continue_state:<decodebin20> continue state change READY to PAUSED, final PAUSED
INFO                 filesrc gstfilesrc.c:969:gst_file_src_start:<source> opening file /music/Dropbox/Falco/Falco-One Night in Bangkok.mp3
INFO      GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-0.10/libgsttypefindfunctions.so" loaded
INFO                typefind gsttypefindelement.c:178:gst_type_find_element_have_type:<typefind> found caps application/x-id3, probability=100
INFO        GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad typefind:src
INFO        GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad typefind:sink
INFO                GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link typefind:src and decodepad0:proxypad4
INFO                GST_PADS gstpad.c:2161:gst_pad_link_full: linked typefind:src and decodepad0:proxypad4, successful
INFO        GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad audio-sink:sink
WARN                    alsa pcm_hw.c:1557:snd_pcm_hw_open: alsalib error: open '/dev/snd/pcmC1D0p' failed (-16): Device or resource busy
WARN                    alsa gstalsasink.c:689:gst_alsasink_open:<alsasink0> error: Could not open audio device for playback. Device is being used by another application.
WARN                    alsa gstalsasink.c:689:gst_alsasink_open:<alsasink0> error: Device 'default' is busy
INFO        GST_ERROR_SYSTEM gstelement.c:1964:gst_element_message_full:<alsasink0> posting message: Could not open audio device for playback. Device is being used by another application.
INFO        GST_ERROR_SYSTEM gstelement.c:1987:gst_element_message_full:<alsasink0> posted error message: Could not open audio device for playback. Device is being used by another application.
INFO              GST_STATES gstelement.c:2768:gst_element_change_state:<alsasink0> have FAILURE change_state return
INFO              GST_STATES gstelement.c:2335:gst_element_abort_state:<alsasink0> aborting state from NULL to READY
INFO              GST_STATES gstbin.c:2542:gst_bin_change_state_func:<bin0> child 'alsasink0' failed to go to state 2(READY)
INFO              GST_STATES gstelement.c:2768:gst_element_change_state:<bin0> have FAILURE change_state return
INFO              GST_STATES gstbin.c:2542:gst_bin_change_state_func:<outputs> child 'bin0' failed to go to state 2(READY)
INFO              GST_STATES gstelement.c:2768:gst_element_change_state:<outputs> have FAILURE change_state return
INFO              GST_STATES gstbin.c:2542:gst_bin_change_state_func:<audio-sink> child 'outputs' failed to go to state 2(READY)
INFO              GST_STATES gstelement.c:2768:gst_element_change_state:<audio-sink> have FAILURE change_state return
INFO        GST_ELEMENT_PADS gstpad.c:1750:gst_pad_unlink: unlinking typefind:src(0x27d3a68) and decodepad0:proxypad4(0x27c6368)
INFO        GST_ELEMENT_PADS gstpad.c:1795:gst_pad_unlink: unlinked typefind:src and decodepad0:proxypad4
INFO                GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link typefind:src and decodepad0:proxypad4
INFO                GST_PADS gstpad.c:2161:gst_pad_link_full: linked typefind:src and decodepad0:proxypad4, successful
INFO        GST_ELEMENT_PADS gstpad.c:1750:gst_pad_unlink: unlinking typefind:src(0x27d3a68) and decodepad0:proxypad4(0x27c6368)
INFO        GST_ELEMENT_PADS gstpad.c:1795:gst_pad_unlink: unlinked typefind:src and decodepad0:proxypad4
INFO      GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-0.10/libgstid3demux.so" loaded
INFO     GST_ELEMENT_FACTORY gstelementfactory.c:376:gst_element_factory_create: creating element "id3demux"
INFO        GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstTagDemux@0x3308170> adding pad 'sink'
INFO                GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link typefind:src and id3demux0:sink
INFO                GST_PADS gstpad.c:2161:gst_pad_link_full: linked typefind:src and id3demux0:sink, successful
INFO              GST_STATES gstelement.c:2460:gst_element_continue_state:<id3demux0> completed state change to READY
INFO              GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<id3demux0> notifying about state-changed NULL to READY (VOID_PENDING pending)
INFO        GST_ELEMENT_PADS gstelement.c:972:gst_element_get_static_pad: no such pad 'src' in element "id3demux0"
INFO                 filesrc gstfilesrc.c:969:gst_file_src_start:<source> opening file /music/Dropbox/Falco/Falco-One Night in Bangkok.mp3
INFO                 filesrc gstfilesrc.c:969:gst_file_src_start:<source> opening file /music/Dropbox/Falco/Falco-One Night in Bangkok.mp3
INFO                id3demux gstid3demux.c:155:gst_id3demux_identify_tag:<id3demux0> Found ID3v2 marker, tag_size = 20480
INFO                 default gstid3tag.c:133:gst_tag_from_id3_tag: Cannot map ID3v2 tag 'WXXX' to GStreamer tag
INFO                 default gstid3tag.c:133:gst_tag_from_id3_tag: Cannot map ID3v2 tag 'PRIV' to GStreamer tag
INFO                 default gstid3tag.c:133:gst_tag_from_id3_tag: Cannot map ID3v2 tag 'PRIV' to GStreamer tag
INFO                 default gstid3tag.c:133:gst_tag_from_id3_tag: Cannot map ID3v2 tag 'TOPE' to GStreamer tag
INFO                 default gstid3tag.c:133:gst_tag_from_id3_tag: Cannot map ID3v2 tag 'NCON' to GStreamer tag
INFO                id3demux gstid3demux.c:155:gst_id3demux_identify_tag:<id3demux0> Found ID3v1 marker, tag_size = 128
INFO       typefindfunctions gsttypefindfunctions.c:1267:mp3_type_find_at_offset: audio/mpeg calculated 100  =  100  *  5 / 5  *  (10000 - 0) / 10000
INFO        GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<id3demux0> adding pad 'src'
INFO                GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link id3demux0:src and decodepad1:proxypad5
INFO                GST_PADS gstpad.c:2161:gst_pad_link_full: linked id3demux0:src and decodepad1:proxypad5, successful
INFO        GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad audio-sink:sink
WARN                    alsa pcm_hw.c:1557:snd_pcm_hw_open: alsalib error: open '/dev/snd/pcmC1D0p' failed (-16): Device or resource busy
WARN                    alsa gstalsasink.c:689:gst_alsasink_open:<alsasink0> error: Could not open audio device for playback. Device is being used by another application.
WARN                    alsa gstalsasink.c:689:gst_alsasink_open:<alsasink0> error: Device 'default' is busy
INFO        GST_ERROR_SYSTEM gstelement.c:1964:gst_element_message_full:<alsasink0> posting message: Could not open audio device for playback. Device is being used by another application.
INFO        GST_ERROR_SYSTEM gstelement.c:1987:gst_element_message_full:<alsasink0> posted error message: Could not open audio device for playback. Device is being used by another application.
INFO              GST_STATES gstelement.c:2768:gst_element_change_state:<alsasink0> have FAILURE change_state return
INFO              GST_STATES gstelement.c:2335:gst_element_abort_state:<alsasink0> aborting state from NULL to READY
INFO              GST_STATES gstbin.c:2542:gst_bin_change_state_func:<bin0> child 'alsasink0' failed to go to state 2(READY)
INFO              GST_STATES gstelement.c:2768:gst_element_change_state:<bin0> have FAILURE change_state return
INFO              GST_STATES gstbin.c:2542:gst_bin_change_state_func:<outputs> child 'bin0' failed to go to state 2(READY)
INFO              GST_STATES gstelement.c:2768:gst_element_change_state:<outputs> have FAILURE change_state return
INFO              GST_STATES gstbin.c:2542:gst_bin_change_state_func:<audio-sink> child 'outputs' failed to go to state 2(READY)
INFO              GST_STATES gstelement.c:2768:gst_element_change_state:<audio-sink> have FAILURE change_state return
INFO        GST_ELEMENT_PADS gstpad.c:1750:gst_pad_unlink: unlinking id3demux0:src(0x27d3bf8) and decodepad1:proxypad5(0x27c6438)
INFO        GST_ELEMENT_PADS gstpad.c:1795:gst_pad_unlink: unlinked id3demux0:src and decodepad1:proxypad5
INFO                GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link id3demux0:src and decodepad1:proxypad5
INFO                GST_PADS gstpad.c:2161:gst_pad_link_full: linked id3demux0:src and decodepad1:proxypad5, successful
INFO        GST_ELEMENT_PADS gstpad.c:1750:gst_pad_unlink: unlinking id3demux0:src(0x27d3bf8) and decodepad1:proxypad5(0x27c6438)
INFO        GST_ELEMENT_PADS gstpad.c:1795:gst_pad_unlink: unlinked id3demux0:src and decodepad1:proxypad5
INFO      GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-0.10/libgstaudioparsers.so" loaded
INFO     GST_ELEMENT_FACTORY gstelementfactory.c:376:gst_element_factory_create: creating element "mpegaudioparse"
INFO        GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstBaseParse@0x23927b0> adding pad 'sink'
INFO        GST_ELEMENT_PADS gstelement.c:728:gst_element_add_pad:<GstBaseParse@0x23927b0> adding pad 'src'
INFO                GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link id3demux0:src and mpegaudioparse0:sink
INFO                GST_PADS gstpad.c:2161:gst_pad_link_full: linked id3demux0:src and mpegaudioparse0:sink, successful
INFO              GST_STATES gstelement.c:2460:gst_element_continue_state:<mpegaudioparse0> completed state change to READY
INFO              GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<mpegaudioparse0> notifying about state-changed NULL to READY (VOID_PENDING pending)
INFO        GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad mpegaudioparse0:src
INFO                GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link mpegaudioparse0:src and decodepad2:proxypad6
INFO                GST_PADS gstpad.c:2161:gst_pad_link_full: linked mpegaudioparse0:src and decodepad2:proxypad6, successful
INFO        GST_ELEMENT_PADS gstpad.c:1750:gst_pad_unlink: unlinking mpegaudioparse0:src(0x27d3d88) and decodepad2:proxypad6(0x27c6508)
INFO        GST_ELEMENT_PADS gstpad.c:1795:gst_pad_unlink: unlinked mpegaudioparse0:src and decodepad2:proxypad6
INFO      GST_PLUGIN_LOADING gstplugin.c:859:gst_plugin_load_file: plugin "/usr/lib/arm-linux-gnueabihf/gstreamer-0.10/libgstcoreindexers.so" loaded
INFO                 filesrc gstfilesrc.c:969:gst_file_src_start:<source> opening file /music/Dropbox/Falco/Falco-One Night in Bangkok.mp3
INFO                 filesrc gstfilesrc.c:969:gst_file_src_start:<source> opening file /music/Dropbox/Falco/Falco-One Night in Bangkok.mp3
INFO               GST_EVENT gstevent.c:600:gst_event_new_new_segment_full: creating newsegment update 0, rate 1.000000, format GST_FORMAT_TIME, start 0:00:00.000000000, stop 99:99:99.999999999, position 0:00:00.000000000
INFO              GST_STATES gstelement.c:2460:gst_element_continue_state:<mpegaudioparse0> completed state change to PAUSED
INFO              GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<mpegaudioparse0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
INFO              GST_STATES gstelement.c:2460:gst_element_continue_state:<id3demux0> completed state change to PAUSED
INFO              GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<id3demux0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
INFO              GST_STATES gstelement.c:2460:gst_element_continue_state:<typefind> completed state change to PAUSED
INFO              GST_STATES gstelement.c:2365:_priv_gst_element_state_changed:<typefind> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
INFO              GST_STATES gstbin.c:2526:gst_bin_change_state_func:<decodebin20> child 'typefind' changed state to 3(PAUSED) successfully
INFO              GST_STATES gstbin.c:2237:gst_bin_element_set_state:<mpegaudioparse0> skipping transition from PAUSED to  PAUSED, since bin pending is PAUSED : last change state return follows
INFO              GST_STATES gstbin.c:2526:gst_bin_change_state_func:<decodebin20> child 'mpegaudioparse0' changed state to 3(PAUSED) successfully
INFO              GST_STATES gstbin.c:2237:gst_bin_element_set_state:<id3demux0> skipping transition from PAUSED to  PAUSED, since bin pending is PAUSED : last change state return follows
INFO                GST_PADS gstpad.c:1978:gst_pad_link_prepare: trying to link mpegaudioparse0:src and decodepad3:proxypad7
INFO                GST_PADS gstpad.c:2161:gst_pad_link_full: linked mpegaudioparse0:src and decodepad3:proxypad7, successful
INFO              GST_STATES gstbin.c:2526:gst_bin_change_state_func:<decodebin20> child 'id3demux0' changed state to 3(PAUSED) successfully
INFO              GST_STATES gstbin.c:2237:gst_bin_element_set_state:<typefind> skipping transition from PAUSED to  PAUSED, since bin pending is PAUSED : last change state return follows
INFO              GST_STATES gstbin.c:2526:gst_bin_change_state_func:<decodebin20> child 'typefind' changed state to 3(PAUSED) successfully
DEBUG    [2500:MainThread] mopidy.audio.actor
  Audio event: tags_changed(tags=['comment', 'artist', 'private-id3v2-frame', 'genre', 'title', 'extended-comment', 'container-format'])
DEBUG    [2500:MainThread] mopidy.listener
  Sending tags_changed to AudioListener: {'tags': ['comment', 'artist', 'private-id3v2-frame', 'genre', 'title', 'extended-comment', 'container-format']}0:11:44.768899313  2500  0x239d720 INFO              GST_STATES gstbin.c:2237:gst_bin_element_set_state:<mpegaudioparse0> skipping transition from PAUSED to  PAUSED, since bin pending is PAUSED : last change state return follows
INFO              GST_STATES gstbin.c:2526:gst_bin_change_state_func:<decodebin20> child 'mpegaudioparse0' changed state to 3(PAUSED) successfully
INFO        GST_ELEMENT_PADS gstelement.c:975:gst_element_get_static_pad: found pad audio-sink:sink
WARN                    alsa pcm_hw.c:1557:snd_pcm_hw_open: alsalib error: open '/dev/snd/pcmC1D0p' failed (-16): Device or resource busy
WARN                    alsa gstalsasink.c:689:gst_alsasink_open:<alsasink0> error: Could not open audio device for playback. Device is being used by another application.

The key lines being:

WARN                    alsa pcm_hw.c:1557:snd_pcm_hw_open: alsalib error: open '/dev/snd/pcmC1D0p' failed (-16): Device or resource busy
WARN                    alsa gstalsasink.c:689:gst_alsasink_open:<alsasink0> error: Could not open audio device for playback. Device is being used by another application.
WARN                    alsa gstalsasink.c:689:gst_alsasink_open:<alsasink0> error: Device 'default' is busy
INFO        GST_ERROR_SYSTEM gstelement.c:1964:gst_element_message_full:<alsasink0> posting message: Could not open audio device for playback. Device is being used by another application.

I have no idea what else would be using the audio device.

Not sure where to go from here…

Hello,

I had the same problem with my usb-soundcard. I checked which device is the soundcard with
aplay --list-devices

then I added this line to /etc/mopidy/mopidy.conf

[audio]
output = alsasink device=hw:1,0

Now it works perfect

Maby you have the same problem.

Best regards,
Stefan
`

1 Like

Found what is conflicting.

It is Shairport (for Airplay support).
If I kill that and then try then things magically start working again.
(for the most part at least, there is at least 1 MP3 that GStreamer is having an issue with, but that seems to be a GStreamer issue)

I reinstalled Shairport (but a fork that that is still being developed “shairport-sync” and used the Development branch even as he has some new things in there) and now everything is working (except the couple strange GStreamer issues with a few of my songs, but thats a different issue.

Thanks everyone for your help!

Doesn’t shairport-sync release the audio device once it has stopped playing? We rely on that fact in musicbox. We are also sure to stop mopidy before shairport-sync starts playing (using their --before command, or whatever it’s called).

Shairport-sync works correctly, the project Shairport is what I was using to start and it was not working correctly.

Hi @kdbdallas:

I’m having the opposite problem… When I add what @r100 's suggested:

[audio]
output = alsasink device=hw:1,0

to the settings.ini file, all the music selected through Mopidy’s web interface plays just fine through the USB DAC. But, when I airplay into the device, it plays through the Rasberry Pi headphone port.

If I have Mopidy music playing then airplay into the device, it will pause Mopidy to play the airplay music. However, if I’m airplay-ing music and press play on the Mopidy web interface, both sources of music keep playing.

Thoughts?

[Running musicbox 0.6]