Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

PulseAudio: Combining sinks and conserving channels

$
0
0

I have successfully created a default sink that pipes music out to a surround system and a wireless transmitter. I put this into /etc/pulse/default.pa:

# Create a default combined sink for the Surround Sound system and a wireless transmitter# Empirically, we determined that 0,0 was the wireless transmitter and 0,7 the surround sound system.load-module module-alsa-sink device=hw:0,7 sink_name=Surround sink_properties="device.description='Surround Sound System'"load-module module-alsa-sink device=hw:0,0 sink_name=Transmit sink_properties="device.description='Wireless Transmitter'"load-module module-combine-sink sink_name=Default slaves=Surround, Transmitset-default-sink Default

The problem is that the Default sink present itself as only a stereo sink. Surround has 5. channels and Transmit has 2 channels and Default has only 2 channels.

Can I configure this so that Default has 5.1 channels and these are pumped to Surround and Transmit is downmixed to 2? In a perfect world there's a standard way of down mixing 5.1 to 2 (the 5.1 have two left and two right and two centre channels, one of which is the subwoofer, so I imagine 2 channels each receiving 4 of the 6 5.1 channels).

I admit it is 2023 and chatGPT is fast, but as we all know good at providing clues, much better at that than it is at providing working solutions. And so I'd like ground truth or fix ChatGPT's suggestion which I offer as a seed:

Yes, you can modify the configuration to ensure that the Default sink has 6 channels instead of just 2. One possible solution is to create a custom sink that combines the 5.1 channels of the Surround Sound system with the 2 channels of the Wireless Transmitter, effectively creating a 7.1 sink. You can then use a module to downmix the 7.1 sink to a 5.1 sink. Here's how you can modify your configuration to achieve this:

# Create a default combined sink for the Surround Sound system and a wireless transmitter# Empirically we determined that 0,0 was the wireless transmitter and 0,7 the surround sound system.load-module module-alsa-sink device=hw:0,7 sink_name=Surround sink_properties="device.description='Surround Sound System'"load-module module-alsa-sink device=hw:0,0 sink_name=Transmit sink_properties="device.description='Wireless Transmitter'"# Create a custom sink that combines the 5.1 channels of the Surround Sound system with the 2 channels of the Wireless Transmitterload-module module-combine-sink sink_name=CombinedSink slaves=Surround,Transmit channels=8 channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe,aux0,aux1# Use a module to downmix the 8-channel CombinedSink to a 5.1 sinkload-module module-ladspa-sink sink_name=DownmixSink master=CombinedSink plugin=ladspa_file.so label=downmix control=1,1,1,1,1,1,0,0set-default-sink DownmixSink

In the above configuration, we create a custom sink called CombinedSink that combines the 5.1 channels of the Surround Sound system with the 2 channels of the Wireless Transmitter, resulting in an 8-channel sink. We then use a module called module-ladspa-sink to downmix the 8-channel CombinedSink to a 5.1 sink called DownmixSink, which we set as the default sink.

Note that you may need to install the LADSPA plugins if they are not already installed on your system. You can do this by running the following command:

sudo apt-get install ladspa-sdk

This assumes you are using Ubuntu or a Debian based system, but the command may vary depending on the Linux distribution you are using.


Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>