audio-server: fix zeroconf tcp stream

This commit is contained in:
Sandro - 2023-12-22 14:57:58 +01:00
parent db061ae1cb
commit 1cd74cd8d8
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 43 additions and 38 deletions

View File

@ -14,46 +14,51 @@ in
boot.kernelPackages = lib.mkOverride 900 pkgs.linuxPackages-rt_latest;
environment = {
etc."pipewire/pipewire.conf.d/audio-server.conf".text =
# _____ _______ ____ _____
# / ____|__ __/ __ \| __ \
# | (___ | | | | | | |__) |
# \___ \ | | | | | | ___/
# ____) | | | | |__| | |
# |_____/ |_| \____/|_|
#
# errors such as:
# mod.zeroconf-publish: error id:47 seq:349 res:-2 (No such file or directory): enum params id:16 (Spa:Enum:ParamId:ProcessLatency) failed
# are harmless and can be ignored. You most likely want to restart your local avahi-daemon: sudo systemctl restart avahi-daemon
builtins.toJSON {
"context.exec" = let
path = "${pkgs.pulseaudio}/bin/pactl";
in [ {
inherit path;
args = "load-module module-zeroconf-publish";
} {
# https://wiki.archlinux.org/title/PulseAudio/Examples#PulseAudio_over_network
inherit path;
args = "load-module module-rtp-recv latency_msec=10 sap_address=0.0.0.0";
} ];
"pulse.properties" = {
"auth-ip-acl" = [
"127.0.0.0/8"
"::1/128"
"fd23:42:c3d2:500::/56"
"172.22.99.0/24"
"172.20.72.0/21"
"2a00:8180:2c00:200::/56"
"2a0f:5382:acab:1400::/56"
];
"pulse.default.tlength" = "96000/48000";
"server.address" = [
"unix:native"
"tcp:4713"
"udp:9875"
];
# _____ _______ ____ _____
# / ____|__ __/ __ \| __ \
# | (___ | | | | | | |__) |
# \___ \ | | | | | | ___/
# ____) | | | | |__| | |
# |_____/ |_| \____/|_|
#
# errors such as:
# mod.zeroconf-publish: error id:47 seq:349 res:-2 (No such file or directory): enum params id:16 (Spa:Enum:ParamId:ProcessLatency) failed
# are harmless and can be ignored. You most likely want to restart your local avahi-daemon: sudo systemctl restart avahi-daemon
etc = {
"pipewire/pipewire.conf.d/audio-server.conf".text = builtins.toJSON {
"context.modules" = [ {
# https://wiki.archlinux.org/title/PulseAudio/Examples#PulseAudio_over_network
name = "libpipewire-module-rtp-sap";
args = {
"sap.ip" = "0.0.0.0";
"sess.latency.msec" = 10;
};
} ];
};
"pipewire/pipewire-pulse.conf.d/audio-server.conf".text = builtins.toJSON {
"context.exec" = [ {
path = "${pkgs.pulseaudio}/bin/pactl";
args = "load-module module-zeroconf-publish";
} ];
"pulse.properties" = {
"auth-ip-acl" = [
"127.0.0.0/8"
"::1/128"
"fd23:42:c3d2:500::/56"
"172.22.99.0/24"
"172.20.72.0/21"
"2a00:8180:2c00:200::/56"
"2a0f:5382:acab:1400::/56"
];
"pulse.default.tlength" = "96000/48000";
"server.address" = [
"unix:native"
"tcp:4713"
];
};
};
};
systemPackages = with pkgs; [
mpd
mpv