From 7725c0a40abffa96629805b7b4bd40c71cea4748 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Thu, 28 Jul 2016 22:08:29 +0200 Subject: machines/hannswurscht: patch pulse buffer size Testing if that improves streaming. --- machines/labnet/buffer.patch | 13 +++++++++++++ machines/labnet/labtops.nix | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 machines/labnet/buffer.patch (limited to 'machines') diff --git a/machines/labnet/buffer.patch b/machines/labnet/buffer.patch new file mode 100644 index 00000000..379b3174 --- /dev/null +++ b/machines/labnet/buffer.patch @@ -0,0 +1,13 @@ +diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c +index 2fdebe0..7042ccc 100644 +--- a/src/modules/alsa/alsa-sink.c ++++ b/src/modules/alsa/alsa-sink.c +@@ -63,7 +63,7 @@ + #define DEFAULT_DEVICE "default" + + #define DEFAULT_TSCHED_BUFFER_USEC (2*PA_USEC_PER_SEC) /* 2s -- Overall buffer size */ +-#define DEFAULT_TSCHED_WATERMARK_USEC (20*PA_USEC_PER_MSEC) /* 20ms -- Fill up when only this much is left in the buffer */ ++#define DEFAULT_TSCHED_WATERMARK_USEC (500*PA_USEC_PER_MSEC) /* 500ms -- Fill up when only this much is left in the buffer */ + + #define TSCHED_WATERMARK_INC_STEP_USEC (10*PA_USEC_PER_MSEC) /* 10ms -- On underrun, increase watermark by this */ + #define TSCHED_WATERMARK_DEC_STEP_USEC (5*PA_USEC_PER_MSEC) /* 5ms -- When everything's great, decrease watermark by this */ diff --git a/machines/labnet/labtops.nix b/machines/labnet/labtops.nix index aa06877e..d91e450e 100644 --- a/machines/labnet/labtops.nix +++ b/machines/labnet/labtops.nix @@ -14,7 +14,8 @@ }; - hannswurscht = { + hannswurscht = { pkgs, ... }: + { vuizvui.user.openlab.base.enable = true; nixpkgs.system = "i686-linux"; @@ -23,6 +24,9 @@ services.mingetty.autologinUser = "openlab"; hardware.pulseaudio = { + package = pkgs.pulseaudioLight.overrideDerivation (old: { + patches = old.patches or [] ++ [ ./buffer.patch ]; + }); enable = true; # tcp.enable = true; # tcp.anonymousClients.allowedIpRanges = [ "172.16.0.0/16" ]; -- cgit 1.4.1