{"id":115,"date":"2025-11-18T16:30:42","date_gmt":"2025-11-18T16:30:42","guid":{"rendered":"https:\/\/www.darkbluemonkey.com\/?p=115"},"modified":"2026-04-23T12:55:39","modified_gmt":"2026-04-23T12:55:39","slug":"115","status":"publish","type":"post","link":"https:\/\/www.darkbluemonkey.com\/?p=115","title":{"rendered":"Virtual 5.1 or 7.1 surround on Linux"},"content":{"rendered":"\n<p>So, what a lot of people don&#8217;t realise is that when they buy those snazzy 5.1 or 7.1 surround gaming headphones, they&#8217;re not actually buying headphones with 6 or 8 tiny little speakers in them. What they&#8217;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.<\/p>\n\n\n\n<p>In case this is one of those &#8220;Whaaaat? nooo!&#8221; moments, let me asplain.<\/p>\n\n\n\n<p>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&#8217;re for. The game says &#8220;The helicopter is somewhere &#8216;over there&#8217;, and sends the audio&#8217;s position and sound file out to the driver. The driver then takes that sound and sends it on to the audio hardware.<\/p>\n\n\n\n<p>If you actually have a Hi-fi system with 8 speakers, then the sound is routed to the most appropriate speaker, and (if it&#8217;s midway between two of the speakers) it&#8217;s sent to two speakers at once, and slightly quietened so you don&#8217;t get the sound twice as loud coming from somewhere in between them.<\/p>\n\n\n\n<p>But what if you have stereo headphones? Well, the driver has a clever bit of software inside it that &#8220;convolves&#8221; 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&#8217;s coming from somewhere else. The process isn&#8217;t perfect, and doesn&#8217;t handle verticality very well (sounds from above\/below), but the mixing is \/pretty good\/.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/www.darkbluemonkey.com\/wp-content\/uploads\/2026\/04\/head.jpeg\" alt=\"\" class=\"wp-image-117\" style=\"width:432px;height:auto\" srcset=\"https:\/\/www.darkbluemonkey.com\/wp-content\/uploads\/2026\/04\/head.jpeg 1024w, https:\/\/www.darkbluemonkey.com\/wp-content\/uploads\/2026\/04\/head-300x225.jpeg 300w, https:\/\/www.darkbluemonkey.com\/wp-content\/uploads\/2026\/04\/head-768x576.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">A head model with two microphones in the ears is used to create a &#8216;model&#8217; of what sounds are like coming from different angles.<\/figcaption><\/figure>\n\n\n\n<p>The heart of the convolver is a &#8220;model&#8221;. 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.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>There&#8217;s a great site called &#8220;Airtable&#8221; that has lots of the models\u2026 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&#8217;s CMSS and Razer&#8217;s.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/airtable.com\/appayGNkn3nSuXkaz\/shruimhjdSakUPg2m\/tbloLjoZKWJDnLtTc\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"469\" src=\"https:\/\/www.darkbluemonkey.com\/wp-content\/uploads\/2026\/04\/hrtf-1024x469.png\" alt=\"\" class=\"wp-image-116\" srcset=\"https:\/\/www.darkbluemonkey.com\/wp-content\/uploads\/2026\/04\/hrtf-1024x469.png 1024w, https:\/\/www.darkbluemonkey.com\/wp-content\/uploads\/2026\/04\/hrtf-300x137.png 300w, https:\/\/www.darkbluemonkey.com\/wp-content\/uploads\/2026\/04\/hrtf-768x351.png 768w, https:\/\/www.darkbluemonkey.com\/wp-content\/uploads\/2026\/04\/hrtf-1536x703.png 1536w, https:\/\/www.darkbluemonkey.com\/wp-content\/uploads\/2026\/04\/hrtf.png 1866w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">The hrtf database on airtable is an invaluable resource<\/figcaption><\/figure>\n\n\n\n<p>So, how do you use this? Well, the good news is that you don&#8217;t really need snazzy headphones. Any headphones will do, although the better quality ones will work better.<\/p>\n\n\n\n<p>The models come in a few types, but main two are &#8220;wav&#8221; files and &#8220;SORA&#8221; files. SORA is technically better, but linux only supports the WAV file version at the moment. Go ahead and download the &#8220;atmos.wav&#8221; (48khz version is the best) and then use the following two likes to stick it somewhere easy to get to:<\/p>\n\n\n\n<p><code>sudo mkdir \/usr\/share\/pipewire\/atmos<br>sudo cp ~\/Download\/atmos.wav \/usr\/share\/pipewire\/atmos<\/code><\/p>\n\n\n\n<p>On linux, you need to add your own Virtual Sound Sink (a sink is a place where audio data goes when it&#8217;s being played).<\/p>\n\n\n\n<p>To do this, you create a folder in your .cSo, what a lot of people don&#8217;t realise is that when they buy those snazzy 5.1 or 7.1 surround gaming headphones, they&#8217;re not actually buying headphones with 6 or 8 tiny little speakers in them. What they&#8217;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.<\/p>\n\n\n\n<p>In case this is one of those &#8220;Whaaaat? nooo!&#8221; moments, let me asplain.<\/p>\n\n\n\n<p>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&#8217;re for. The game says &#8220;The helicopter is somewhere &#8216;over there&#8217;, and sends the audio&#8217;s position and sound file out to the driver. The driver then takes that sound and sends it on to the audio hardware.<\/p>\n\n\n\n<p>If you actually have a Hi-fi system with 8 speakers, then the sound is routed to the most appropriate speaker, and (if it&#8217;s midway between two of the speakers) it&#8217;s sent to two speakers at once, and slightly quietened so you don&#8217;t get the sound twice as loud coming from somewhere in between them.<\/p>\n\n\n\n<p>But what if you have stereo headphones? Well, the driver has a clever bit of software inside it that &#8220;convolves&#8221; 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&#8217;s coming from somewhere else. The process isn&#8217;t perfect, and doesn&#8217;t handle verticality very well (sounds from above\/below), but the mixing is \/pretty good\/.<\/p>\n\n\n\n<p>The heart of the convolver is a &#8220;model&#8221;. 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.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>There&#8217;s a great site called &#8220;Airtable&#8221; that has lots of the models\u2026 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&#8217;s CMSS and Razer&#8217;s.<\/p>\n\n\n\n<p>So, how do you use this? Well, the good news is that you don&#8217;t really need snazzy headphones. Any headphones will do, although the better quality ones will work better.<\/p>\n\n\n\n<p>The models come in a few types, but main two are &#8220;wav&#8221; files and &#8220;SORA&#8221; files. SORA is technically better, but linux only supports the WAV file version at the moment. Go ahead and download the &#8220;atmos.wav&#8221; (48khz version is the best) and then use the following two likes to stick it somewhere easy to get to:<\/p>\n\n\n\n<p><code>sudo mkdir \/usr\/share\/pipewire\/atmos<br>sudo cp ~\/Download\/atmos.wav \/usr\/share\/pipewire\/atmos<\/code><\/p>\n\n\n\n<p>On linux, you need to add your own Virtual Sound Sink (a sink is a place where audio data goes when it&#8217;s being played).<\/p>\n\n\n\n<p>To do this, you create a folder in your .config folder<\/p>\n\n\n\n<p><code>mkdir ~\/.config\/pipewire<\/code><\/p>\n\n\n\n<p>and then inside it you create a filter-chain configuration folder (where pipewire will pull the config from)<\/p>\n\n\n\n<p><code>mkdir ~\/.config\/pipewire\/filter-chain.conf.d<\/code><\/p>\n\n\n\n<p>Now, Linux provides you a handy config file, so just copy it into your new folder. We&#8217;ll make the name easier while we&#8217;re at it.<\/p>\n\n\n\n<p><kbd>cp \/usr\/share\/pipewire\/filter-chain\/sink-virtual-surround-7.1-hesuvi.conf ~\/.config\/pipewire\/filter-chain.conf.d\/virtual-surround.conf<\/kbd><\/p>\n\n\n\n<p>ok, now we just need to make sure it uses the right file by changing the &#8220;hrir_hesuvi\/hrir.wav&#8221; to use the atmos.wav that we downloaded and put into the \/usr\/share\/pipewire\/atmos folder:<\/p>\n\n\n\n<p><code>sed -i 's\/hrir_hesuvi\\\/hrir.wav\/\\\/usr\\\/share\\\/pipewire\\\/atmos\\\/atmos.wav\/g' ~\/.config\/pipewire\/filter-chain.conf.d\/virtual-surround.conf<\/code><\/p>\n\n\n\n<p>and then restart X-windows.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>If it doesn&#8217;t work, then I&#8217;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&#8217;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\u2026. Dunno if that&#8217;s been fixed since then though.onfig folder<\/p>\n\n\n\n<p>mkdir ~\/.config\/pipewire<\/p>\n\n\n\n<p>and then inside it you create a filter-chain configuration folder (where pipewire will pull the config from)<\/p>\n\n\n\n<p><code>mkdir ~\/.config\/pipewire\/filter-chain.conf.d<\/code><\/p>\n\n\n\n<p>Now, Linux provides you a handy config file, so just copy it into your new folder. We&#8217;ll make the name easier while we&#8217;re at it.<\/p>\n\n\n\n<p><code>cp \/usr\/share\/pipewire\/filter-chain\/sink-virtual-surround-7.1-hesuvi.conf ~\/.config\/pipewire\/filter-chain.conf.d\/virtual-surround.conf<\/code><\/p>\n\n\n\n<p>ok, now we just need to make sure it uses the right file by changing the &#8220;hrir_hesuvi\/hrir.wav&#8221; to use the atmos.wav that we downloaded and put into the \/usr\/share\/pipewire\/atmos folder:<\/p>\n\n\n\n<p><code>sed -i 's\/hrir_hesuvi\\\/hrir.wav\/\\\/usr\\\/share\\\/pipewire\\\/atmos\\\/atmos.wav\/g' ~\/.config\/pipewire\/filter-chain.conf.d\/virtual-surround.conf<\/code><\/p>\n\n\n\n<p>and then restart X-windows.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>If it doesn&#8217;t work, then 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&#8217;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.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Your mileage may vary, and you may need to choose different models.  It works for me, although it does introduce some crackling when the CPU is busy, which can be a downside.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, what a lot of people don&#8217;t realise is that when they buy those snazzy 5.1 or 7.1 surround gaming headphones, they&#8217;re not actually buying headphones with 6 or 8 tiny little speakers in them. What they&#8217;re actually buying is a pair of decent STEREO headphones and a license to use some software that PRETENDS [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":117,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[7,5],"tags":[],"class_list":["post-115","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-tech"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/www.darkbluemonkey.com\/index.php?rest_route=\/wp\/v2\/posts\/115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.darkbluemonkey.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.darkbluemonkey.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.darkbluemonkey.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.darkbluemonkey.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=115"}],"version-history":[{"count":3,"href":"https:\/\/www.darkbluemonkey.com\/index.php?rest_route=\/wp\/v2\/posts\/115\/revisions"}],"predecessor-version":[{"id":121,"href":"https:\/\/www.darkbluemonkey.com\/index.php?rest_route=\/wp\/v2\/posts\/115\/revisions\/121"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.darkbluemonkey.com\/index.php?rest_route=\/wp\/v2\/media\/117"}],"wp:attachment":[{"href":"https:\/\/www.darkbluemonkey.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.darkbluemonkey.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.darkbluemonkey.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}