Audio Issue w/ USB DAC, no sound, Raspbian

I am trying to get Mopidy to route my sound through my USB DAC. I can get sound out of the HDMI → TV, but not through the USB DAC. I have tried various suggestions on other threads but hasn’t fixed the issue.

$ aplay -l

osmc@osmc:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: DAC [USB Audio DAC], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0

$ gst-launch-1.0 audiotestsrc ! audioresample ! alsasink

osmc@osmc:~$ gst-launch-1.0 audiotestsrc ! audioresample ! alsasink
Setting pipeline to PAUSED …
Pipeline is PREROLLING …
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstAudioSinkClock

I pauses here and doesn’t complete the command process…

$ mopidy --save-debug-log

osmc@osmc:~$ mopidy --save-debug-log
INFO Starting Mopidy 2.1.0
INFO Loading config from builtin defaults
INFO Loading config from /home/osmc/.config/mopidy/mopidy.conf
INFO Loading config from command line options
INFO Enabled extensions: iris, mpd, alsamixer, http, stream, spotify_tunigo, m3u, softwaremixer, file, local-images
INFO Disabled extensions: spotify, local, soundcloud
WARNING Found local configuration errors, the extension has been automatically disabled:
WARNING local/media_dir must be set.
WARNING Found soundcloud configuration errors, the extension has been automatically disabled:
WARNING soundcloud/auth_token must be set.
WARNING Found spotify configuration errors, the extension has been automatically disabled:
WARNING spotify/username must be set.
WARNING spotify/password must be set.
WARNING Please fix the extension configuration errors or disable the extensions to silence these messages.
INFO Starting Mopidy mixer: SoftwareMixer
INFO Starting Mopidy audio
INFO Starting Mopidy backends: SpotifyTunigoBackend, StreamBackend, M3UBackend, FileBackend
INFO Audio output set to “autoaudiosink”
INFO Starting Mopidy core
INFO Starting Mopidy frontends: IrisFrontend, MpdFrontend, HttpFrontend
INFO Starting Iris 2.14.2
ERROR Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use
INFO HTTP server running at [::ffff:127.0.0.1]:6680
INFO Starting GLib mainloop

$ sudo mopidyctl config

osmc@osmc:~$ sudo mopidyctl config
Running “/usr/bin/mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf config” as user mopidy
[core]
cache_dir = /var/cache/mopidy
config_dir = /etc/mopidy
data_dir = /var/lib/mopidy
max_tracklist_length = 10000
restore_state = false

[logging]
color = true
console_format = %(levelname)-8s %(message)s
debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
debug_file = /var/log/mopidy/mopidy-debug.log
config_file = /etc/mopidy/logging.conf

[audio]
mixer = software
mixer_volume =
output = autoaudiosink
buffer_time =

[proxy]
scheme =
hostname =
port =
username =
password =

[iris]
enabled = true
pusherport = 6681
country = NZ
locale = en_NZ

[local-images]
enabled = true
library = json
base_uri = /images/
image_dir =
album_art_files =
*.jpg
*.jpeg
*.png

[spotify]
enabled = true
username = XXXXXXXXX
password = XXXX
bitrate = 320
volume_normalization = true
private_session = false
timeout = 10
allow_cache = true
allow_network = true
allow_playlists = true
search_album_count = 20
search_artist_count = 10
search_track_count = 50
toplist_countries =

[soundcloud]
enabled = false ; Extension disabled due to config errors.
explore_songs = 25
auth_token = ; Must be set.

[spotify_tunigo]
enabled = true
region =
sub_genres = true
cache_time = 3600

[alsamixer]
enabled = true
card = 0
control = Master

[mpd]
enabled = true
hostname = 127.0.0.1
port = 6600
password =
max_connections = 20
connection_timeout = 60
zeroconf = Mopidy MPD server on $hostname
command_blacklist =
listall
listallinfo
default_playlist_scheme = m3u

[http]
enabled = true
hostname = 192.168.1.253
port = 6680
static_dir =
zeroconf = Mopidy HTTP server on $hostname

[stream]
enabled = true
protocols =
http
https
mms
rtmp
rtmps
rtsp
metadata_blacklist =
timeout = 5000

