I’m running Mopidy 3.4.1 on a Raspberry Pi and I’m trying to get the output to a USB Codec (Behringer 222).
I have it all working via the 3.5mm jack output on the Pi so I have the Mopidy installation mostly right.
I’m trying to understand what “output = autoaudiosink” actually means in the configuration. Does it mean that output will be sent to all devices detected by “aplay -l”, or will it just go to the first device it finds, or what?
It’s a GStreamer item; It means use the most appropriate audio sink.
When there’re multiple sound cards, one can use alsamixer to select the card to use; It’s also possible to edit /etc/asound.conf to select the default card to use at boot time.
chrisisbd:
(…) I’m trying to understand what “output = autoaudiosink” actually
means in the configuration.
It’s a GStreamer item; It means use the most appropriate audio sink.
How does it decide what is “the most appropriate audio sink”?
When there’re multiple sound cards, one can use alsamixer to select the
card to use; It’s also possible to edit /etc/asound.conf to select the
default card to use at boot time.
OK, I can use alsamixer to show and select which device to use, though
I don’t quite understand why they are all prefixed with ‘default’,
are they all selected or what?
I can’t find any sort of docmentation on the system that tells me the
format of the /etc/asound.conf file. Searching on-line produces all
sorts of (mostly) long and complicated explanations and complaints
that “it doesn’t work for me”. However I will persevere!
Leave your default audio device as it is (headphones) and explicitly tell Mopidy to use a different device. In order to specify a device param you need to also specify you’re using alsasink.
[audio]
output = alsasink device=hw:1,0
Change the system’s default audio device and then autoaudiosink will “just work”. Do this by following our installation instructions at Raspberry Pi — Mopidy 3.4.2 documentation which mentions changing the user’s default audio device (step 4) and then making that change system-wide (step 5).
Longer answer:
How does it decide what is “the most appropriate audio sink”?
I don’t think you need to worry about this. For Raspberry Pi it’s normally going to use alsasink. The actual issue is what audio device is it going to use.
Since you have multiple audio devices, and you seemingly don’t want to use your system’s default audio device (headphone jack) which would “just work”, you need some way to tell it which device to use. You can do that via your Mopidy config file (my 1st short answer), or changing the system settings (my 2nd short answer).
There is documentation at Asoundrc - AlsaProject. There are also examples in this forum but it’s not always easy to find it hidden amongst the more exotic examples. I would suggest following our documentation instead and not getting bogged down in manually editing alsa config files unless you have to. When you use raspi-config to change the default audio device, it automatically creates the alsa config file you need. Have a look at what you get.