Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: allow local mpd modifications without overwriting them
#21
Hi Ian

Until Moode 7 I am not aware af an alternative to patching to enable an MPD FIFO.

It is possible to to duplicate the audio for all audio source using ALSA, but my solution involves overriding the 'hw' plugin, which isn't really a good idea, even though it does work for me

   https://github.com/antiprism/mpd_oled/is...-567146826

With Moode 7, all the audio sources are now able to use some common ALSA plugins, so a patch could probably just rewrite one of these in a Moode ALSA configuration file to enable making a copy of the audio in a user ALSA configuration file, while still preserving the original plugin functionality.

Adrian.
Reply
#22
(02-09-2021, 06:00 AM)adrii Wrote: It is possible to to duplicate the audio for all audio source using ALSA, but my solution involves overriding the 'hw' plugin, which isn't really a good idea, even though it does work for me

   https://github.com/antiprism/mpd_oled/is...-567146826

With Moode 7, all the audio sources are now able to use some common ALSA plugins, so a patch could probably just rewrite one of these in a Moode ALSA configuration file to enable making a copy of the audio in a user ALSA configuration file, while still preserving the original plugin functionality.

Adrian.

Hi Adrian,
I checked out your github comment.  I wasn't aware that someone did this - awesome!  People mentioned that the loopback device killed the onboard sound.  The Cava docs mention this and problem and enabling ALSA multi channel is a fix but a problem on a pi (at the time?).  I'm just throwing stuff out there, I'm not an ALSA expert.
Reply
#23
Hi Ian

The issue with the loopback device mentioned in the Cava docs, that when the loopback device is loaded at boot it can reorder existing sound card numbers, does occur on Moode. Moode plays the card by number, rather than name, and so the player does not use the right card. There are some messages about this here: http://moodeaudio.org/forum/showthread.p...55&page=17

Adrian.
Reply
#24
Frustrating.  I'll check it out when I get around to that part of my project - this has started to get away from me.

Quick thought: why not just modprobe the snd_loop alsa device after initialization, via rc.local or something like that?  Not a perfect solution, but it sounds like that would work.
Reply
#25
(02-08-2021, 03:55 PM)adrii Wrote: Hi bitlab

I do plan to take a look at whether I can provide instructions (or a script) for setting up an MPD FIFO using your method. It is better for me too, as I always feel a little bit guilty telling people to patch Moode!

Adrian.


Hi Adrian, hi "Bitlab",
I'm probably late and you probably already know it: to test the PeppyMeter integration in moOde I had the need to modify the MPD only for a while and I used this procedure:
without touching any "PHP configurator", I directly edited the mpd.conf file and restarted the MPD from "Audio Conf" in "Configuration settings" (Menu - Configure - Audio). After that you will have the MPD configuration running until the next reboot.
Sorry if I'm redundant.
Best regards,

Francesco
Reply
#26
(02-07-2021, 09:23 AM)bitlab Wrote: There is already a way to use custom mpd settings.
  • Create an /etc/mpd.custom.conf
  • Enable the dev tweaks with:
Code:
moodeutl -A add 32768
moodeutl -r

If you inspect the content of /etc/mpc.conf you will see that it now also contains your settings.
The settings are not only added, but also merged with existing settings. So you can even overwrite existing ones.

If this solves your issue please mark this post as solved.

Hi @bitlab, @Tim Curtis,
Can I use this to enable Snapcast on Moode, if I install Moode on all the raspberry pis in each of my rooms ?
What I want to do is described here : https://github.com/badaix/snapcast/blob/...r_setup.md
Code:
To connect MPD to the Snapserver, edit /etc/mpd.conf, so that mpd will feed the audio into the snapserver's named pipe.
Disable alsa audio output by commenting out this section:
#audio_output {
#       type            "alsa"
#       name            "My ALSA Device"
#       device          "hw:0,0"        # optional
#       format          "48000:16:2"    # optional
#       mixer_device    "default"       # optional
#       mixer_control   "PCM"           # optional
#       mixer_index     "0"             # optional
#}
Add a new audio output of the type "fifo", which will let mpd play audio into the named pipe
/tmp/snapfifo. Make sure that the "format" setting is the same as the format setting of the Snapserver (default is "48000:16:2", which should make resampling unnecessary in most cases).
audio_output {
   type            "fifo"
   name            "my pipe"
   path            "/tmp/snapfifo"
   format          "48000:16:2"
   mixer_type      "software"
}
Reply


Forum Jump: