From 9e11a0660a76997d52ddd5ffea4dc42a6f857263 Mon Sep 17 00:00:00 2001 From: Andrea Bondavalli Date: Tue, 7 Dec 2021 10:06:24 +0100 Subject: [PATCH 1/3] Added buffer size parameter to run_latency_test.sh script --- run_latency_test.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/run_latency_test.sh b/run_latency_test.sh index 89628a6..e38942e 100755 --- a/run_latency_test.sh +++ b/run_latency_test.sh @@ -18,11 +18,12 @@ function usage { echo ' sample_rate can be one of 44100, 48000, 96000' >&2 echo ' channels can be one of 1, 2, 4' >&2 echo ' duration in seconds' >&2 + echo ' buffer size in frames' >&2 exit 1 } -if [ "$#" -ne 4 ]; then +if [ "$#" -lt 4 ]; then usage fi @@ -60,6 +61,13 @@ SAMPLE_FORMAT=$1 SAMPLE_RATE=$2 CHANNELS=$3 DURATION=$4 +if [ "$#" -gt 4 ]; then + FRAMES=$5 +else + FRAMES=128 +fi + +echo 'Using buffer size of '$FRAMES' frames' if [ $SAMPLE_FORMAT == "S16_LE" ]; then CODEC="L16" @@ -131,7 +139,7 @@ sleep 30 echo "Running 10 secs latency test" cd test -sudo nice -n -10 ./latency -P hw:RAVENNA -C hw:RAVENNA -f $SAMPLE_FORMAT -r $SAMPLE_RATE -c $CHANNELS -M 128 -m 128 -s $DURATION +sudo nice -n -10 ./latency -P hw:RAVENNA -C hw:RAVENNA -f $SAMPLE_FORMAT -r $SAMPLE_RATE -c $CHANNELS -M $FRAMES -m $FRAMES -s $DURATION cd .. echo "Terminating processes ..." From aa9a68dd2e5d5823429a6ebe36ca8029c14ca081 Mon Sep 17 00:00:00 2001 From: Andrea Bondavalli <56439183+bondagit@users.noreply.github.com> Date: Tue, 7 Dec 2021 10:27:26 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 95d4ca9..c1f4bad 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ The [aes67-daemon branch of ravenna-alsa-lkm repository](https://github.com/bond The following patches have been applied to the original module: +* patch to enable the configuration of smaller ALSA buffer sizes to reduce end-to-end latency to up to 8ms (from driver version v1.4). See [platform latency test](#latency) * patch to remove unsupported non-interleved access from driver capabilities. This enables compatibility with JACK audio (from driver version v1.3) * patch to enable the usage of a PTP master clock on the daemon host (from driver version v1.1) * patch to rework the driver PCM interface and to simplify and unify handling of read-write interlaved and memory mapped access modes From e0acdf7e14278b821a7051379350dff469c31ccb Mon Sep 17 00:00:00 2001 From: Andrea Bondavalli <56439183+bondagit@users.noreply.github.com> Date: Tue, 7 Dec 2021 10:34:46 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c1f4bad..df95437 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ The [aes67-daemon branch of ravenna-alsa-lkm repository](https://github.com/bond The following patches have been applied to the original module: -* patch to enable the configuration of smaller ALSA buffer sizes to reduce end-to-end latency to up to 8ms (from driver version v1.4). See [platform latency test](#latency) +* patch to enable the configuration of smaller ALSA buffer sizes to reduce end-to-end latency up to 8ms (from driver version v1.4). See [platform latency test](#latency). * patch to remove unsupported non-interleved access from driver capabilities. This enables compatibility with JACK audio (from driver version v1.3) * patch to enable the usage of a PTP master clock on the daemon host (from driver version v1.1) * patch to rework the driver PCM interface and to simplify and unify handling of read-write interlaved and memory mapped access modes