From 63b33bbedf5e70a2a9788ed9b582cdc557e3c312 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 27 Oct 2024 19:08:47 -0400 Subject: [PATCH] legion/go: add mic audio fix for hdmi --- hwModules/lenovo/legion/go/default.nix | 36 +++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/hwModules/lenovo/legion/go/default.nix b/hwModules/lenovo/legion/go/default.nix index c6e334e2..69432d27 100644 --- a/hwModules/lenovo/legion/go/default.nix +++ b/hwModules/lenovo/legion/go/default.nix @@ -47,6 +47,40 @@ in { logind.killUserProcesses = true; pipewire.wireplumber.configPackages = [ + (pkgs.writeTextDir "share/pipewire/pipewire.conf.d/11-mic-hdmi-audio.conf" '' + # Mix + HDMI audio fixes + monitor.alsa.rules = [ + { + matches = [ + { + node.name = "alsa_input.pci-0000_c2_00.6.analog-stereo" + } + ] + actions = { + update-props = { + priority.driver = 8901 + priority.session = 8901 + } + } + } + ] + + monitor.alsa.rules = [ + { + matches = [ + { + node.name = "alsa_output.pci-0000_c2_00.1.hdmi-stereo" + } + ] + actions = { + update-props = { + priority.driver = 1010 + priority.session = 1010 + } + } + } + ] + '') (pkgs.writeTextDir "share/pipewire/pipewire.conf.d/10-legion-go-convolver.conf" '' # Convolver Configuration for Pipewire # @@ -87,7 +121,7 @@ in { node.autoconnect = true media.class = "Audio/Sink" priority.driver = 1000 - priority.session = 2000 + priority.session = 1001 audio.channels = 2 audio.position = [ FL FR ] }