diff --git a/README.md b/README.md index 7fa8432..3bcc31d 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,8 @@ 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 support sample rates 192Khz and 384Khz (from driver version v1.7) +* patch to compile with Linux Kernel v6.2 and above (from driver version v1.7) * patch to make the PTP slave status change from locked to unlocked if no announcement messages are received from the Master for more than 5 seconds (from driver version v1.6). See [issue 87](https://github.com/bondagit/aes67-linux-daemon/issues/87). * patch to fix issue causing the usage of wrong Sources and Sinks buffer offsets in case of reconfiguration or daemon restart (from driver version v1.5). See [issue 55](https://github.com/bondagit/aes67-linux-daemon/issues/55). * 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) and See [issue 53](https://github.com/bondagit/aes67-linux-daemon/issues/53) @@ -211,7 +213,7 @@ The script allows a user to test a specific configuration and it can be used to Usage run_test.sh sample_format sample_rate channels duration sample_format can be one of S16_LE, S24_3LE, S32_LE - sample_rate can be one of 44100, 48000, 96000 + sample_rate can be one of 44100, 48000, 96000, 192000, 384000 channels can be one of 2, 4, 6, up to 64 duration is in the range 1 to 10 minutes @@ -269,7 +271,7 @@ The script allows a user to test the latency on a specific configuration and it Usage run_latency_test.sh sample_format sample_rate channels duration frames sample_format can be one of S16_LE, S24_3LE, S32_LE - sample_rate can be one of 44100, 48000, 96000 + sample_rate can be one of 44100, 48000, 96000, 192000, 384000 channels can be one of 2, 4, 6, up to 64 duration of the test in seconds frames buffer size in frames diff --git a/build.sh b/build.sh index 1ead070..298202c 100755 --- a/build.sh +++ b/build.sh @@ -11,7 +11,7 @@ TOPDIR=$(pwd) cd 3rdparty if [ ! -d ravenna-alsa-lkm ]; then - git clone --single-branch --branch aes67-daemon https://github.com/bondagit/ravenna-alsa-lkm.git + git clone --single-branch --branch aes67-daemon-issue11 https://github.com/bondagit/ravenna-alsa-lkm.git cd ravenna-alsa-lkm/driver make cd ../.. diff --git a/daemon/README.md b/daemon/README.md index 9ddc21e..877ec1d 100644 --- a/daemon/README.md +++ b/daemon/README.md @@ -237,7 +237,7 @@ where: > **sample\_rate** > JSON number specifying the default sample rate. -> Valid values are 44100Hz, 48000Hz and 96000Hz. +> Valid values are 44100Hz, 48000Hz, 96000Hz, 192000Hz and 384000Hz. > **playout\_delay** > JSON number specifying the default safety playout delay at 1FS in samples. diff --git a/daemon/main.cpp b/daemon/main.cpp index 8706fbe..0a8aa8d 100644 --- a/daemon/main.cpp +++ b/daemon/main.cpp @@ -39,7 +39,7 @@ namespace po = boost::program_options; namespace postyle = boost::program_options::command_line_style; namespace logging = boost::log; -static const std::string version("bondagit-1.6.2"); +static const std::string version("bondagit-1.6.3"); static std::atomic terminate = false; void termination_handler(int signum) { diff --git a/run_latency_test.sh b/run_latency_test.sh index 8e23e33..1938201 100755 --- a/run_latency_test.sh +++ b/run_latency_test.sh @@ -13,9 +13,9 @@ function cleanup { } function usage { - echo 'Usage run_latenvy_test.sh sample_format sample_rate channels duration frames' >&2 + echo 'Usage run_latency_test.sh sample_format sample_rate channels duration frames' >&2 echo ' sample_format can be one of S16_LE, S24_3LE, S32_LE' >&2 - echo ' sample_rate can be one of 44100, 48000, 96000' >&2 + echo ' sample_rate can be one of 44100, 48000, 96000, 192000, 384000' >&2 echo ' channels can be one of 2, 4, 6, up to 64' >&2 echo ' duration in seconds' >&2 echo ' frames buffer size in frames' >&2 @@ -85,6 +85,10 @@ elif [ $SAMPLE_RATE == "48000" ]; then PTIME="1" elif [ $SAMPLE_RATE == "96000" ]; then PTIME="0.5" +elif [ $SAMPLE_RATE == "192000" ]; then + PTIME="0.25" +elif [ $SAMPLE_RATE == "384000" ]; then + PTIME="0.125" else usage fi diff --git a/run_test.sh b/run_test.sh index 72d60ed..bcdac37 100755 --- a/run_test.sh +++ b/run_test.sh @@ -45,7 +45,7 @@ echo 'Creating test file ...' >&2 if ! ./createtest $1 $2 $3 $4 ; then echo 'Usage run_test.sh sample_format sample_rate channels duration' >&2 echo ' sample_format can be one of S16_LE, S24_3LE, S32_LE' >&2 - echo ' sample_rate can be one of 44100, 48000, 96000' >&2 + echo ' sample_rate can be one of 44100, 48000, 96000, 192000, 384000' >&2 echo ' channels can be one of 2, 4, 6, up to 64' >&2 echo ' duration is in the range 1 to 10 minutes' >&2 exit 1 @@ -74,6 +74,10 @@ elif [ $SAMPLE_RATE == "48000" ]; then PTIME="1" elif [ $SAMPLE_RATE == "96000" ]; then PTIME="0.5" +elif [ $SAMPLE_RATE == "192000" ]; then + PTIME="0.25" +elif [ $SAMPLE_RATE == "384000" ]; then + PTIME="0.125" fi SOURCE=$(cat <<-END diff --git a/systemd/install.sh b/systemd/install.sh index dadee42..9990737 100755 --- a/systemd/install.sh +++ b/systemd/install.sh @@ -5,9 +5,9 @@ #create a user for the daemon sudo useradd -M -l aes67-daemon -c "AES67 Linux daemon" -#copy the daemon binary +#copy the daemon binary, make sure -DWITH_SYSTEMD=ON sudo cp ../daemon/aes67-daemon /usr/local/bin/aes67-daemon -#create the daemon webui and scripts directories +#create the daemon webui and script directories sudo install -d -o aes67-daemon /var/lib/aes67-daemon /usr/local/share/aes67-daemon/scripts/ /usr/local/share/aes67-daemon/webui/ #copy the ptp script sudo install -o aes67-daemon ../daemon/scripts/ptp_status.sh /usr/local/share/aes67-daemon/scripts/ diff --git a/test/createtest.cc b/test/createtest.cc index c2370d7..1011103 100644 --- a/test/createtest.cc +++ b/test/createtest.cc @@ -25,7 +25,7 @@ int main(int argc, char* argv[]) } int rate(atoi(argv[2])); - if (rate != 44100 && rate != 48000 && rate != 96000) { + if (rate != 44100 && rate != 48000 && rate != 96000 && rate != 192000 && rate != 384000) { cerr << "Unsupported rate " << rate << endl; exit(1); } diff --git a/test/latency.cc b/test/latency.cc index 5b590e7..251a53a 100644 --- a/test/latency.cc +++ b/test/latency.cc @@ -583,7 +583,7 @@ int main(int argc, char *argv[]) break; case 'r': err = atoi(optarg); - rate = err >= 4000 && err < 200000 ? err : 44100; + rate = err >= 4000 && err < 400000 ? err : 44100; break; case 'B': err = atoi(optarg); @@ -624,7 +624,7 @@ int main(int argc, char *argv[]) loop_limit = loop_sec * rate; latency = latency_min - 4; - buffer = (char*)malloc((latency_max * 2 * snd_pcm_format_width(format) / 8) * channels); + buffer = (char*)malloc((latency_max * 4 * snd_pcm_format_width(format) / 8) * channels); setscheduler(); diff --git a/webui/src/Config.jsx b/webui/src/Config.jsx index 99af251..91b12f9 100644 --- a/webui/src/Config.jsx +++ b/webui/src/Config.jsx @@ -186,6 +186,8 @@ class Config extends Component { + +