Thank you for your donation!


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


Idea: Keep Last Selected Audio Output Device After Reboot
#4
Couple things:

1. It does no good to compare to other softwares because I don't know how they function or how they were built
2. You are now describing a different configuration where you have 2 USB DAC's connected
3. Config.txt has been modified to disable HDMI and Headphone card assignments

This is not correct.
"The problem is that Moode always picks the first available USB audio device at startup instead of remembering the last selected one"

Because PiOS Bookworm implements dynamic ALSA card assignment, whats done is to check whether the configured (last selected) audio device is assigned to the same ALSA card number as before, a different card number or not assigned to a card for some reason (powered off, bad connection, not ready, user disconnected it, etc).

If it's not assigned to a card (because Linux/ALSA has not detected the device) the fallback is to switch to the built in HDMI 1 device, to avoid a broken audio configuration. Note that HDMI 1 may not be at card 0 because there may for example be an I2S audio device at that card number.

See /var/www/daemon/worker.php starting at line "workerLog('worker: -- Audio configuration');" for the code block that handles ALSA card assignments.

I don't see an obvious way to handle your issue where the configured audio device starts slower that the other device but maybe you will have some insights after looking at or hacking the code.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
RE: Keep Last Selected Audio Output Device After Reboot - by Tim Curtis - 03-09-2025, 07:00 PM

Forum Jump: