01-29-2020, 06:52 AM
Great! Thanks for letting me know.
Thank you for your donation!
Instruction Guide 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi
|
01-29-2020, 06:52 AM
Great! Thanks for letting me know.
01-29-2020, 10:23 PM
(01-28-2020, 08:40 AM)adrii Wrote: Hi Tim Hi Adrian, I see that your ALSA config duplicates hw:0 to Loopback,0. Are you using the alsaloop command to then duplicate it to Loopback,1 or is this automatically done by snd-aloop driver? Im not very experienced in ALSA coding and the API is heavily under documented... -Tim
01-30-2020, 05:55 PM
Hi Tim
I know very little about ALSA, what I know is just from trying to duplicate a stream! The loopback is handled by the snd_aloop driver. There are three configuration files in the mpd_oled issue, but it is worth reviewing all of them My Moode config: https://github.com/antiprism/mpd_oled/is...-567146826 In my Moode /etc/mpd.conf file, mpd is outputing to "hw:0,0". I don't know how to overload "hw:0,0" (I am not sure if it can be done) but I can overload "hw", and this is what the configuration file does. It means that whenever Moode/mpd writes to hw:X or hw:X,Y the overload will be used and a copy sent to the loopback device. It may have consequences, because it is used whenever "hw" is used. Sergey's Volumio config: https://github.com/antiprism/mpd_oled/is...-536098398 I think when Volumio uses hardware volume it outputs to the "default" ALSA device. This can be overriden. However, the original output device is not known, and so needs to be specified, in this case "hw:IQaudIODAC,0" My Volumio config: https://github.com/antiprism/mpd_oled/is...-423255641 Using Volomio software volume the system set up an alsa config file with pcm.softvolume that called pcm.softvol. I changed pcm.softvolume to call my duplication config plugin, which then called the origional pcm.softvol. I think the last approach is the way to go. When Moode wants to play something it would always play it to the same named ALSA plugin, e.g. "playerout". When Moode configures a device, it wouldn't refer to a "hw" name directly, but configure it in a plugin, say "deviceout". Then, in a global configuration file "deviceout" is a slave of "playerout", so anything that plays to "playerout" is heard on the "deviceout" device. Now, if anybody wants to do anything with the audio before it is played they can override "playerout" and have "deviceout" as a slave, and the processed audio will go to the configured device. I'll give an example. On Ubuntu I have created a global ALSA config /etc/asoundrc Code: pcm.playerout { I can now play some audio to the "playerout" device and it comes out of my speakers Code: aplay -D playerout tmp.wav If I want to duplicate the audio, I can simply write an .asoundrc file to override "playerout", and send the audio to be played on to "deviceout" and I don't need to know the hardware device name Code: pcm.!playerout { I can now play audio as before, with the sound coming out the speakers Code: aplay -D playerout tmp.wav In a separate terminal I can now show a spectrum analyser for the audio with cava by creating a config file conf.txt Code: [input] And running cava with this configuration Code: cava -p conf.txt For Moode you could probably specify a Moode-only config file in /usr/share/alsa/alsa.conf, then the user overrides could be put in /etc/asound.conf as now. Moode could create some duplicate streams in the UI with the same kind of configuration override, playerout -> moode processing/duplicates -> moodeout -> user processing/duplicates -> deviceout (the user would override moodeout in this chain). But even if Moode doesn't provide anything in the UI, the ALSA config file for creating duplicates is now much easier to write and should be robust over different audio configurations. Adrian.
01-30-2020, 09:47 PM
Looks like we are in the same boat trying to understand ALSA configs :-0
I like the idea of a generic way to duplicate the audio stream to ALSA Loopback as you have shown in your post. I think it should work fine for PCM. I'll try to run some test when time permits :-)
Hi @adrii,
Thanks for your great work. I have a 2.42 "OLED SSD1309 SPI / i2c. Works great as an i2c with RST to the GPIO.
02-05-2020, 12:35 PM
Hello everyone. Let me ask for your advice. I use a display with mpd_oled plugin. I need to change the default font to the font with Czech characters . Please advise. Thank you.
02-05-2020, 12:56 PM
Hi diablo
I am afraid there is no way to configure a different font. This is a longstanding issue, https://github.com/antiprism/mpd_oled/issues/9, but one that I still intend to fix. Adrian.
02-05-2020, 01:04 PM
Hi leobo
Thanks for the feedback! Adrian.
02-15-2020, 11:05 AM
I just updated from Moode 6.4.1 with the mpd_oled install instructions applied, to Moode 6.4.2. The update completed correctly, with mpd_oled still working except for the spectrum display. The fix is to reapply the Moode system patch from the mpd_oled directory
Code: sudo patch -d/ -p0 -N < moode_mpd_fifo.patch And restart the machine. Adrian. |
« Next Oldest | Next Newest »
|