[m3u]
enabled = true
base_dir =
default_encoding = latin-1
default_extension = .m3u8
playlists_dir = /var/lib/mopidy/playlists

[softwaremixer]
enabled = true

[file]
enabled = true
media_dirs =
$XDG_MUSIC_DIR|Music
~/|Home
excluded_file_extensions =
.jpg
.jpeg
show_dotfiles = false
follow_symlinks = false
metadata_timeout = 1000

[local]
enabled = true
library = json
media_dir = /var/lib/mopidy/media
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
excluded_file_extensions =
.directory
.html
.jpeg
.jpg
.log
.nfo
.png
.txt

mopidy deps

osmc@osmc:~$ mopidy deps
Executable: /usr/bin/mopidy
Platform: Linux-4.9.29-4-osmc-armv7l-with-debian-8.8
Python: CPython 2.7.9 from /usr/lib/python2.7
Mopidy: 2.1.0 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
tornado>=3.2: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-ALSAMixer: 1.0.3 from /usr/lib/python2.7/dist-packages
Mopidy>=0.19: 2.1.0 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
tornado>=3.2: 3.2.2 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
pyalsaaudio: 0.7 from /usr/lib/python2.7/dist-packages
Mopidy-Iris: 2.14.2 from /usr/local/lib/python2.7/dist-packages
setuptools>=3.3: 5.5.1 from /usr/lib/python2.7/dist-packages
pylast>=1.6.0: 1.8.0 from /usr/local/lib/python2.7/dist-packages
six: 1.8.0 from /usr/lib/python2.7/dist-packages
spotipy>=2.3.8: 2.4.4 from /usr/local/lib/python2.7/dist-packages
requests>=1.0: 2.4.3 from /usr/lib/python2.7/dist-packages
Mopidy>=2.0: 2.1.0 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
tornado>=3.2: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-Local-Images>=1.0: 1.0.0 from /usr/local/lib/python2.7/dist-packages
uritools>=1.0: 2.0.0 from /usr/local/lib/python2.7/dist-packages
ipaddress: 1.0.18 from /usr/local/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
setuptools: 5.5.1 from /usr/lib/python2.7/dist-packages
Mopidy>=1.1: 2.1.0 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
tornado>=3.2: 3.2.2 from /usr/lib/python2.7/dist-packages
ConfigObj>=5.0.6: 5.0.6 from /usr/local/lib/python2.7/dist-packages
six: 1.8.0 from /usr/lib/python2.7/dist-packages
Mopidy-SoundCloud: 2.0.2 from /usr/lib/python2.7/dist-packages
Mopidy>=1.0: 2.1.0 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
tornado>=3.2: 3.2.2 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
requests>=2.0.0: 2.4.3 from /usr/lib/python2.7/dist-packages
Mopidy-Local-Images: 1.0.0 from /usr/local/lib/python2.7/dist-packages
uritools>=1.0: 2.0.0 from /usr/local/lib/python2.7/dist-packages
ipaddress: 1.0.18 from /usr/local/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
setuptools: 5.5.1 from /usr/lib/python2.7/dist-packages
Mopidy>=1.1: 2.1.0 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
tornado>=3.2: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify: 3.0.0 from /usr/lib/python2.7/dist-packages
Mopidy>=2.0: 2.1.0 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
tornado>=3.2: 3.2.2 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
cffi>=1.0.0: 1.1.2 from /usr/lib/python2.7/dist-packages
pycparser: 2.10 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify-Tunigo: 1.0.0 from /usr/lib/python2.7/dist-packages
Mopidy>=0.19.0: 2.1.0 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
tornado>=3.2: 3.2.2 from /usr/lib/python2.7/dist-packages
Mopidy-Spotify>=1.2.0: 3.0.0 from /usr/lib/python2.7/dist-packages
Mopidy>=2.0: 2.1.0 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
tornado>=3.2: 3.2.2 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
pyspotify>=2.0.5: 2.0.5 from /usr/lib/python2.7/dist-packages
cffi>=1.0.0: 1.1.2 from /usr/lib/python2.7/dist-packages
pycparser: 2.10 from /usr/lib/python2.7/dist-packages
requests>=2.0: 2.4.3 from /usr/lib/python2.7/dist-packages
Pykka>=1.1: 1.2.1 from /usr/lib/python2.7/dist-packages
tunigo>=1.0.0: 1.0.0 from /usr/lib/python2.7/dist-packages
requests>=2.0.0: 2.4.3 from /usr/lib/python2.7/dist-packages
GStreamer: 1.4.4.0 from /usr/lib/python2.7/dist-packages/gi
Detailed information:
Python wrapper: python-gi 3.14.0
Relevant elements:
Found:
uridecodebin
souphttpsrc
appsrc
alsasink
osssink
oss4sink
id3demux
id3v2mux
lamemp3enc
mad
mpegaudioparse
vorbisdec
vorbisenc
vorbisparse
oggdemux
oggmux
oggparse
flacdec
flacparse
shout2send
Not found:
pulsesink
flump3dec
mpg123audiodec

