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