feat(shorthair): Update audio for using Pro Audio

The RodeCaster Duo I use for audio allows me to use a "Pro Audio"
profile. This seperates the "Chat" output and "Main" Output over USB.
This change creates virtual inputs and updates the virtual outputs to
comply with the new device names.

Change-Id: I9f01ed312fcfcb0df0e109b1239644fa8fa20a35
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/849
Reviewed-by: Samuel Shuert <coded@clicks.codes>
Tested-by: Samuel Shuert <coded@clicks.codes>
diff --git a/systems/x86_64-linux/shorthair/audio/default.nix b/systems/x86_64-linux/shorthair/audio/default.nix
index 9b1151f..baddd31 100644
--- a/systems/x86_64-linux/shorthair/audio/default.nix
+++ b/systems/x86_64-linux/shorthair/audio/default.nix
@@ -21,10 +21,6 @@
                   "media.class" = "Audio/Sink";
                   "node.name" = "alsa_output.usb-NXP_SEMICONDUCTORS_Razer_Kraken_V3_Pro-00.analog-stereo";
                 }
-                {
-                  "media.class" = "Audio/Sink";
-                  "node.name" = "alsa_output.usb-R__DE_RODECaster_Duo_IR0023015-00.analog-stereo";
-                }
               ];
               actions = {
                 create-stream = {
@@ -33,6 +29,82 @@
                 };
               };
             }
+            {
+              matches = [
+                {
+                  "media.class" = "Audio/Sink";
+                  "node.name" = "alsa_output.usb-R__DE_RODECaster_Duo_IR0023015-00.pro-output-1";
+                }
+              ];
+              actions = {
+                create-stream = {
+                  "audio.position" = [ "AUX0" "AUX1" ];
+                  "combine.audio.position" = [ "FL" "FR" ];
+                };
+              };
+            }
+          ];
+        };
+      }
+      {
+        name = "libpipewire-module-combine-stream";
+        args = {
+          "combine.mode" = "sink";
+          "node.name" = "chat_output";
+          "node.description" = "Chat Output";
+          "combine.latency-compensate" = false;
+          "combine.props" = {
+            "audio.position" = [ "FL" "FR" ];
+          };
+          "stream.props" = {
+            "stream.dont-remix" = true;
+          };
+          "stream.rules" = [
+            {
+              matches = [
+                {
+                  "media.class" = "Audio/Sink";
+                  "node.name" = "alsa_output.usb-R__DE_RODECaster_Duo_IR0023015-00.pro-output-0";
+                }
+              ];
+              actions = {
+                create-stream = {
+                  "audio.position" = [ "AUX0" "AUX1" ];
+                  "combine.audio.position" = [ "FL" "FR" ];
+                };
+              };
+            }
+          ];
+        };
+      }
+      {
+        name = "libpipewire-module-combine-stream";
+        args = {
+          "combine.mode" = "source";
+          "node.name" = "input";
+          "node.description" = "Input";
+          "combine.latency-compensate" = false;
+          "combine.props" = {
+            "audio.position" = [ "FL" "FR" ];
+          };
+          "stream.props" = {
+            "stream.dont-remix" = true;
+          };
+          "stream.rules" = [
+            {
+              matches = [
+                {
+                  "media.class" = "Audio/Source";
+                  "node.name" = "alsa_input.usb-R__DE_RODECaster_Duo_IR0023015-00.pro-input-1";
+                }
+              ];
+              actions = {
+                create-stream = {
+                  "audio.position" = [ "AUX0" "AUX1" ];
+                  "combine.audio.position" = [ "FL" "FR" ];
+                };
+              };
+            }
           ];
         };
       }