This should have come up in the other threads, have you tried specifying the device to use in your mopidy.conf:

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

Yes, i have. I can’t get a song to play when i specify that output.

So what is the actual error message in the log file when using that config?

And what’s the result of using that with the testing pipeline:

gst-launch-1.0 audiotestsrc ! audioresample ! alsasink device=hw:1,0

Does osmc use ALSA or Pulseaudio?

Is this a Mopidy specific problem? Do other programs produce output through your USB DAC?

When I add “[audio] output = alsasink device=hw:1,0” to config

osmc@osmc:~$ mopidy -v
INFO 2017-06-07 23:12:54,924 [857:MainThread] mopidy.main
Starting Mopidy 2.1.0
DEBUG 2017-06-07 23:12:54,942 [857:MainThread] mopidy.ext
Loading entry point: iris = mopidy_iris:Extension
DEBUG 2017-06-07 23:12:55,249 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-Iris 2.14.2
DEBUG 2017-06-07 23:12:55,251 [857:MainThread] mopidy.ext
Loading entry point: local-images = mopidy_local_images:Extension
DEBUG 2017-06-07 23:12:55,253 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-Local-Images 1.0.0
DEBUG 2017-06-07 23:12:55,271 [857:MainThread] mopidy.ext
Loading entry point: soundcloud = mopidy_soundcloud:SoundCloudExtension
DEBUG 2017-06-07 23:12:55,273 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-SoundCloud 2.0.2
DEBUG 2017-06-07 23:12:55,274 [857:MainThread] mopidy.ext
Loading entry point: spotify_tunigo = mopidy_spotify_tunigo:Extension
DEBUG 2017-06-07 23:12:55,276 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-Spotify-Tunigo 1.0.0
DEBUG 2017-06-07 23:12:55,277 [857:MainThread] mopidy.ext
Loading entry point: spotify = mopidy_spotify:Extension
DEBUG 2017-06-07 23:12:55,279 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-Spotify 3.1.0
DEBUG 2017-06-07 23:12:55,280 [857:MainThread] mopidy.ext
Loading entry point: alsamixer = mopidy_alsamixer:Extension
DEBUG 2017-06-07 23:12:55,281 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-ALSAMixer 1.0.3
DEBUG 2017-06-07 23:12:55,282 [857:MainThread] mopidy.ext
Loading entry point: mpd = mopidy.mpd:Extension
DEBUG 2017-06-07 23:12:55,283 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-MPD 2.1.0
DEBUG 2017-06-07 23:12:55,283 [857:MainThread] mopidy.ext
Loading entry point: http = mopidy.http:Extension
DEBUG 2017-06-07 23:12:55,285 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-HTTP 2.1.0
DEBUG 2017-06-07 23:12:55,285 [857:MainThread] mopidy.ext
Loading entry point: stream = mopidy.stream:Extension
DEBUG 2017-06-07 23:12:55,286 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-Stream 2.1.0
DEBUG 2017-06-07 23:12:55,286 [857:MainThread] mopidy.ext
Loading entry point: m3u = mopidy.m3u:Extension
DEBUG 2017-06-07 23:12:55,288 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-M3U 2.1.0
DEBUG 2017-06-07 23:12:55,288 [857:MainThread] mopidy.ext
Loading entry point: softwaremixer = mopidy.softwaremixer:Extension
DEBUG 2017-06-07 23:12:55,289 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-SoftwareMixer 2.1.0
DEBUG 2017-06-07 23:12:55,289 [857:MainThread] mopidy.ext
Loading entry point: file = mopidy.file:Extension
DEBUG 2017-06-07 23:12:55,290 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-File 2.1.0
DEBUG 2017-06-07 23:12:55,291 [857:MainThread] mopidy.ext
Loading entry point: local = mopidy.local:Extension
DEBUG 2017-06-07 23:12:55,300 [857:MainThread] mopidy.ext
Loaded extension: Mopidy-Local 2.1.0
DEBUG 2017-06-07 23:12:55,301 [857:MainThread] mopidy.ext
Discovered extensions: iris, local-images, soundcloud, spotify_tunigo, spotify, alsamixer, mpd, http, stream, m3u, softwaremixer, file, local
DEBUG 2017-06-07 23:12:55,308 [857:MainThread] mopidy.config.keyring
Fetching passwords from your keyring failed. Any passwords stored in the keyring will not be available. (org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11)
INFO 2017-06-07 23:12:55,308 [857:MainThread] mopidy.config
Loading config from builtin defaults
DEBUG 2017-06-07 23:12:55,323 [857:MainThread] mopidy.config
Loading config from /etc/xdg/mopidy/mopidy.conf failed; it does not exist
INFO 2017-06-07 23:12:55,324 [857:MainThread] mopidy.config
Loading config from /home/osmc/.config/mopidy/mopidy.conf
INFO 2017-06-07 23:12:55,331 [857:MainThread] mopidy.config
Loading config from command line options
DEBUG 2017-06-07 23:12:55,352 [857:MainThread] mopidy.ext
Validating extension: iris
DEBUG 2017-06-07 23:12:55,374 [857:MainThread] mopidy.ext
Validating extension: local-images
DEBUG 2017-06-07 23:12:55,376 [857:MainThread] mopidy.ext
Validating extension: soundcloud
DEBUG 2017-06-07 23:12:55,379 [857:MainThread] mopidy.ext
Validating extension: spotify_tunigo
DEBUG 2017-06-07 23:12:55,387 [857:MainThread] mopidy.ext
Validating extension: spotify
DEBUG 2017-06-07 23:12:55,389 [857:MainThread] mopidy.ext
Validating extension: alsamixer
DEBUG 2017-06-07 23:12:55,393 [857:MainThread] mopidy.ext
Validating extension: mpd
DEBUG 2017-06-07 23:12:55,394 [857:MainThread] mopidy.ext
Validating extension: http
DEBUG 2017-06-07 23:12:55,396 [857:MainThread] mopidy.ext
Validating extension: stream
DEBUG 2017-06-07 23:12:55,397 [857:MainThread] mopidy.ext
Validating extension: m3u
DEBUG 2017-06-07 23:12:55,399 [857:MainThread] mopidy.ext
Validating extension: softwaremixer
DEBUG 2017-06-07 23:12:55,401 [857:MainThread] mopidy.ext
Validating extension: file
DEBUG 2017-06-07 23:12:55,402 [857:MainThread] mopidy.ext
Validating extension: local
INFO 2017-06-07 23:12:55,404 [857:MainThread] mopidy.main
Enabled extensions: iris, mpd, alsamixer, http, stream, spotify_tunigo, m3u, softwaremixer, file, local-images
INFO 2017-06-07 23:12:55,405 [857:MainThread] mopidy.main
Disabled extensions: spotify, local, soundcloud
WARNING 2017-06-07 23:12:55,405 [857:MainThread] mopidy.main
Found local configuration errors, the extension has been automatically disabled:
WARNING 2017-06-07 23:12:55,406 [857:MainThread] mopidy.main
local/media_dir must be set.
WARNING 2017-06-07 23:12:55,407 [857:MainThread] mopidy.main
Found soundcloud configuration errors, the extension has been automatically disabled:
WARNING 2017-06-07 23:12:55,407 [857:MainThread] mopidy.main
soundcloud/auth_token must be set.
WARNING 2017-06-07 23:12:55,408 [857:MainThread] mopidy.main
Found spotify configuration errors, the extension has been automatically disabled:
WARNING 2017-06-07 23:12:55,409 [857:MainThread] mopidy.main
spotify/username must be set.
WARNING 2017-06-07 23:12:55,410 [857:MainThread] mopidy.main
spotify/client_secret must be set.
WARNING 2017-06-07 23:12:55,410 [857:MainThread] mopidy.main
spotify/password must be set.
WARNING 2017-06-07 23:12:55,411 [857:MainThread] mopidy.main
spotify/client_id must be set.
WARNING 2017-06-07 23:12:55,411 [857:MainThread] mopidy.main
Please fix the extension configuration errors or disable the extensions to silence these messages.
DEBUG 2017-06-07 23:12:55,568 [857:MainThread] mopidy.commands
Available Mopidy mixers: AlsaMixer, SoftwareMixer
INFO 2017-06-07 23:12:55,569 [857:MainThread] mopidy.commands
Starting Mopidy mixer: SoftwareMixer
DEBUG 2017-06-07 23:12:55,576 [857:MainThread] mopidy.commands
Mixer volume left unchanged
INFO 2017-06-07 23:12:55,577 [857:MainThread] mopidy.commands
Starting Mopidy audio
INFO 2017-06-07 23:12:55,585 [857:MainThread] mopidy.commands
Starting Mopidy backends: SpotifyTunigoBackend, StreamBackend, M3UBackend, FileBackend
DEBUG 2017-06-07 23:12:55,633 [857:MainThread] mopidy.file.library
Failed expanding path ($XDG_MUSIC_DIR) from file/media_dirs config value.
INFO 2017-06-07 23:12:55,649 [857:MainThread] mopidy.commands
Starting Mopidy core
INFO 2017-06-07 23:12:55,650 [857:Audio-2] mopidy.audio.actor
Audio output set to “autoaudiosink”
INFO 2017-06-07 23:12:55,715 [857:MainThread] mopidy.commands
Starting Mopidy frontends: IrisFrontend, MpdFrontend, HttpFrontend
INFO 2017-06-07 23:12:55,718 [857:IrisFrontend-8] mopidy_iris.frontend
Starting Iris 2.14.2
ERROR 2017-06-07 23:12:55,722 [857:MainThread] mopidy.commands
Frontend (MpdFrontend) initialization error: MPD server startup failed: [Errno 98] Address already in use
DEBUG 2017-06-07 23:12:55,724 [857:MainThread] mopidy.http.actor
Starting HTTP server
INFO 2017-06-07 23:12:55,727 [857:MainThread] mopidy.commands
Starting GLib mainloop
INFO 2017-06-07 23:12:55,727 [857:HttpFrontend-10] mopidy.http.actor
HTTP server running at [::ffff:127.0.0.1]:6680
DEBUG 2017-06-07 23:12:55,729 [857:HttpServer] mopidy.http.actor
Loaded HTTP extension: iris
DEBUG 2017-06-07 23:12:55,733 [857:HttpServer] mopidy.http.actor
Loaded HTTP extension: images
DEBUG 2017-06-07 23:12:55,735 [857:HttpServer] mopidy.http.actor
Loaded HTTP extension: mopidy
DEBUG 2017-06-07 23:12:55,737 [857:HttpServer] mopidy.http.actor
HTTP routes from extensions:
u’/iris’: <class ‘mopidy.http.handlers.AddSlashHandler’>
u’/iris/images/(.)‘: <class ‘tornado.web.StaticFileHandler’>
u’/iris/http/([^/]
)‘: <class ‘mopidy_iris.handlers.HttpHandler’>
u’/iris/ws/?‘: <class ‘mopidy_iris.handlers.WebsocketHandler’>
u’/iris/(.*)‘: <class ‘tornado.web.StaticFileHandler’>
u’/images’: <class ‘mopidy.http.handlers.AddSlashHandler’>
u’/images/(index.html)?‘: <class ‘mopidy_local_images.web.IndexHandler’>
u’/images/(.+)‘: <class ‘mopidy_local_images.web.ImageHandler’>
u’/mopidy’: <class ‘mopidy.http.handlers.AddSlashHandler’>
u’/mopidy/ws/?‘: <class ‘mopidy.http.handlers.WebSocketHandler’>
u’/mopidy/rpc’: <class ‘mopidy.http.handlers.JsonRpcHandler’>
u’/mopidy/(.+)‘: <class ‘mopidy.http.handlers.StaticFileHandler’>
u’/mopidy/‘: <class ‘mopidy.http.handlers.ClientListHandler’>
u’/': <class ‘tornado.web.RedirectHandler’>
DEBUG 2017-06-07 23:12:55,771 [857:HttpFrontend-10] mopidy.zeroconf
Zeroconf service “Mopidy HTTP server on osmc” (_http._tcp at :6680): Published
DEBUG 2017-06-07 23:12:55,783 [857:HttpFrontend-10] mopidy.zeroconf
Zeroconf service “Mopidy HTTP server on osmc” (_mopidy-http._tcp at :6680): Published

