How should I find the current audio device ?
-
Hey all.
I'm currently writing a script to control volume from buttons connected to the Pi 4 header on a retro-pie console.
Is there a definitive source for the current audio output device in use by the system, eg: hdmi/pcm etc.I am currently controlling the alsa mixer with a simple python script and would like the script to check the current device so it can pass this on to the amixer command.
I could read es_settings.cfg and extract the information, but I would like this to work on any raspbian based system. Is there a better source ?
I've had a look but can't seem to find any info on this sort of thing.
Thanks.Rob.
-
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.