about summary refs log tree commit diff
path: root/machines
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2016-07-28 22:08:29 +0200
committerProfpatsch <mail@profpatsch.de>2016-07-28 22:20:48 +0200
commit7725c0a40abffa96629805b7b4bd40c71cea4748 (patch)
tree0b754f855a014a74e0a3f8ad10e85f3e252d48e0 /machines
parent09018c3089fbd5b620dc4f7e403fa192a680ef43 (diff)
machines/hannswurscht: patch pulse buffer size
Testing if that improves streaming.
Diffstat (limited to 'machines')
-rw-r--r--machines/labnet/buffer.patch13
-rw-r--r--machines/labnet/labtops.nix6
2 files changed, 18 insertions, 1 deletions
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" ];