So, what a lot of people don't realise is that when they buy those snazzy 5.1 or 7.1 surround gaming headphones, they're not actually buying headphones with 6 or 8 tiny little speakers in them. What they're actually buying is a pair of decent STEREO headphones and a license to use some software that PRETENDS to do 5.1 / 7.1 audio.

In case this is one of those "Whaaaat? nooo!" moments, let me asplain.

When your game outputs audio it sends it to an audio driver. That audio driver reports to DirectX/Vulkan/whatever how many channels it has and what they're for. The game says "The helicopter is somewhere 'over there', and sends the audio's position and sound file out to the driver. The driver then takes that sound and sends it on to the audio hardware.

If you actually have a Hi-fi system with 8 speakers, then the sound is routed to the most appropriate speaker, and (if it's midway between two of the speakers) it's sent to two speakers at once, and slightly quietened so you don't get the sound twice as loud coming from somewhere in between them.

But what if you have stereo headphones? Well, the driver has a clever bit of software inside it that "convolves" the sound. Basically what it means is that it changes the sound quality of the audio in such a way that when it is played through two speakers it /sounds/ like it's coming from somewhere else. The process isn't perfect, and doesn't handle verticality very well (sounds from above/below), but the mixing is /pretty good/.

The heart of the convolver is a "model". Basically, some researchers have taken a plastic head shaped like a human head, placed two microphones in the ear holes, and then played lots of sounds to the head from different angles. From this they compute a convolver model.

Now when you buy those snazzy 5.1 headphones it has the convolver and a model buried into it. There are lots of models based on different head shapes, and tuned to different numbers of channels and different audio hardware.

There's a great site called "Airtable" that has lots of the models... From all over the place! Lots of different researchers have created lots of different models. Some people have also extracted the models out of proprietary drivers, like Creative's CMSS and Razer's.

https://airtable.com/appayGNkn3nSuXkaz/shruimhjdSakUPg2m/tbloLjoZKWJDnLtTc

So, how do you use this? Well, the good news is that you don't really need snazzy headphones. Any headphones will do, although the better quality ones will work better.

The models come in a few types, but main two are "wav" files and "SORA" files. SORA is technically better, but linux only supports the WAV file version at the moment. Go ahead and download the "atmos.wav" (48khz version is the best) and then use the following two likes to stick it somewhere easy to get to:

sudo mkdir /usr/share/pipewire/atmos sudo cp ~/Download/atmos.wav /usr/share/pipewire/atmos

On linux, you need to add your own Virtual Sound Sink (a sink is a place where audio data goes when it's being played).

To do this, you create a folder in your .config folder

mkdir ~/.config/pipewire

and then inside it you create a filter-chain configuration folder (where pipewire will pull the config from)

mkdir ~/.config/pipewire/filter-chain.conf.d

Now, Linux provides you a handy config file, so just copy it into your new folder. We'll make the name easier while we're at it.

cp /usr/share/pipewire/filter-chain/sink-virtual-surround-7.1-hesuvi.conf ~/.config/pipewire/filter-chain.conf.d/virtual-surround.conf

ok, now we just need to make sure it uses the right file by changing the "hrir_hesuvi/hrir.wav" to use the atmos.wav that we downloaded and put into the /usr/share/pipewire/atmos folder:

sed -i 's/hrir_hesuvi\/hrir.wav/\/usr\/share\/pipewire\/atmos\/atmos.wav/g' ~/.config/pipewire/filter-chain.conf.d/virtual-surround.conf

and then restart X-windows.

It should pick up the new config file. So, to make the virtual sink work, select the output speakers you want to use (or headphone), and then choose the virtual sink. The sound sink will switch to the virtual sink, and you should be able to test your new surround sound-enabled headphones.

If it doesn't work, then I've found that you might need to double-check that wav file is in the right folder, that the right path is set in the config file and you've downloaded the atmos.wav that corresponds to the bitrate of your audio system. Most will switch to 48k where possible, but my old laptop only used 44k, so I seemed to have to use the atmos-44k version.... Dunno if that's been fixed since then though.

Previous Post Next Post