osmc@osmc:~$ gst-launch-1.0 audiotestsrc ! audioresample ! alsasink device=hw:1,0
Setting pipeline to PAUSED …
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstAlsaSink:alsasink0: Could not open audio device for playback. Device is being used by another application.
Additional debug info:
gstalsasink.c(854): gst_alsasink_open (): /GstPipeline:pipeline0/GstAlsaSink:alsasink0:
Device ‘hw:1,0’ is busy
Setting pipeline to NULL …
Freeing pipeline …

I also run Logitech Media Server which works great through the USB DAC

I am not sure if OSMC uses Alsa or Pulseaudio. I did a quick google search but I wasn’t able to determine which is used

Looks like this process (related to Logitech Media Server) is grabbing ALSA;

root 481 1 0 20:38 ? 00:01:11 /usr/bin/squeezelite-armv6hf -o iec958:CARD=DAC,DEV=0 -n osmc

When I stop the Squeezelite service and re-run this command it stalls on “New clock: GstAudioSinkClock”;

osmc@osmc:~$ sudo service squeezelite stop
osmc@osmc:~$ gst-launch-1.0 audiotestsrc ! audioresample ! alsasink device=hw:1,0
Setting pipeline to PAUSED …
Pipeline is PREROLLING …
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstAudioSinkClock

