![]() |
Audio: Way to disable HDMI or set USB as default? - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: Audio: Way to disable HDMI or set USB as default? (/showthread.php?tid=6760) |
RE: Audio: Way to disable HDMI or set USB as default? - hatenick - 04-12-2025 (04-12-2025, 01:15 PM)Tim Curtis Wrote: @hatenick, Have you tried the "Device ready wait" setting in Audio Config? Yes of course, but it is not applicable in my case, my RPI working forever until power off or so, and I have to close the DAC off and open at times arbitrarily. RE: Audio: Way to disable HDMI or set USB as default? - Tim Curtis - 04-12-2025 Is this the usage scenario? 1. Audio device stays on 2. Pi is powered off then at some point powered back on 3. Audio output in Moode Audio Config reverts to HDMI RE: Audio: Way to disable HDMI or set USB as default? - hatenick - 04-12-2025 (04-12-2025, 01:35 PM)Tim Curtis Wrote: Is this the usage scenario? Well 1. RPI always on forever 2. DAC is powered on and ALSA CARD id 0 or 2 at this time depending on the first DAC power state at the RPI boot time. The index 0 or 2 does not make any difference. 3. DAC is powered off. ALSA makes the HDMI 0 audio out as index ALSA CARD 0 even if DAC was 0 beforehand. Why? I do not know? At this time moOde makes HDMI audio 0 as current output. I can see this by going to Audio in settings. 4. DAC is powered on and now it has ALSA CARD index 2 now. So I have to change it to index 2 third card from the drop down. 5. DAC is powered off and output again changes to HDMI 0 as index 0 6. DAC is powered on goto 4 I believe you have Code: sudo alsactl save ![]() RE: Audio: Way to disable HDMI or set USB as default? - Tim Curtis - 04-12-2025 The alsactl save command is not used. I'm not able to repro your issue by turning off my USB DAC then turning it back on a few minutes later. moOde 930 | Pi-3B+ | Allo Revolution DAC 1. Pi and DAC powered on, DAC is assigned ALSA card 0 Startup log Code: 20250412 105529 worker: -- Audio Config [attachment=4591] Debug showing the array thats used to populate the dropdown Code: 20250412 105801 Array 2. Power off the DAC [attachment=4592] Code: 20250412 105834 Array 3. Power on the DAC a few minutes later [attachment=4591] Code: 20250412 110032 Array RE: Audio: Way to disable HDMI or set USB as default? - hatenick - 04-12-2025 (04-12-2025, 03:15 PM)Tim Curtis Wrote: The alsactl save command is not used.After some quick checking it seems that RPI3 and RPI5 are very different in terms of both USB and HDMI in both silicon-wise and kernel-drivers-wise. This might explain the ALSA driver index jump, and moOde changing of output due to some behavior change of the drivers. RE: Audio: Way to disable HDMI or set USB as default? - Tim Curtis - 04-12-2025 It works the same on pi5. The one used for testing below already had an Allo Boss DAC (I2S) attached. Starting configuration: Allo Boss DAC (I2S) [attachment=4597] Plug in USB DAC (assigned to ALSA card 3) [attachment=4598] Set it as the Output device, play some music [attachment=4599] ** Reboot (USB DAC still on) After reboot (dynamic ALSA card reassignment 3 -> 0) Play some music [attachment=4600] Unplug USB DAC (ALSA card empty) [attachment=4601] Plug USB DAC back in after some time Play some music [attachment=4602] RE: Audio: Way to disable HDMI or set USB as default? - hatenick - 04-13-2025 (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 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. RE: Audio: Way to disable HDMI or set USB as default? - Tim Curtis - 04-13-2025 Yes if you reboot the pi while the USB DAC is off the startup process will fall back to HDMI after the "Device ready wait" has expired. The default wait period is 1 min but can be set to 2 or 3 mins. In your post 33 describing the steps you stated "1. RPI always on forever" which is the scenario I tested. https://moodeaudio.org/forum/showthread.php?tid=6760&pid=63101#pid63101 I think there is another scenario where at some time after the fallback to HDMI has occurred, the USB Audio device is turned on or plugged back in and rather than having to open Audio Config and manually set the Output device it is automatically set when the USB Audio device is detected. Its could be doable but I'm not sure how much work is involved. RE: Audio: Way to disable HDMI or set USB as default? - SerbJ - 04-13-2025 With my Pi 4B and Moode 9.3, if I power up without the USB DDC plugged in, it will default to HDMI on 0 and 1. Wait a few minutes and plug in the USB DDC, and shows up a 3: SMSL USB Audio. The 0: HDMI is still the default, and have to change it in the Audio config. If you just try to play, a warning pops up saying no device detected on HDMI, and will not play or see the USB Audio at that time and switch. I assume that if the HDMI was connected to a display, it would just go on its merry way. It didn't work that way in 8.x.x, and thanks for the explaination why. A possible work-around, H/W solution for the OP, is using a DDC and connecting to the DAC via SPDIF (coax or optical). The SMSL PO100, $40, only draws 300mA from the USB bus. Just a suggestion. RE: Audio: Way to disable HDMI or set USB as default? - Tim Curtis - 04-13-2025 (04-13-2025, 04:32 PM)SerbJ Wrote: With my Pi 4B and Moode 9.3, if I power up without the USB DDC plugged in, it will default to HDMI on 0 and 1. Wait a few minutes and plug in the USB DDC, and shows up a 3: SMSL USB Audio. The 0: HDMI is still the default, and have to change it in the Audio config. If you just try to play, a warning pops up saying no device detected on HDMI, and will not play or see the USB Audio at that time and switch. I assume that if the HDMI was connected to a display, it would just go on its merry way. What do you have set for "Device ready wait"? |