Page 1 of 1

Switching between Adafruit Speaker Bonnet and HDMI audio?

Posted: Wed Apr 10, 2019 4:30 am
by ZHDarkstar
I'm new to using Raspberry Pi, so the answer could be staring me in the face and I wouldn't know it.

I have a Raspberry Pi 3 B+ with the official touchscreen display and Adafruit Speaker Bonnet + enclosed speakers. The idea was to have a media center computer that could be used with my TV or by itself. While everything works well in standalone use, there's just one hitch when connecting to the TV: audio is still coming out of the speakers instead of the TV.

I followed the setup instructions on adafruit.com and have done no other modifications to Raspbian other than just running updates.

If there's a software solution that would allow the audio to switch depending on whether HDMI is used or not, that would be fantastic. My solution for HDMI video isn't that elegant either (inline switch for the display power cable); so if I could get that handled via code as well, I would be doubly grateful.

Re: Switching between Adafruit Speaker Bonnet and HDMI audio?

Posted: Wed Apr 10, 2019 11:33 am
by Andyroo
Welcome to the forum.

Not sure if there is a GUI option but from the command line you could look at using the amixer program and mute / unmute each device.

Re: Switching between Adafruit Speaker Bonnet and HDMI audio?

Posted: Wed Apr 10, 2019 11:59 am
by ZHDarkstar
Andyroo wrote:
Wed Apr 10, 2019 11:33 am
Welcome to the forum.

Not sure if there is a GUI option but from the command line you could look at using the amixer program and mute / unmute each device.
Where could I find more info on how to use it?