You can set up a alsa dmix config so both apps can use the device. Should be examples on here somewhere.

From your mopidy log:
INFO 2017-06-07 23:12:55,650 [857:Audio-2] mopidy.audio.actor
Audio output set to “autoaudiosink”

It should match what you put in the config audio output. Are you editing the correct config file?

I like your suggestion, but I am hesitant to introduce other options into the mix as I have spent a fair amount of time getting Logitech Media Server to play through the USB DAC. Unless of course I knew that this was the solution!

I edit /etc/mopidy/mopidy.conf for my configuration.

I used to use an alsa dmix config like that when I ran my raspbian system. You just need to define a /etc/asound.conf file with the right stuff in it. If it doesn’t work you can just delete the file and you’re back where you started.

/etc/mopidy/mopidy.conf is the system config file that’s used when you run the system service. If you just run mopidy as your user (which is what you were doing) then it’ll use ~/.config/mopidy/mopidy.conf. Other differences with the system service are explained at https://docs.mopidy.com/en/latest/service/

I intended to run it as a service. What am I doing wrong to not run it as service? Maybe this is part of the issue…

I don’t know how you are normally running it, that Web page I linked explains how you should be running it. But in the snippet you pasted before, that was showing the log output, you were just running it as your user from the command line.

You need to double check your edits there. Those are two different sections. The audio section has no card setting and the alsamixer section is for something different to what you are trying to do.

It should be

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

And that’s in addition to sorting out a dmix alsa config.

@kingosticks: thank you for your help on this. Based on the suggestion posted here; DietPi Community Forum - Welcome to the DietPi OS Community Forum, I tried to get this setup, but there is no sound through USB DAC, only sound through HDMI.

Here is my aplay -l results;

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 7/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: DAC [USB Audio DAC], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0

Here is my /etc/asound.conf

pcm.osmc {
type hw card 1
}

pcm.!default {
type plug
slave.pcm “dmixer”
}

pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm “osmc”
channels 2
}
}

ctl.dmixer {
type hw
card 1
}

Here is the sound portion of my /etc/mopidy/mopidy.conf;

[audio]
mixer = alsamixer
output = alsasink device=plug:plugequal

[softwaremixer]
enabled = false

[alsamixer]
enabled = true
card = 1
control = PCM