I have an Nvidia Shield Pro connected into an HDMI port of the soundbar and my PC connected to the other port. They output to my TV via eARC and share the Soundbar source.
If I connected my PC direct to the TV it would appear as a source itself and I can automate the PC switching on and changing source at the same time using Alexa.
But alternating between the HDMI input sources can only apparently be done by pressing the soundbar remote button several times or using the app. I never use the remote as I use the tv one.
It doesn’t appear there is any way I can automate this currently but it would be great if it could happen in a future update if any mods are looking.