Hello
I know about the PulseAudio Loopback Switch from @Cinntax, witch is a fine and nice little switch to change the audio output if you have multiple audio sources or speakers and you want to be able to route the audio between them. Once set up, this switch works very good.
However, the problem is setting it up. I guess many people don’t know what a loopback in the PulseAudio terminology is. If you want to use the Loopback Switch, the next think you need to do, is create a null sink, where you then pipe your audio in and of course you have to load the module-cli-protocol
. Next you have to find out about the sink_names
and the source_names
and therefore use pactl list sinks
and pactl list sources
. Interestingly, the source_name
is not actually the name of the sink you have set up before, but becomes name.monitor
. So what I want to say, it will keep you busy for quite some time.
What I think about, is adding a new Entity module (is that the correct name for something like media_player
) to HA, that I would probably name sound_server
. This Entity would need a new type of card on the HA web interface (I have no idea how to do that yet). And within that a new entity that I would call pulseaudio
. Of course further components e.g. for Windows can be added later. This pulseaudio component could use the pulsectl package to interface with the pulseaudio sound server and directly expose the desired features, like changing sinks for sources or changing the volume.
What I would need help with is setting up the base sound_server entity. Up to now I have only written components.