05-11-2020, 02:29 PM
Hi Tim
I had no success overriding "default" on Moode to capture audio output (which I believe is also the problem that @jrubins reported), and I assumed it was not possible because MPD was writing to the "hw" plugin rather than to the default device. If this is not correct then please let me know as I would rather override "default" than override the "hw" plugin, which is the only working ALSA solution I currently have for making a copy of the audio on Moode
https://github.com/antiprism/mpd_oled/is...-567146826
Regarding my suggestion, it wouldn't change the final outputs; MPD would still end up outputting to hw and the renderers would still end up outputting to plughw.
I'll give an example of how this works in practice by modifying the alsaequal configuration. I have just enabled the graphic equaliser and edited /etc/alsa/conf.d/alsaequal.conf so that alsequal is a dummy entry point and the original alsaequal is renamed alsaequal2
Now, all I have to do in /etc/asound.conf is override alsaequal, and make sure that I pass the original audio back to alsaequal2. (alsaequal and alsaequal2 correspond to the two named devices that I was referring to that allow the audio to be intercepted). The equalisation process is not affected
The idea is that Moode would provide two names for all audio output to pass through (both MPD and renderers), and then the first name could be overriden by the user and, after processing the audio stream, the user would typically pass the stream on to the second named device.
Adrian.
I had no success overriding "default" on Moode to capture audio output (which I believe is also the problem that @jrubins reported), and I assumed it was not possible because MPD was writing to the "hw" plugin rather than to the default device. If this is not correct then please let me know as I would rather override "default" than override the "hw" plugin, which is the only working ALSA solution I currently have for making a copy of the audio on Moode
https://github.com/antiprism/mpd_oled/is...-567146826
Regarding my suggestion, it wouldn't change the final outputs; MPD would still end up outputting to hw and the renderers would still end up outputting to plughw.
I'll give an example of how this works in practice by modifying the alsaequal configuration. I have just enabled the graphic equaliser and edited /etc/alsa/conf.d/alsaequal.conf so that alsequal is a dummy entry point and the original alsaequal is renamed alsaequal2
Code:
pcm.alsaequal {
type plug
slave.pcm "alsaequal2"
}
pcm.alsaequal2 {
type plug
slave.pcm "plug_alsaequal";
}
ctl.alsaequal2 {
type equal
controls "/usr/local/bin/alsaequal.bin";
}
pcm.plug_alsaequal {
type equal
slave.pcm "plughw:0,0";
controls "/usr/local/bin/alsaequal.bin";
}
Now, all I have to do in /etc/asound.conf is override alsaequal, and make sure that I pass the original audio back to alsaequal2. (alsaequal and alsaequal2 correspond to the two named devices that I was referring to that allow the audio to be intercepted). The equalisation process is not affected
Code:
pcm.!alsaequal {
type plug
slave.pcm "duplicatecopy"
}
pcm.duplicatecopy {
type plug
slave.pcm {
type multi
slaves {
a { channels 2 pcm "alsaequal2" } # the real device
b { channels 2 pcm "hw:Loopback,0" } # the loopback driver
}
bindings {
0 { slave a channel 0 }
1 { slave a channel 1 }
2 { slave b channel 0 }
3 { slave b channel 1 }
}
}
ttable [
[ 1 0 1 0 ] # left -> a.left, b.left
[ 0 1 0 1 ] # right -> a.right, b.right
]
}
The idea is that Moode would provide two names for all audio output to pass through (both MPD and renderers), and then the first name could be overriden by the user and, after processing the audio stream, the user would typically pass the stream on to the second named device.
Adrian.