From 6bd7248797f91f54b73afc88d966618b5dc1be87 Mon Sep 17 00:00:00 2001
From: Kyle Gospodnetich <me@kylegospodneti.ch>
Date: Thu, 24 Aug 2023 09:25:04 -0700
Subject: [PATCH] feat(deck): Add equalizer settings for mic from SteamOS

---
 .../etc/pipewire/99-input-denoising.conf      | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/system_files/deck/shared/etc/pipewire/99-input-denoising.conf b/system_files/deck/shared/etc/pipewire/99-input-denoising.conf
index 295613d8..763a2ae1 100644
--- a/system_files/deck/shared/etc/pipewire/99-input-denoising.conf
+++ b/system_files/deck/shared/etc/pipewire/99-input-denoising.conf
@@ -16,6 +16,45 @@ context.modules = [
                         "Retroactive VAD Grace (ms)" = 0
                     }
                 }
+                {
+                    type = ladspa
+                    name = equaliser
+                    plugin = /usr/lib64/ladspa/caps.so
+                    label = Eq10X2
+                    control = {
+                        "31 Hz" 0
+                        "63 Hz" 0
+                        "125 Hz" 0
+                        "250 Hz" 0
+                        "500 Hz" 0
+                        "1 kHz" 0
+                        "2 kHz" 0
+                        "4 kHz" 0
+                        "8 kHz" -3
+                        "16 kHz" -3
+                    }
+                }
+                {
+                    type = ladspa
+                    name = compressor
+                    plugin = /usr/lib64/ladspa/caps.so
+                    label = CompressX2
+                    control = {
+                        "measure" 1
+                        "mode" 1
+                        "threshold" 0.5
+                        "strength" 0.25
+                        "attack" 0.75
+                        "release" 0.5
+                        "gain (dB)" 12
+                    }
+                }
+            ]
+            links = [
+                { output = "rnnoise:Output (L)" input = "equaliser:in.l" }
+                { output = "rnnoise:Output (R)" input = "equaliser:in.r" }
+                { output = "equaliser:out.l" input = "compressor:in.l" }
+                { output = "equaliser:out.r" input = "compressor:in.r" }
             ]
         }
         capture.props = {