(04-12-2025, 07:59 PM)Tim Curtis Wrote: It works the same on pi5.
...
First of all this problem is not that important at all. But here my findings just for the sake of it.
After understanding RPI5 should not be the main problem, on my system I enabled the HDMI 0 and 1 audio back, at this point DAC is at 0, HDMI 0 is at 1, and HDMI 1 is at 2, and enabled the debug logs. Now I close the DAC. Somehow HDMI 0 is 0, and HDMI 1 is 1 now. I did not check at that point if CARD index changed after the log line
Code:
20250413 160311 worker: ALSA card: is empty, reconfigure to HDMI 1
i.e. moOde caused it? or ALSA did it?, but somehow it is changed after all.
I believe the culprit is moOde trying its best to find a working sound card. Here is the relevant part of /var/moode.log. If possible this retrying can be disabled and the problem would go away for the same card index, but it would not be correct for ALSA index jump. To make correct for it I think moOode should drop card index usage and use the card names in the configurations, like (plug)hw:CARD=DX9,DEV=0; instead of (plug)hw:0,0. Since when the meaning of index 0 changes, the output changes. It would also be best if it allowed other plugin names like dmix, etc. I may be asking too much

.
Code:
pi@moode:~ $ tail -f /var/log/moode.log
....
20250413 160211 worker: Mixers: 0:none 1:none 2:none 3:none
20250413 160211 worker: 4:none 5:none 6:none 7:none
20250413 160211 worker: Audio device: 0:DX9
20250413 160211 worker: ALSA card: is empty, retry 1
20250413 160216 worker: ALSA card: is empty, retry 2
20250413 160221 worker: ALSA card: is empty, retry 3
20250413 160226 worker: ALSA card: is empty, retry 4
20250413 160231 worker: ALSA card: is empty, retry 5
20250413 160236 worker: ALSA card: is empty, retry 6
20250413 160241 worker: ALSA card: is empty, retry 7
20250413 160246 worker: ALSA card: is empty, retry 8
20250413 160251 worker: ALSA card: is empty, retry 9
20250413 160256 worker: ALSA card: is empty, retry 10
20250413 160301 worker: ALSA card: is empty, retry 11
20250413 160306 worker: ALSA card: is empty, retry 12
20250413 160311 worker: ALSA card: is empty, reconfigure to HDMI 1
20250413 160312 worker: MPD config: updated
20250413 160312 worker: ALSA output: HDMI
20250413 160312 worker: ALSA mode: IEC958 (iec958)
20250413 160312 worker: ALSA mixer: PCM
....
Now I know it is "not" the same thing, but @
Tim Curtis I think you can fire this behavior like this:
1) Make it DAC at index 0, HDMI 0 at 1, and HDMI 1 at 2, (on RPI 3 HDMI 1 would not be present of course)
2) Select DAC as output in moOde
2) Power off DAC, and wait some short of a time
3) Reboot RPI (DAC NO open) when it is booted HDMI is at 0, and 1
4) At this stage moOde waits for configured time and would try the card change I believe.