From 93d6d71a1de0bf56e866524780053dcb28aecb5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 11 Jul 2023 11:30:42 +0200 Subject: [PATCH] dde_bsd: add patch to limit internal buffer size Decreasing the internal buffer size will implicitly limit the number of blocks provisioned for recording and brings them in line with the number of blocks used for playback (2). Note that this patch also sets an upper-bound on the number of samples in 'Audio_*::PERIOD'. --- repos/dde_bsd/patches/audio_bufsz.patch | 13 +++++++++++++ repos/dde_bsd/ports/dde_bsd.hash | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 repos/dde_bsd/patches/audio_bufsz.patch diff --git a/repos/dde_bsd/patches/audio_bufsz.patch b/repos/dde_bsd/patches/audio_bufsz.patch new file mode 100644 index 0000000000..7d491ec2e9 --- /dev/null +++ b/repos/dde_bsd/patches/audio_bufsz.patch @@ -0,0 +1,13 @@ +Decrease the initial audio buffer size that implicitly limits the number +of records blocks. +--- a/dev/audio.c ++++ b/dev/audio.c +@@ -55,7 +55,7 @@ + #define AUDIO_DEV(n) (minor(n) & 0xf0) + #define AUDIO_DEV_AUDIO 0 /* minor of /dev/audio0 */ + #define AUDIO_DEV_AUDIOCTL 0xc0 /* minor of /dev/audioctl */ +-#define AUDIO_BUFSZ 65536 /* buffer size in bytes */ ++#define AUDIO_BUFSZ 4096 /* buffer size in bytes */ + + /* + * mixer entries added by the audio(4) layer diff --git a/repos/dde_bsd/ports/dde_bsd.hash b/repos/dde_bsd/ports/dde_bsd.hash index 5226149bb2..460d603aaa 100644 --- a/repos/dde_bsd/ports/dde_bsd.hash +++ b/repos/dde_bsd/ports/dde_bsd.hash @@ -1 +1 @@ -23a28150a282dd2d9f28e36264f1df5b0699ff6b +b6086e021be26a2f2a07463c0318b79fd8d0513e