Thank you for your donation!


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


Audio: Way to disable HDMI or set USB as default?
#16
Thank you for the additional thoughts and sorry for being slow - I wanted to try them to see what happens:

I can't use the Raspberry Pi as a USB slave (or at least think I can't), because it does some other things and should stay on when the amp switches off. Among others, it switches the amp back on via openhab. So that also makes it difficult for me to switch the amp on before switching the Pi on. And by difficult I mean that I'd have to resort to 20th century methods such as finding the remote control or even getting up from the sofa.

I tried to switch off HDMI using your code, HebRob. Somewhat interestingly, that caused moode to detect one HDMI device instead of two. So something happened, but it did not solve the problem. I'm not sure whether it disabled audio on both HDMI ports and moode just keeps one or whether it only disabled one (not sure how to test this, since I don't have anything connected via HDMI).

Fixing the order of devices as Stampede suggested worked, now USB is always device 0. But when the amp is off, it is reported as empty and moode picks the HDMI port nevertheless. I can neither switch to USB when the amp is still off, nor does it switch to USB when the amp goes back on. Once it changed to HDMI, I have to change it back manually.

Yet now I'd in principle be able to write a script that switches output back to USB. Is there some way to check what output moode uses and to change it via the command line? Then I could try to have it check and change it every once in a while. Its still a bit tricky, since the script would have to be triggered by something like the appearance of a new USB device. I guess that's possible, but beyond my programming capabilities. So it may be fun to try...

If you have any further ideas, happy to try them. Thank you!
Reply


Messages In This Thread
RE: Audio: Way to disable HDMI or set USB as default? - by nikolas - 01-15-2025, 09:02 PM

Forum Jump: