Skip to content

Commit 67641d6

Browse files
authored
Pipewire fixing A1RM4X & SEBANC issues
1 parent 13c414a commit 67641d6

File tree

1 file changed

+76
-12
lines changed

1 file changed

+76
-12
lines changed

modules/default/pipewire.nix

Lines changed: 76 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,75 @@
1-
{ lib, config, ... }:
1+
{ lib, config, pkgs, ... }:
22

3-
{
3+
let
4+
5+
wireplumberConfig = {
6+
"10-disable-camera" = {
7+
"wireplumber.profiles" = {
8+
main = {
9+
"monitor.libcamera" = "disabled";
10+
};
11+
};
12+
};
13+
};
14+
15+
pipewireExtraConfig = {
16+
pipewire."10-umc404hd" = {
17+
"context.modules" = [
18+
{
19+
name = "libpipewire-module-loopback";
20+
args = {
21+
node.description = "UMC Speakers";
22+
capture.props = {
23+
node.name = "UMC_Speakers";
24+
media.class = "Audio/Sink";
25+
audio.position = "FL,FR";
26+
};
27+
playback.props = {
28+
node.name = "playback.UMC_Speakers";
29+
audio.position = "AUX0,AUX1";
30+
target.object = "alsa_output.usb-BEHRINGER_UMC404HD_192k-00.pro-output-0";
31+
stream.dont-remix = true;
32+
node.passive = true;
33+
};
34+
};
35+
}
36+
{
37+
name = "libpipewire-module-loopback";
38+
args = {
39+
node.description = "UMC Headphones";
40+
capture.props = {
41+
node.name = "UMC_Headphones";
42+
media.class = "Audio/Sink";
43+
audio.position = "FL,FR";
44+
};
45+
playback.props = {
46+
node.name = "playback.UMC_Headphones";
47+
audio.position = "AUX2,AUX3";
48+
target.object = "alsa_output.usb-BEHRINGER_UMC404HD_192k-00.pro-output-0";
49+
stream.dont-remix = true;
50+
node.passive = true;
51+
};
52+
};
53+
}
54+
];
55+
};
56+
57+
pipewire."91-min-quantum" = {
58+
"context.properties" = {
59+
"default.clock.min-quantum" = 1024;
60+
};
61+
};
62+
63+
# Configuration pour désactiver le microphone d'entrée par défaut
64+
pipewire."01-microphone" = {
65+
"context.filter" = {
66+
in.ports = [ "alsa_input.usb-..." ];
67+
out.props = { "node.disable" = true; };
68+
};
69+
};
70+
};
71+
72+
in {
473

574
options.glf.pipewire.enable = lib.mkOption {
675
description = "Enable GLF pipewire configurations";
@@ -11,9 +80,10 @@
1180
config = lib.mkIf config.glf.pipewire.enable {
1281

1382
security.rtkit.enable = true;
83+
1484
services.pipewire = {
1585
enable = true;
16-
86+
1787
jack.enable = true;
1888
pulse.enable = true;
1989

@@ -22,15 +92,9 @@
2292
support32Bit = true;
2393
};
2494

25-
wireplumber.extraConfig = {
26-
"10-disable-camera" = {
27-
"wireplumber.profiles" = {
28-
main = {
29-
"monitor.libcamera" = "disabled";
30-
};
31-
};
32-
};
33-
};
95+
wireplumber.extraConfig = wireplumberConfig;
96+
97+
extraConfig = pipewireExtraConfig;
3498
};
3599

36100
};

0 commit comments

Comments
 (0)