Git Product home page Git Product logo

aes67-linux-daemon's People

Contributors

aleksanderzdunek avatar anbraten avatar bondagit avatar calanor avatar chssn avatar dinkdonk avatar glance- avatar jtc-dolby avatar justinledwards avatar keygee avatar mrobbetts avatar nsgundy avatar sikabo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aes67-linux-daemon's Issues

About ravenna-alsa-lkm fork

On February 16, the commit fe3ff1a removes the patches from the alsa driver to use a fork of the original Merging drriver with the patches already applied (according to your description).

But I checked the source and I don't see that any patches are applied on your ravenna-alsa-lkm driver fork. I don't see any difference between your fork and the original and patches like for example "ravenna-alsa-lkm-enable-mono-channels.patch" that enables mono channels is not applied.

I cannot find webui/build

I am trying to compile from the latest version...
but it doesn't create the webui/build path for me.

running build.sh

Connecting to github-releases.githubusercontent.com|185.199.108.154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 91887 (90K) [application/octet-stream]
Saving to: ‘webui.tar.gz’

webui.tar.gz                                    100%[=====================================================================================================>]  89.73K  --.-KB/s    in 0.08s   

2021-06-14 15:08:19 (1.11 MB/s) - ‘webui.tar.gz’ saved [91887/91887]

dist/
dist/info.png
dist/edit.png
dist/loader.gif
dist/index.html
dist/assets/
dist/assets/index.ba3be13a.css
dist/assets/index.b9b0731f.js
dist/assets/vendor.3670ae41.js
dist/reload.png
dist/trash.png
dist/plus.png
Building aes67-daemon ...
-- The CXX compiler identification is GNU 10.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Boost: /usr/lib64/cmake/Boost-1.76.0/BoostConfig.cmake (found version "1.76.0") found components: system thread log program_options 
-- Found Boost: /usr/lib64/cmake/Boost-1.76.0/BoostConfig.cmake (found version "1.76.0") found components: unit_test_framework filesystem system thread 
-- WITH_AVAHI
-- WITH_AVAHI
-- Configuring done
-- Generating done
-- Build files have been written to: /build/aes67-linux-daemon/daemon
Scanning dependencies of target aes67-daemon
[  5%] Building CXX object CMakeFiles/aes67-daemon.dir/error_code.cpp.o
[ 10%] Building CXX object CMakeFiles/aes67-daemon.dir/json.cpp.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/format/alt_sstream.hpp:22,
                 from /usr/include/boost/format/internals.hpp:24,
                 from /usr/include/boost/format.hpp:38,
                 from /usr/include/boost/property_tree/json_parser/detail/parser.hpp:8,
                 from /usr/include/boost/property_tree/json_parser/detail/read.hpp:13,
                 from /usr/include/boost/property_tree/json_parser.hpp:16,
                 from /build/aes67-linux-daemon/daemon/json.cpp:21:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
[ 15%] Building CXX object CMakeFiles/aes67-daemon.dir/main.cpp.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/program_options/options_description.hpp:16,
                 from /usr/include/boost/program_options.hpp:15,
                 from /build/aes67-linux-daemon/daemon/main.cpp:20:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
[ 20%] Building CXX object CMakeFiles/aes67-daemon.dir/driver_handler.cpp.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/log/core/core.hpp:19,
                 from /usr/include/boost/log/sources/basic_logger.hpp:36,
                 from /usr/include/boost/log/sources/severity_logger.hpp:23,
                 from /usr/include/boost/log/trivial.hpp:23,
                 from /build/aes67-linux-daemon/daemon/log.hpp:23,
                 from /build/aes67-linux-daemon/daemon/driver_handler.cpp:23:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
[ 25%] Building CXX object CMakeFiles/aes67-daemon.dir/driver_manager.cpp.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/log/core/core.hpp:19,
                 from /usr/include/boost/log/sources/basic_logger.hpp:36,
                 from /usr/include/boost/log/sources/severity_logger.hpp:23,
                 from /usr/include/boost/log/trivial.hpp:23,
                 from /build/aes67-linux-daemon/daemon/log.hpp:23,
                 from /build/aes67-linux-daemon/daemon/driver_manager.cpp:22:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
[ 30%] Building CXX object CMakeFiles/aes67-daemon.dir/session_manager.cpp.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/format/alt_sstream.hpp:22,
                 from /usr/include/boost/format/internals.hpp:24,
                 from /usr/include/boost/format.hpp:38,
                 from /usr/include/boost/property_tree/json_parser/detail/parser.hpp:8,
                 from /usr/include/boost/property_tree/json_parser/detail/read.hpp:13,
                 from /usr/include/boost/property_tree/json_parser.hpp:16,
                 from /build/aes67-linux-daemon/daemon/session_manager.cpp:26:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
[ 35%] Building CXX object CMakeFiles/aes67-daemon.dir/http_server.cpp.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/format/alt_sstream.hpp:22,
                 from /usr/include/boost/format/internals.hpp:24,
                 from /usr/include/boost/format.hpp:38,
                 from /usr/include/boost/property_tree/json_parser/detail/parser.hpp:8,
                 from /usr/include/boost/property_tree/json_parser/detail/read.hpp:13,
                 from /usr/include/boost/property_tree/json_parser.hpp:16,
                 from /build/aes67-linux-daemon/daemon/http_server.cpp:21:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
[ 40%] Building CXX object CMakeFiles/aes67-daemon.dir/config.cpp.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/date_time/time_clock.hpp:17,
                 from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:10,
                 from /usr/include/boost/asio/time_traits.hpp:23,
                 from /usr/include/boost/asio/detail/timer_queue_ptime.hpp:22,
                 from /usr/include/boost/asio/detail/deadline_timer_service.hpp:29,
                 from /usr/include/boost/asio/basic_deadline_timer.hpp:25,
                 from /usr/include/boost/asio.hpp:25,
                 from /build/aes67-linux-daemon/daemon/config.cpp:24:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
[ 45%] Building CXX object CMakeFiles/aes67-daemon.dir/interface.cpp.o
[ 50%] Building CXX object CMakeFiles/aes67-daemon.dir/log.cpp.o
[ 55%] Building CXX object CMakeFiles/aes67-daemon.dir/sap.cpp.o
In file included from /usr/include/boost/bind.hpp:30,
                 from /build/aes67-linux-daemon/daemon/sap.cpp:20:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
[ 60%] Building CXX object CMakeFiles/aes67-daemon.dir/browser.cpp.o
[ 65%] Building CXX object CMakeFiles/aes67-daemon.dir/rtsp_client.cpp.o
[ 70%] Building CXX object CMakeFiles/aes67-daemon.dir/mdns_client.cpp.o
[ 75%] Building CXX object CMakeFiles/aes67-daemon.dir/mdns_server.cpp.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/date_time/time_clock.hpp:17,
                 from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:10,
                 from /usr/include/boost/asio/time_traits.hpp:23,
                 from /usr/include/boost/asio/detail/timer_queue_ptime.hpp:22,
                 from /usr/include/boost/asio/detail/deadline_timer_service.hpp:29,
                 from /usr/include/boost/asio/basic_deadline_timer.hpp:25,
                 from /usr/include/boost/asio.hpp:25,
                 from /build/aes67-linux-daemon/daemon/mdns_server.cpp:20:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
[ 80%] Building CXX object CMakeFiles/aes67-daemon.dir/rtsp_server.cpp.o
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/date_time/time_clock.hpp:17,
                 from /usr/include/boost/date_time/posix_time/posix_time_types.hpp:10,
                 from /usr/include/boost/asio/time_traits.hpp:23,
                 from /usr/include/boost/asio/detail/timer_queue_ptime.hpp:22,
                 from /usr/include/boost/asio/detail/deadline_timer_service.hpp:29,
                 from /usr/include/boost/asio/basic_deadline_timer.hpp:25,
                 from /usr/include/boost/asio.hpp:25,
                 from /build/aes67-linux-daemon/daemon/rtsp_server.hpp:22,
                 from /build/aes67-linux-daemon/daemon/rtsp_server.cpp:20:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
[ 85%] Building CXX object CMakeFiles/aes67-daemon.dir/utils.cpp.o
[ 90%] Linking CXX executable aes67-daemon
[ 90%] Built target aes67-daemon
Scanning dependencies of target daemon-test
[ 95%] Building CXX object tests/CMakeFiles/daemon-test.dir/daemon_test.cpp.o
cc1plus: warning: /build/aes67-linux-daemon/daemon/aes67-daemon: not a directory
[100%] Linking CXX executable daemon-test
[100%] Built target daemon-test

enable use of a local PTP master clock on the daemon host

I've encountered a problem trying to combine the AES67 daemon with PJSIP. To query devices and their capabilities, PJSIP will open them. However, when there is no PTP lock, opening the RAVENNA device has a timeout of over two minutes.

The delay appears to happen in audio_driver.c mr_alsa_audio_pcm_prepare() between

printk(KERN_DEBUG "mr_alsa_audio_pcm_prepare: rate=%d format=%d channels=%d period_size=%lu, nb periods=%u\n", runtime->rate, runtime->format, runtime->channels, runtime->period_size, runtime->periods);

and

printk(KERN_DEBUG "mr_alsa_audio_pcm_prepare for playback stream\n");

I'm guessing it's related to setting the sample rate.

I haven't found a way to run ptp4l on the same interface as the daemon, and since the system is designed to allow running PJSIP on other devices, too, I need to be able to query interfaces even when there's no PTP (c)lock.

Do you have an idea how to work around that dilemma?

Thanks!

end to end latency over 50ms

Have a system playing from a Raspberry PI CM4 with cm4 I/o board for ethernet. AesS67 daemon 1.31.
I ran the auto test routine on this AES67 cm4 and it passed ok.
Using a second PI as PTP clock via new d-link gigabit switch. Using MacBook Pro (Big Sur) with Merging/Ravenna Virtual audio device. Everything is locked together and speaker test works, and I can play audio files and RX the streams on the MacBook without clicks or dropouts.
However, the latency is about 1.2 sec!

SDP file from the AES57 sink/playout seems to work:
`v=0
o=- 2831165442 2831165444 IN IP4 192.168.2.40
s=AES67 daemon a8c02802 ALSA Source 0
c=IN IP4 239.255.0.10/15
t=0 0
a=clock-domain:PTPv2 0
m=audio 5004 RTP/AVP 98
c=IN IP4 239.255.0.10/15
a=rtpmap:98 L24/48000/2
a=sync-time:0
a=framecount:48
a=ptime:1
a=mediaclk:direct=0
a=ts-refclk:ptp=IEEE1588-2008:E4-5F-01-FF-FE-23-C2-20:0
a=recvonly

`
I tried not using Merging/Ravenna VAD and tried some command line FFMPEG and gstreamer stuff which works fine
but I always get circa 1.2 sec playback delay.

I also tried using a gstreamer command on the CM4 that is the player and sending to both the local audio output and plughw:RAVENNA at the same time. This works but the latency here is 1.2s, so maybe thats the problem?

Thanks.

Fallback to only one channel on reconfiguration or daemon restarts

First of all, I really appreciate this project.
I have noticed a strange fallback to only one channel (the first alsa channel on the system) transmitting or receiving audio after streams are reconfigured, the daemon is restarted or the network cable was unplugged and an audio application restarted. Most of the time I was able to fix it by stopping everything and reloading the kernel module. Observed both on bondagit-1.2 and 1.3 on:

  • x86 (debian sid)
  • banana pro (armbian focal)
  • rpi 4 (raspbian minimal)

PTP GM and Streaming partner is a Lawo A__digital8.

The test ran fine on those systems, but since it loads the kernel module fresh, it doesn't catch this condition.

Only audio on the first channel of the system i/o (alsa) is played/transmitted. Mapping other channels leads to silence.
I can later do some more tests with more verbose logging - I just want to get the conversation started.

occasional drops detected in output RTP stream

As reported by @jtc-dolby we have an issue with the ALSA RAVENNA driver causing occasional drops or stream realignment in output RTP stream.
It's possible to detect the problem by playing on the RAVENNA device a low frequency e.g. 100Hz sine wave and checking the resulting recording on another device.
The issue can be reproduced with both memory mapped and read/write interleaved modes.

See enclosed pictures:

drop_mmap
drop_no_mmap

According to my tests the problem doesn't show up on the recording side and it seems to affect the playback only.

After a number of tries I could associate the issue to the following debug prints logged by the driver (see lines in bold):

[432559.316518] entering mr_alsa_audio_pcm_trigger (substream name=subdevice #0 #0) ...
[432559.316521] mr_alsa_audio_pcm_trigger(Start), rate=48000 format=32 channels=2 period_size=48
[432559.316523] starting playback I/O
[432559.323410] LastTICCounter = 2636220 ui64TICCounter = 2636227 (Timer period = 69 [100us])
[432559.323427] Timer period out of range: 0 [ms]. Target period = 1

[432559.323428] next_wakeup: 432561021200000 now: 432561021145163
[432560.597372] LastTICCounter = 2637506 ui64TICCounter = 2637501 (Timer period = 9 [100us])
[432660.226216] LastTICCounter = 2737128 ui64TICCounter = 2737130 (Timer period = 18 [100us])
[432660.227235] LastTICCounter = 2737131 ui64TICCounter = 2737131 (Timer period = 0 [100us])
[432719.026270] Timer period out of range: 0 [ms]. Target period = 1
[432719.026276] next_wakeup: 432720725500000 now: 432720725422743

Problems using rpi as Dante receiver or for RAVENNA (AES67 transmitter works)

Hi,

I've been trying to get the driver and daemon working on a Raspberry Pi 4B/4GB and am having some difficulty.

I'm using the Raspberry Pi OS Lite, to minimize overhead on the device. I've upgraded to Linux kernel 5.15, and your daemon and patched driver seem to build fine. I did note a few warnings during compilation regarding unused variables and something about a pointer...

The platform test works on the loopback adapter.

On the eth0 interface, I can access the WebUI. Testing Dante interoperability, I'm able to see the configured ALSA Source and connect it to 2 channels on an AVIO AES3 adapter. The behavior running speaker-test is correct: prohibition icons get replaced with green icons when there's a signal.

However, the Dante device (set for AES67 interop), does not show up in the WebUI browser.

Also, I can't see any input/output channels for the Linux RAVENNA device in the ANEMAN browser from Merging. The device itself does show up.

Any thoughts on what I'm doing wrong, or advice on how to troubleshoot?

Thanks,
Neil.

Accessing additional ALSA outputs

I'm sorry for asking this as well... I know it's not directly related to the daemon you've created (which I'm really appreciating) but to the full use of the sources it can create. I can access the first pair of ALSA outputs readily enough (I looked at the run_demo.sh) but I'm not sure how to access additional pairs of ALSA outputs (for example, ALSA Outputs 3 & 4 for a second source.

I tried using the asound.conf like this:
pcm.test4 {
type plug
slave.pcm {
type dmix
ipc_key 0x11113
slave {
pcm "hw:CARD=RAVENNA"
rate 48000
format S24_3LE
channels 32
}
bindings {
0 2
1 3
}
}
}

I've also tried a few other configurations, but I can't seem to figure out how to actually send audio to the ALSA in a way that it's coming over my second source where the Audio Channels map is set to ALSA Output 3 -> ALSA Output 4.

Any help would be greatly appreciated!

Thank you

Patch to MTAL_LKernelAPI.c failed

These last days the patch to MTAL_LKernelAPI.c failed. Before was fine and I have already made a dkms package for Archlinux.

Apply patches to ravenna-alsa-lkm module ...
error: patch failed: driver/MTAL_LKernelAPI.c:35
error: driver/MTAL_LKernelAPI.c: patch does not apply

Browse and duplicate SAP message

I have a machine that sends a duplicate SAP packet.
Every 30 seconds I receive 2 identical SAP messages but it is discarded by timeout (browser.cpp: 125) because "announce_period" is 0 due to browser.cpp: 103 operation.

Other SAP browsers correctly display the message with this duplication.

A possible solution is not replace the source (browser.cpp: 105) if "upd_source.announce_period" is 0.

Look at the SAP message 42097 in the following log fragment ( 09:45:02 and 09:45:09 )

[2021-09-27 09:44:57.804330] [0x00007fbf7600e700] [info] driver_manager:: cmd GetPTPConfig done data len 2
[2021-09-27 09:44:57.804372] [0x00007fbf7600e700] [debug] driver_manager:: PTP Domain 0 DSCP 46
[2021-09-27 09:44:57.804413] [0x00007fbf7600e700] [debug] driver_handler:: sending command code 32 data len 0
[2021-09-27 09:44:57.804480] [0x00007fbf7600e700] [debug] driver_handler:: command code 32 data len 0 sent
[2021-09-27 09:44:57.804599] [0x00007fbf7600e700] [debug] driver_handler:: received cmd code 32 error 0 data len 16
[2021-09-27 09:44:57.804649] [0x00007fbf7600e700] [info] driver_manager:: cmd GetPTPStatus done data len 16
[2021-09-27 09:44:57.804692] [0x00007fbf7600e700] [debug] driver_manager:: PTP Status locked GMID 2461537149931028488 Jitter 0
[2021-09-27 09:44:58.805124] [0x00007fbf7600e700] [info] sap::announcement c8e3
[2021-09-27 09:44:58.805405] [0x00007fbf7600e700] [info] session_manager:: next SAP announcements in 30 secs
[2021-09-27 09:45:02.086407] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:33583
[2021-09-27 09:45:02.086506] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:33583
[2021-09-27 09:45:02.902596] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:42097
[2021-09-27 09:45:02.903870] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:42097
[2021-09-27 09:45:02.903970] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:42097
[2021-09-27 09:45:07.592673] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:22274
[2021-09-27 09:45:07.592776] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:22274
[2021-09-27 09:45:07.593015] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:28447
[2021-09-27 09:45:07.593094] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:28447
[2021-09-27 09:45:07.593327] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:63533
[2021-09-27 09:45:07.593402] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:63533
[2021-09-27 09:45:07.593610] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:55606
[2021-09-27 09:45:07.593669] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:55606
[2021-09-27 09:45:07.593830] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:36957
[2021-09-27 09:45:07.593887] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:36957
[2021-09-27 09:45:07.594040] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:20166
[2021-09-27 09:45:07.594116] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:20166
[2021-09-27 09:45:07.594269] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:5352
[2021-09-27 09:45:07.594318] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:5352
[2021-09-27 09:45:07.594463] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:36087
[2021-09-27 09:45:07.594510] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:36087
[2021-09-27 09:45:07.594683] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:7935
[2021-09-27 09:45:07.594731] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:7935
[2021-09-27 09:45:07.807976] [0x00007fbf7600e700] [debug] driver_handler:: sending command code 31 data len 0
[2021-09-27 09:45:07.808116] [0x00007fbf7600e700] [debug] driver_handler:: command code 31 data len 0 sent
[2021-09-27 09:45:07.808325] [0x00007fbf7600e700] [debug] driver_handler:: received cmd code 31 error 0 data len 2
[2021-09-27 09:45:07.808409] [0x00007fbf7600e700] [info] driver_manager:: cmd GetPTPConfig done data len 2
[2021-09-27 09:45:07.808477] [0x00007fbf7600e700] [debug] driver_manager:: PTP Domain 0 DSCP 46
[2021-09-27 09:45:07.808523] [0x00007fbf7600e700] [debug] driver_handler:: sending command code 32 data len 0
[2021-09-27 09:45:07.808590] [0x00007fbf7600e700] [debug] driver_handler:: command code 32 data len 0 sent
[2021-09-27 09:45:07.808703] [0x00007fbf7600e700] [debug] driver_handler:: received cmd code 32 error 0 data len 16
[2021-09-27 09:45:07.808757] [0x00007fbf7600e700] [info] driver_manager:: cmd GetPTPStatus done data len 16
[2021-09-27 09:45:07.808808] [0x00007fbf7600e700] [debug] driver_manager:: PTP Status locked GMID 2461537149931028488 Jitter 0
[2021-09-27 09:45:07.883909] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:16888
[2021-09-27 09:45:07.884003] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:16888
[2021-09-27 09:45:09.884847] [0x00007fbf67fff700] [info] browser:: SAP source sap:42097 timeout
[2021-09-27 09:45:15.731765] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:60006
[2021-09-27 09:45:15.731916] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:60006
[2021-09-27 09:45:16.675872] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:61283
[2021-09-27 09:45:16.676005] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:61283
[2021-09-27 09:45:16.989996] [0x00007fbf67fff700] [debug] browser:: received SAP message for sap:4756
[2021-09-27 09:45:16.990096] [0x00007fbf67fff700] [debug] browser:: refreshing SAP source sap:4756

Kernel Warning on Linux kernel 5.x.x caused by MergingRavennaALSA module

On Linux Kernel 5.x when I start the first playback or capture on the RAVENNA ALSA device I have the following WARNING message in the kernel message buffer:

[  353.799924] Merging RAVENNA ALSA module installed
[  353.851774] Hello Mr RAV ALSA Daemon
[  353.851970] Base period set to 11609977 ns
[  353.852035] Base period set to 4353741 ns
[  353.852055] Base period set to 4353741 ns
[  353.852338] nf_hook_func first message received
[  373.865275] Base period set to 4000000 ns
[  383.888330] entering mr_alsa_audio_pcm_open (substream name=subdevice #0 #0) ...
[  383.888333] 
               Current PTPFrame Size = 192
[  383.888760] mr_alsa_audio_pcm_hw_params (enter): rate=48000 format=10 channels=8 period_size=192, nb_periods=120
               , buffer_bytes=737280
[  383.888762] mr_alsa_audio_pcm_hw_params (capture): wrong nbPeriods (120 instead of 256)...
[  383.888870] mr_alsa_audio_pcm_hw_params done: rate=48000 format=10 channels=8 period_size=192, nb_periods=120
               , buffer_bytes=737280
[  383.888926] entering mr_alsa_audio_pcm_prepare (substream name=subdevice #0 #0) ...
[  383.888928] mr_alsa_audio_pcm_prepare: rate=48000 format=10 channels=8 period_size=192, nb periods=120
[  383.888929] mr_alsa_audio_pcm_prepare for capture stream
[  383.888929] Leaving mr_alsa_audio_pcm_prepare..
[  383.889038] entering mr_alsa_audio_pcm_trigger (substream name=subdevice #0 #0) ...
[  383.889039] mr_alsa_audio_pcm_trigger(Start), rate=48000 format=10 channels=8 period_size=192
[  383.889040] starting capture I/O
[  383.891131] ------------[ cut here ]------------
[  383.891156] WARNING: CPU: 1 PID: 0 at kernel/softirq.c:168 __local_bh_enable_ip+0x3a/0x60
[  383.891157] Modules linked in: MergingRavennaALSA(OE) vmw_vsock_vmci_transport vsock binfmt_misc nls_iso8859_1 intel_rapl_msr intel_rapl_common crct10dif_pclmul ghash_clmulni_intel snd_ens1371 snd_ac97_codec gameport ac97_bus aesni_intel crypto_simd snd_pcm vmw_balloon cryptd glue_helper intel_rapl_perf snd_seq_midi snd_seq_midi_event snd_rawmidi input_leds joydev serio_raw snd_seq snd_seq_device snd_timer snd soundcore vmw_vmci mac_hid sch_fq_codel vmwgfx ttm drm_kms_helper fb_sys_fops syscopyarea sysfillrect sysimgblt parport_pc ppdev lp drm parport ip_tables x_tables autofs4 hid_generic usbhid hid crc32_pclmul mptspi mptscsih mptbase ahci psmouse scsi_transport_spi e1000 pata_acpi libahci i2c_piix4
[  383.891192] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G           OE     5.4.0-37-generic #41-Ubuntu
[  383.891193] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 02/27/2020
[  383.891197] RIP: 0010:__local_bh_enable_ip+0x3a/0x60
[  383.891200] Code: a9 00 00 0f 00 75 23 83 ee 01 f7 de 65 01 35 55 ee 16 5e 65 8b 05 4e ee 16 5e a9 00 ff 1f 00 74 0d 5d 65 ff 0d 3f ee 16 5e c3 <0f> 0b eb d9 65 66 8b 05 aa 27 18 5e 66 85 c0 74 e6 e8 60 ff ff ff
[  383.891202] RSP: 0018:ffffb22fc04cca60 EFLAGS: 00010206
[  383.891205] RAX: 0000000080010200 RBX: 0000000000000001 RCX: 0000000000000000
[  383.891207] RDX: ffff97d5f3660000 RSI: 0000000000000200 RDI: ffffffffa273483e
[  383.891209] RBP: ffffb22fc04cca60 R08: 32d1378d00c68c24 R09: 0000000000000002
[  383.891211] R10: ffff97d5b16b78c0 R11: 0000000000000014 R12: 0000000000000000
[  383.891211] R13: ffff97d5f3610000 R14: ffff97d5f3660000 R15: ffff97d5e86b4a00
[  383.891213] FS:  0000000000000000(0000) GS:ffff97d5f5c40000(0000) knlGS:0000000000000000
[  383.891213] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  383.891214] CR2: 00007f85263a2670 CR3: 000000022e4ac006 CR4: 00000000001606e0
[  383.891248] Call Trace:
[  383.891250]  <IRQ>
[  383.891256]  __dev_queue_xmit+0x36f/0x8e0
[  383.891260]  ? __build_skb+0x47/0x60
[  383.891262]  ? __netdev_alloc_skb+0xc7/0x160
[  383.891267]  dev_queue_xmit+0x10/0x20
[  383.891279]  CW_socket_tx_packet+0x79/0xb0 [MergingRavennaALSA]
[  383.891286]  TransmitAcquiredPacket+0x1a/0x20 [MergingRavennaALSA]
[  383.891291]  SendRTPAudioPackets+0x34f/0x3f0 [MergingRavennaALSA]
[  383.891302]  send_outgoing_packets.part.0+0xa6/0x160 [MergingRavennaALSA]
[  383.891315]  send_outgoing_packets+0x26/0x30 [MergingRavennaALSA]
[  383.891320]  frame_process_begin+0xe/0x10 [MergingRavennaALSA]
[  383.891325]  AudioFrameTIC+0x5a/0xb0 [MergingRavennaALSA]
[  383.891330]  timerProcess+0x190/0x340 [MergingRavennaALSA]
[  383.891336]  t_clock_timer+0x40/0x70 [MergingRavennaALSA]
[  383.891340]  timer_callback+0x35/0xd0 [MergingRavennaALSA]
[  383.891342]  ? __remove_hrtimer+0x3c/0x70
[  383.891343]  __hrtimer_run_queues+0xf7/0x270
[  383.891345]  ? cleanup_netlink+0x30/0x30 [MergingRavennaALSA]
[  383.891346]  hrtimer_interrupt+0x109/0x220
[  383.891348]  smp_apic_timer_interrupt+0x71/0x140
[  383.891349]  apic_timer_interrupt+0xf/0x20
[  383.891350]  </IRQ>
[  383.891351] RIP: 0010:native_safe_halt+0xe/0x10
[  383.891352] Code: 7b ff ff ff eb bd 90 90 90 90 90 90 e9 07 00 00 00 0f 00 2d 46 60 53 00 f4 c3 66 90 e9 07 00 00 00 0f 00 2d 36 60 53 00 fb f4 <c3> 90 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 53 e8 0d 30 65 ff 65
[  383.891353] RSP: 0018:ffffb22fc009fe70 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
[  383.891354] RAX: ffffffffa28d53f0 RBX: 0000000000000001 RCX: 0000000000000001
[  383.891354] RDX: 00000000000d6a6e RSI: 00000059614c7c7f RDI: 0000000000000082
[  383.891355] RBP: ffffb22fc009fe90 R08: 00000066a172262d R09: 0000005963ebdf7f
[  383.891355] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001
[  383.891355] R13: ffff97d5f4465d00 R14: 0000000000000000 R15: 0000000000000000
[  383.891357]  ? __cpuidle_text_start+0x8/0x8
[  383.891358]  ? default_idle+0x20/0x140
[  383.891361]  arch_cpu_idle+0x15/0x20
[  383.891362]  default_idle_call+0x23/0x30
[  383.891363]  do_idle+0x1fb/0x270
[  383.891364]  cpu_startup_entry+0x20/0x30
[  383.891366]  start_secondary+0x167/0x1c0
[  383.891368]  secondary_startup_64+0xa4/0xb0
[  383.891369] ---[ end trace 9b37f82bb8cfe213 ]---
[  393.891392] entering mr_alsa_audio_pcm_open (substream name=subdevice #0 #0) ...

es67-linux-daemon/daemon/README.md is not correct

JSON RTP source example parameter:

"max_samples_per_packet": 48,

while in explanation there is no value "48":

where:
max_sample_per_packet JSON number specifying the max number of samples contained in one RTP packet. Valid values are 12, 16, 18, 96, 192.

On ARM platforms memory mapped access mode doesn't work properly on the playback device

On ARM the attempt to playback using memory mapped access mode results in playing silence or noise.
On a source configured to use L24 codec @48khz I can reproduce the problem with:

aplay -M -D plughw:RAVENNA -r 48000 -c 2 ./test.wav

This results in playing silence or noise.
The problem doesn't show up when playing in read/write interleaved mode and on the recording side using memory access mode.
I can reproduce the issue on all ARM platforms tested but not on x86_64, where memory mapped works properly.
As consequence the ALSA plugins on playback side don't work on ARM .

Can a sink write data directly to an another ALSA device

Hi,

I'm trying to stream directly to my USB DAC using Ravenna source and sink.
Is there any way to configure the Ravenna sink to write the data directly to another ALSA device (the USB DAC)? It looks like the IO parameter could exist for that reason?

Thanks!

disk space

question, maybe stupid.
Once compiled, the directory takes up about 260MB of disk space.
The question is:
Is there anything that takes up a lot of space that can be deleted?of unnecessary?

WebUI is white and dante controller does not detect anything

Hello

I am trying to test aes67-daemon on a raspberry pi 4 but I have two problems:

1- If I run the daemon with the production configuration file, the WebUI returns a blank page (the source is empty). But, whith a test configuration file (edited to use the ethernet interface), the WebUI works correctly.

2- Whatever the configuration file used, Dante Controller does not show this device.

I think I followed the commissioning steps precisely, I am not at all an expert on Linux, however I am used to Dante and therefore to the network in general.

Can you get me some help?

thank you so much

BUG: scheduling while atomic in mr_alsa_audio_pcm_hw_params and mr_alsa_audio_pcm_prepare callbacks

When I start the first playback or capture I get a "BUG: scheduling while atomic" assertion by the kernel from the MergingRavennaALSA module in the mr_alsa_audio_pcm_hw_params and mr_alsa_audio_pcm_prepare callbacks.

Ex:

[17729.096291] mr_alsa_audio_pcm_hw_params (enter): rate=44100 format=2 channels=2 period_size=48, nb_periods=1024
               , buffer_bytes=196608
[17729.096384] BUG: scheduling while atomic: speaker-test/925/0x00000002
[17729.102873] Modules linked in: MergingRavennaALSA(O)
[17729.102908] Preemption disabled at:
[17729.102917] [<  (null)>]   (null)
[17729.106431] CPU: 0 PID: 925 Comm: speaker-test Tainted: G           O    4.14.108+ #3
[17729.106437] Hardware name: Generic AM33XX (Flattened Device Tree)
[17729.106487] [<c0113028>] (unwind_backtrace) from [<c010d7e4>] (show_stack+0x20/0x24)
[17729.106504] [<c010d7e4>] (show_stack) from [<c0cc99cc>] (dump_stack+0x80/0x94)
[17729.106529] [<c0cc99cc>] (dump_stack) from [<c016e2e4>] (__schedule_bug+0xc8/0xd8)
[17729.106548] [<c016e2e4>] (__schedule_bug) from [<c0cdf970>] (__schedule+0x790/0xa18)
[17729.106561] [<c0cdf970>] (__schedule) from [<c0cdfc50>] (schedule+0x58/0xb8)
[17729.106577] [<c0cdfc50>] (schedule) from [<c0ce3dc8>] (schedule_timeout+0x1e4/0x498)
[17729.106689] [<c0ce3dc8>] (schedule_timeout) from [<bf04c2c8>] (send_msg_to_user_land+0x1c0/0x2c4 [MergingRavennaALSA])
[17729.106760] [<bf04c2c8>] (send_msg_to_user_land [MergingRavennaALSA]) from [<bf045364>] (CW_netlink_send_msg_to_user_land+0x18/0x1c [MergingRavennaALSA])
[17729.106817] [<bf045364>] (CW_netlink_send_msg_to_user_land [MergingRavennaALSA]) from [<bf0486f4>] (set_sample_rate+0x5c/0xd8 [MergingRavennaALSA])
[17729.106874] [<bf0486f4>] (set_sample_rate [MergingRavennaALSA]) from [<bf045cb4>] (mr_alsa_audio_pcm_hw_params+0x154/0x43c [MergingRavennaALSA])
[17729.106910] [<bf045cb4>] (mr_alsa_audio_pcm_hw_params [MergingRavennaALSA]) from [<c0ac0d78>] (snd_pcm_hw_params+0x178/0x3c0)
[17729.106925] [<c0ac0d78>] (snd_pcm_hw_params) from [<c0ac1ef4>] (snd_pcm_ioctl+0x270/0x13fc)
[17729.106939] [<c0ac1ef4>] (snd_pcm_ioctl) from [<c03134d8>] (do_vfs_ioctl+0x41c/0x93c)
[17729.106952] [<c03134d8>] (do_vfs_ioctl) from [<c0313a64>] (SyS_ioctl+0x6c/0x90)
[17729.106970] [<c0313a64>] (SyS_ioctl) from [<c0109080>] (ret_fast_syscall+0x0/0x54)
[17729.143673] ------------[ cut here ]------------
[17729.148742] WARNING: CPU: 0 PID: 925 at kernel/sched/core.c:3131 preempt_count_sub+0x9c/0xf0
[17729.159517] DEBUG_LOCKS_WARN_ON(val > preempt_count())
[17729.159627] Modules linked in: MergingRavennaALSA(O)
[17729.178958] CPU: 0 PID: 925 Comm: speaker-test Tainted: G        W  O    4.14.108+ #3
[17729.186839] Hardware name: Generic AM33XX (Flattened Device Tree)
[17729.193002] [<c0113028>] (unwind_backtrace) from [<c010d7e4>] (show_stack+0x20/0x24)
[17729.200791] [<c010d7e4>] (show_stack) from [<c0cc99cc>] (dump_stack+0x80/0x94)
[17729.208052] [<c0cc99cc>] (dump_stack) from [<c0140168>] (__warn+0xec/0x114)
[17729.215050] [<c0140168>] (__warn) from [<c01401e8>] (warn_slowpath_fmt+0x58/0x7c)
[17729.222581] [<c01401e8>] (warn_slowpath_fmt) from [<c016e074>] (preempt_count_sub+0x9c/0xf0)
[17729.231074] [<c016e074>] (preempt_count_sub) from [<c0ce5454>] (_raw_spin_unlock_irq+0x38/0x64)
[17729.239914] [<c0ce5454>] (_raw_spin_unlock_irq) from [<bf045e18>] (mr_alsa_audio_pcm_hw_params+0x2b8/0x43c [MergingRavennaALSA])
[17729.251568] [<bf045e18>] (mr_alsa_audio_pcm_hw_params [MergingRavennaALSA]) from [<c0ac0d78>] (snd_pcm_hw_params+0x178/0x3c0)
[17729.262932] [<c0ac0d78>] (snd_pcm_hw_params) from [<c0ac1ef4>] (snd_pcm_ioctl+0x270/0x13fc)
[17729.271328] [<c0ac1ef4>] (snd_pcm_ioctl) from [<c03134d8>] (do_vfs_ioctl+0x41c/0x93c)
[17729.279199] [<c03134d8>] (do_vfs_ioctl) from [<c0313a64>] (SyS_ioctl+0x6c/0x90)
[17729.286552] [<c0313a64>] (SyS_ioctl) from [<c0109080>] (ret_fast_syscall+0x0/0x54)
[17729.304368] ---[ end trace 8feb057485d1c590 ]---
[17729.309319] mr_alsa_audio_pcm_hw_params done: rate=44100 format=2 channels=2 period_size=48, nb_periods=1024
               , buffer_bytes=196608

The same happens if a start a playback or a capture causing a sample rate change.

Cannot view in Dante Controller

Hi,

I've modified the daemon.conf to include my ip and network interface, but Dante Controller cannot find my device after starting the daemon

{
  "http_port": 8080,
  "rtsp_port": 8854,
  "http_base_dir": "./webui/build",
  "log_severity": 8,
  "playout_delay": 0,
  "tic_frame_size_at_1fs": 192,
  "max_tic_frame_size": 1024,
  "sample_rate": 48000,
  "rtp_mcast_base": "239.1.0.1",
  "rtp_port": 5004,
  "ptp_domain": 0,
  "ptp_dscp": 48,
  "sap_interval": 30,
  "syslog_proto": "none",
  "syslog_server": "255.255.255.254:1234",
  "status_file": "./demo/status.json",
  "mdns_enabled": true,
  "interface_name": "enp11s0",
  "mac_addr": "a8:a1:59:18:f0:8c",
  "ip_addr": "192.168.0.10"
}

any tip?

Deamon compilation stops at utils.cpp.o

Compilation stops at
error: too few arguments to function ‘std::string httplib::detail::decode_url(const string&, bool)’

[ 80%] Building CXX object CMakeFiles/aes67-daemon.dir/utils.cpp.o
/home/audiolinux/Downloads/NEW/AUR/aes67-linux-daemon/src/aes67-linux-daemon/daemon/utils.cpp: In function ‘std::tuple<bool, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > parse_url(const string&)’:
/home/audiolinux/Downloads/NEW/AUR/aes67-linux-daemon/src/aes67-linux-daemon/daemon/utils.cpp:42:53: error: too few arguments to function ‘std::string httplib::detail::decode_url(const string&, bool)’
42 | std::string url = httplib::detail::decode_url(_url);
| ^
In file included from /home/audiolinux/Downloads/NEW/AUR/aes67-linux-daemon/src/aes67-linux-daemon/daemon/utils.hpp:26,
from /home/audiolinux/Downloads/NEW/AUR/aes67-linux-daemon/src/aes67-linux-daemon/daemon/utils.cpp:21:
/usr/include/httplib.h:2261:20: note: declared here
2261 | inline std::string decode_url(const std::string &s,
| ^~~~~~~~~~
make[2]: *** [CMakeFiles/aes67-daemon.dir/build.make:291: CMakeFiles/aes67-daemon.dir/utils.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:116: CMakeFiles/aes67-daemon.dir/all] Error 2
make: *** [Makefile:115: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...

Compiling error

I get this error when I try to compile the daemon

[ 65%] Building CXX object CMakeFiles/aes67-daemon.dir/rtsp_client.cpp.o
In file included from /tmp/aes67-linux-daemon/daemon/rtsp_client.cpp:20:
/tmp/aes67-linux-daemon/3rdparty/cpp-httplib/httplib.h: In member function ‘ssize_t httplib::Stream::write_format(const char*, const Args& ...) [with Args = {int, const char*}]’:
/tmp/aes67-linux-daemon/3rdparty/cpp-httplib/httplib.h:3488:42: warning: ‘buf’ may be used uninitialized [-Wmaybe-uninitialized]
 3488 |   auto sn = snprintf(buf.data(), buf.size() - 1, fmt, args...);
      |                                  ~~~~~~~~^~
In file included from /tmp/aes67-linux-daemon/3rdparty/cpp-httplib/httplib.h:182,
                 from /tmp/aes67-linux-daemon/daemon/rtsp_client.cpp:20:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/array:176:7: note: by argument 1 of type ‘const std::array<char, 2048>*’ to ‘constexpr std::array<_Tp, _Nm>::size_type std::array<_Tp, _Nm>::size() const [with _Tp = char; long unsigned int _Nm = 2048]’ declared here
  176 |       size() const noexcept { return _Nm; }
      |       ^~~~
In file included from /tmp/aes67-linux-daemon/daemon/rtsp_client.cpp:20:
/tmp/aes67-linux-daemon/3rdparty/cpp-httplib/httplib.h:3483:26: note: ‘buf’ declared here
 3483 |   std::array<char, 2048> buf;
      |                          ^~~
/tmp/aes67-linux-daemon/3rdparty/cpp-httplib/httplib.h: In member function ‘ssize_t httplib::Stream::write_format(const char*, const Args& ...) [with Args = {const char*, const char*}]’:
/tmp/aes67-linux-daemon/3rdparty/cpp-httplib/httplib.h:3488:42: warning: ‘buf’ may be used uninitialized [-Wmaybe-uninitialized]
 3488 |   auto sn = snprintf(buf.data(), buf.size() - 1, fmt, args...);
      |                                  ~~~~~~~~^~
In file included from /tmp/aes67-linux-daemon/3rdparty/cpp-httplib/httplib.h:182,
                 from /tmp/aes67-linux-daemon/daemon/rtsp_client.cpp:20:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/g++-v11/array:176:7: note: by argument 1 of type ‘const std::array<char, 2048>*’ to ‘constexpr std::array<_Tp, _Nm>::size_type std::array<_Tp, _Nm>::size() const [with _Tp = char; long unsigned int _Nm = 2048]’ declared here
  176 |       size() const noexcept { return _Nm; }
      |       ^~~~
In file included from /tmp/aes67-linux-daemon/daemon/rtsp_client.cpp:20:
/tmp/aes67-linux-daemon/3rdparty/cpp-httplib/httplib.h:3483:26: note: ‘buf’ declared here
 3483 |   std::array<char, 2048> buf;
      |                          ^~~
[ 70%] Building CXX object CMakeFiles/aes67-daemon.dir/mdns_client.cpp.o
In file included from /tmp/aes67-linux-daemon/daemon/mdns_client.cpp:25:
/tmp/aes67-linux-daemon/daemon/rtsp_client.hpp:60:22: error: ‘map’ in namespace ‘std’ does not name a template type
   60 |   inline static std::map<
      |                      ^~~
/tmp/aes67-linux-daemon/daemon/rtsp_client.hpp:1:1: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
  +++ |+#include <map>
    1 | //
make[2]: *** [CMakeFiles/aes67-daemon.dir/build.make:258: CMakeFiles/aes67-daemon.dir/mdns_client.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/aes67-daemon.dir/all] Error 2
make: *** [Makefile:101: all] Error 2

am i missing something on the system? or am i doing something wrong?

No sound using dshare in asound.conf

Hi Andrea,
I'm trying to use aes67-linux-daemon to send multiple audio channels from different applications to a sink.
this is my /etc/asound.conf:

pcm.1LR {
	type dshare
	ipc_key 1234
	ipc_key_add_uid 1
	slave {
		pcm "hw:0" # card onboard
		period_time 0
		period_size 1024
		buffer_size 4096
		rate 48000
		channels 2
	}
	bindings {
		0 0
		1 1
	}
}

pcm.1L {
	type dshare
	ipc_key 1234
	ipc_key_add_uid 1
	slave {
		pcm "hw:0" # card onboard
		period_time 0
		period_size 1024
		buffer_size 4096
		rate 48000
		channels 2
	}
	bindings {
		0 0
		1 0
	}
}

pcm.1R {
	type dshare
	ipc_key 1234
	ipc_key_add_uid 1
	slave {
		pcm "hw:0" # card onboard
		period_time 0
		period_size 1024
		buffer_size 4096
		rate 48000
		channels 2
	}
	bindings {
		0 1
		1 1
	}
}

pcm.2LR {
	type dshare
	ipc_key 1234
	ipc_key_add_uid 1
	slave {
		pcm "hw:2" # Merging ravenna
		period_time 0
		period_size 1024
		buffer_size 4096
		rate 48000
		channels 2
	}
	bindings {
		0 0
		1 1
	}
}

pcm.2L {
	type dshare
	ipc_key 1234
	ipc_key_add_uid 1
	slave {
		pcm "hw:2" # Merging ravenna
		period_time 0
		period_size 1024
		buffer_size 4096
		rate 48000
		channels 2
	}
	bindings {
		0 0
		1 0
	}
}

pcm.2R {
	type dshare
	ipc_key 1234
	ipc_key_add_uid 1
	slave {
		pcm "hw:2" # Merging ravenna
		period_time 0
		period_size 1024
		buffer_size 4096
		rate 48000
		channels 2
	}
	bindings {
		0 1
		1 1
		
	}
}

With this, I can run

aplay file1.wav -D1L &
aplay file2.wav -D1R

and hear the 2 files on 2 separate channels with my on board card, but if I try

aplay file1.wav -D2L &
aplay file2.wav -D2R

I see no errors but no sound in the sink.
If I run

aplay file1.wav -Dhw:2

I can hear the sound perfectly on the sink.

Can you suggest me other test?

Thank you a lot for this very nice and useful project

Cheers

Guido

Sound extremely distorted and crackling

Hello,
first thanks for the great project, it took us just a couple hours to connect our linux computer to Dante hardware (in our case an Allen & Heath dLive S7000). The linux computer acts as a source which plays back into two channels of the A&H for now.

However, the sound is fairly distorted: here is a recording of what we hear when running

$ speaker-test -F S32_LE -D plughw:RAVENNA -r 48000 -c 2 -t sine
$ speaker-test -F S32_LE -D plughw:RAVENNA -r 48000 -c 2 -t pink

recorded.zip

Here is the config:

{
  "http_port": 8080,
  "rtsp_port": 8854,
  "http_base_dir": "./webui/build",
  "log_severity": 3,
  "playout_delay": 0,
  "tic_frame_size_at_1fs": 48,
  "max_tic_frame_size": 1024,
  "sample_rate": 48000,
  "rtp_mcast_base": "239.69.0.1",
  "rtp_port": 5004,
  "ptp_domain": 0,
  "ptp_dscp": 48,
  "sap_mcast_addr": "239.255.255.255",
  "sap_interval": 30,
  "syslog_proto": "none",
  "syslog_server": "255.255.255.254:1234",
  "status_file": "./demo/status.json",
  "interface_name": "enp61s0",
  "mdns_enabled": true,
  "mac_addr": "00:00:00:00:00:00",
  "ip_addr": "169.254.13.210",
  "node_id": "AES67 daemon 007f0100"
}

and the status:

{
  "sources": [
  {
    "id": 0,
    "enabled": true,
    "name": "ALSA Source 0",
    "io": "Audio Device",
    "max_samples_per_packet": 48,
    "codec": "L24",
    "ttl": 15,
    "payload_type": 98,
    "dscp": 46,
    "refclk_ptp_traceable": false,
    "map": [ 0, 1 ]
  }  ],
  "sinks": [  ]
}

we don't know what to tweak to make it work :(

thanks !

Sink not showing up in Dante Controller

Hi,

im running the daemon on a raspberry pi with one sink and one source (each with 2 channels) configured. ptp4l is running on another system as PTP grandmaster, which the daemon detects (showing "locked" as state). Adding the source worked flawlessly. However when I add the sink with the default sdp source (the raspberrypi itself) the daemon responds with a 400. When I try to add the exact same sap file manually it work though (This problem only occurs on the raspberrypi and not on my local machine).
Now: The source shows up in Dante Controller with no problems, but the sink device is missing.
What am I doing wrong?
Thanks for this amazing project!

Edit:
Okay maybe im missing something. When Im running two daemons each on a different machine and configure the sink of the one instance with the sap file from the other (via sdp) it works (audio is crackling a lot in both directions, but it works). Is this the intended use?

Unicast Support Possible?

I'd love to start testing this in a studio environment currently running a medium-sized Dante network but which is completely unicast. I can't use multicast in this environment due to constraints outside of my control.

Therefore I'm curious if you have plans for supporting unicast in addition to multicast. I'm not sure if the kernel module this is built upon requires multicast only.

Is it needed to run ptp by yourself

Maybe i am missing something here, i started the daemon and configured one device as the source and the other as a sink. So long everything fine. But the PTP tabs stays by Mode=Slave, Status=Unlocked and GMID = 00-00-... Do i need to run the ptp4l on the sink or the source host?

Question about ptp

Is necessari execute a ptp4l as slave only mode if a PTP master device is running on the network?

DANTE AVIO USB cannot playback daemon source L24@48Khz 2/8 channels with 1ms frame size

Dante AVIO USB cannot playback a daemon source configured with the following parameters:
Daemon parameters:

  "tic_frame_size_at_1fs": 192
  "max_tic_frame_size": 1024
  "sample_rate": 48000

Source parameters:

  "max_samples_per_packet": 48
  "codec": "L24"

The SDP for this source is reported below:

v=0
o=- 0 0 IN IP4 192.168.1.100
s=ALSA Source 0
c=IN IP4 239.69.0.1/15
t=0 0
a=clock-domain:PTPv2 0
m=audio 5004 RTP/AVP 98
c=IN IP4 239.69.0.1/15
a=rtpmap:98 L24/48000/2
a=sync-time:0
a=framecount:48
a=ptime:1
a=mediaclk:direct=0
a=ts-refclk:ptp=IEEE1588-2008:00-1D-C1-FF-FE-50-36-33:0
a=recvonly

Attempt to record this source using Dante AVIO USB results in a corrupted/distorted audio.
Besides this the DANTE AVIO USB reports the following latency measurement:
AVIO_Sink_Latency_4msec
it looks like the problem is related to the RTP stream latency that exceeds the maximum allowed for this configuration.

Building for multiple kernels on the Raspberry Pi

Hello... this is not an issue, but I didn't know how else to offer feedback and suggestions.

I'm using your wonderful program on my Raspberry Pis, and it's great, but I have 4 Pis (a 2B, 3B, 3B+ and 4B) and I didn't want to be building the kernel driver on each one... so I made a little modification to build all available kernels on the 4B (I can then just copy the appropriate driver to each other Pi).

I thought this may be useful to other people, so I thought I'd post it as an issue and let you decide what to do with it.

First, I made a modified version of the ubuntu-packages.sh called rpi-packages.sh to specifically install the Raspberry Pi kernel headers (because it's a little different than most linux distros).

Then I made a modified version of the driver's Makefile (3rdparty/ravenna-alsa-lkm/driver/Makefile) that allows the kernel version to be passed in as a parameter.

Because I could not figure out how to patch the git stuff properly I put it in a file named "3rdparty_ravenna-alsa-lkm_driver_Makefile" and I'll replace the original Makefile with it in the "build.sh" script.

Finally, I modified the "build.sh" script by removing the "make" command for the driver, and replacing it with a for loop that figures out which kernel headers the Pi has installed and can do a make for, then it does it for each, renaming the the resulting kernel driver appropriately. Finally it builds the "MergingRavennaALSA.ko for the machine we're on so the rest of the stuff works as expected.

I then put these three files in the aes67-linux-daemon folder after cloning from git and build as normal.
When it's complete I get the MergingRavennaALSA.ko file as expected, but I also get additional files ending in _x.y.x for each of the kernel versions on the Pi. I can then look at each of my Pis with 'uname -r' and decide which one to use on which Pi.

I hope thid helps someone.
I'm attaching all three files in case anyone wants to do this as well.
build-for-rpi-multikernel.zip

Thank you again for the amazing program!

AES67 Daemon sources are not handled properly by Audinate Dante Controller

Dante Controller is currently able to succefully show the AES67 daemon Sources announced via SAP. Despite this when trying to connect a daemon channel to a receiver via the Dante Controller Routing dialog the green connection icon doesn't show up and a prohibition icon is shown instead.

See image below:

dante_controller_routing

In the image note the prohibition icons when connecting the daemon channels 1-8 to a Yamaha MRX7 device channels 1-8.
The image also shows how instead a successful connection of a Dante AVIO AI2 device (channels 1-2) to the same MRX7 device (channels 9-10) shows up in the Routing configuration dialog.

In addition to this the Dante Controller is not updating properly the daemon announced sources in the Routing dialog in case these get updated or deleted.

Despite the problems reported above the RTP audio flow is working as expected.

Compatibility with DAW tools

I am attempting to use the aes67 daemon with a Yamaha Dante interface in AES67 mode, and while the run_test.sh script passed with an "OK" result and 0 status, when I run the daemon with a conf file I created with what I think should be appropriate parameters, I get no announcements from the daemon detected by another machine running the rav2sap application (even though on stdout I see "session_manager:: next SAP announcements in 30 secs" messages), and when I attempt to connect to the webui I get a blank page (not a no connection response from the browser, so I think the machine running the daemon responded at port 8080, but when I view source of the page there are 0 characters).

I think that either my configuration file for the daemon is incorrect, or there is another step to point the daemon to the webui files that I did not perform, but I have trouble finding the error just from inspecting the run_test.sh script and reading the README.md file. A "Getting Started" type guide for beginners, or a step by step checklist of all the required parameters for creating the daemon configuration file would be very helpful. For example I see that the run_test.sh script seems to touch the daemon status file. I thought the status file should be created by the daemon on startup, is there some configuration required to be added to that file, and not just the daemon configuration file? I see in the current status.json file created that it contains only:
{
"sources": [ ],
"sinks": [ ]
}

I would be willing to help create such a file, although I am not very familiar with using github to submit a pull request, so I would need some time to make sure I can submit a pull request properly for just that new file.
Or perhaps enabling the github wiki for the project would be a way to accomplish the same goal.

Multiple daemon instances on docker

Hey, I am trying to run multiple instances of the aes67 daemon using docker containers, so I can have multiple inputs on the same machine and avoid having multiple virtual machines.

I am not sure it's actually possible because here we are playing with a kernel module and docker container don't have full access to those but almost.

What I did so far, is build and load the kernel on the host then use the privileged option on the container to have access to the kernel module, this seems to work but then I am getting a connection refused error, apparently coming from the network ?
The container get its own IP and 2 interfaces eth0 and lo so I thought it could have worked but maybe I am missing something.

Here are the logs when starting the container using the ./run_test.sh script, I tried different configurations, using the eth0 interface instead of loopback but same result.

❯ docker run -it --privileged --cap-add=all -v /lib/modules:/lib/modules aes-daemon
Compiling tools ...
g++    -c -o check.o check.cc
g++   check.o   -o check
g++    -c -o createtest.o createtest.cc
g++   createtest.o   -o createtest
Creating test file ...
test file created
Creating configuration files ..
net.ipv4.igmp_max_memberships = 66
Starting PTP master ...
Starting AES67 daemon ...
Waiting for PTP slave to sync ...
[2021-03-31 13:55:49.100925] [0x00007ff299902600] [debug]   main:: initializing daemon
[2021-03-31 13:55:49.101064] [0x00007ff299902600] [debug]   driver_handler:: sending command code 20 data len 0
[2021-03-31 13:55:49.101254] [0x00007ff299902600] [fatal]   main:: fatal exception error: send_to: Connection refused
[2021-03-31 13:55:49.101268] [0x00007ff299902600] [info]    main:: end
daemon exiting with code: 1

Any ideas if its even possible and where would the error connection refused be coming from?

Thanks

Usage

Great project. However I don't understand how can I play and receive a stream over the network. Currently what I'am trying:
A PC with ptp master running + 2 RPis with aes67-deamon.
I can connect to the WebUIs and add sinks for the second device. I can see that PTP is working and both RPis are locked to the master. However after i alsarecord on one RPi and speaker-test on the second one (like in the demo) all I get is silence if I try to play the recorded file back. Could you help me understand how to configure this?

I can add a small writeup to the README on confguration after, so that the next person has an easier job.

Access to more than sink / source 0

How can I access other sinks or sources other than ID 0, e.g. source with ID 1 with command-line utilities like aplayer, arecord or mpg123?
I tried mapping the "channels" of the hw:RAVENNA card in /etc/asound.conf. However, in the case of a source, all sources just output to the ip-address of sink 0 or they stay silent. In the web ui of AES67 Daemon, I configured the sources to use ALSA output 1>2, ALSA output 3>4,... (for 2 channel audio). Am I working in the right direction?

This is my /etc/asound.conf:

pcm.network {
   type hw
   card 0
}

ctl.network {
   type hw
   card 0
}


pcm.dev01 {
   type plug
   slave {
      pcm "network"
      channels 2
   }
   ttable.0.0 1
   ttable.1.1 1
}

pcm.dev02 {
   type plug
   slave {
      pcm "network"
      channels 2
   }
   ttable.0.2 1
   ttable.1.3 1
}

Changing Sampling Rate doesn't affect outgoing SDP

Firstly. This is super cool and very useful. Well done on a nice piece of work.

I found that changing the sampling rate on the UI. Doesn't affect the outgoing SDP. which is always stuck at 44100Hz. I only want to use 48kHz so I changed the initial sample rate at config.hpp:113 and this seemed to fix it. I realise this is just a workaround. I did change daemon.conf to use 48000 as well. I will repost if I find the root cause.

Incorrect SAP packets TTL + patch

Dear all,
The SAP udp packets are sent with ttl=1, which is usable for PC - cross-cable - PC only.

According to RFC2974, sap ttl should be 255, so here is a small patch;

Regards,
👍

Test failing sound card not available?

Hey, trying to build a card sound using your scripts but I am getting an error when running the test script.

I am running on Ubuntu 18.04, I ran the previous command as is:

./ubuntu_packages.sh
./build.sh
./run_test.sh S24_3LE 48000 2 5
Compiling tools ...
make: Nothing to be done for 'all'.
Creating test file ...
test file created
Creating configuration files ..
net.ipv4.igmp_max_memberships = 66
Starting PTP master ...
Starting AES67 daemon ...
Waiting for PTP slave to sync ...
Starting to record 300 sec from sink ...
ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
arecord: main:788: audio open error: No such device
Starting to playback test on source ...
Recording failed
Test result:
cannot open file
Terminating processes ...
daemon exiting with code: 0

If i check my sound devices I can see the new ones, not sure whats happening:

❯ sudo aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
surround21:CARD=Generic
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
default:CARD=RAVENNA
    Merging RAVENNA, Merging RAVENNA
    Default Audio Device
sysdefault:CARD=RAVENNA
    Merging RAVENNA, Merging RAVENNA
    Default Audio Device
dmix:CARD=RAVENNA,DEV=0
    Merging RAVENNA, Merging RAVENNA
    Direct sample mixing device
dsnoop:CARD=RAVENNA,DEV=0
    Merging RAVENNA, Merging RAVENNA
    Direct sample snooping device
hw:CARD=RAVENNA,DEV=0
    Merging RAVENNA, Merging RAVENNA
    Direct hardware device without any conversions
plughw:CARD=RAVENNA,DEV=0
    Merging RAVENNA, Merging RAVENNA
    Hardware device with all software conversions

Let me know if you need more information.

Not sure where sample rate is coming from...

I'm sorry to ask something that is probably foolish, but I'm hoping you can help me.
I'm on a Raspberry Pi and have most everything working... but the sample rate appears to be reported based on audio in?
Is that what's happening?

When I create the source I set the following:
Max samples per packet to 48 - 1ms
Codec L24
Payload Type 98
TTL 14
DSCP 34 (AF41)
RefClk PTP traceable unchecked
Channels 2
Audio Channels map ALSA Output 1 ->ALSA Output 2

If I play a 48000 wav, I get the SAP saying 48000... if I play a 44100 wav I get the SAP saying 44100, regardless of output settings. Is the driver deducing the sample rate? Is there a way for me to force a specific sample rate regardless of input? I'd like to force 48000 to ensure AES67 compatibility even if the source is not truly 48000 or if there's no source at the moment.

Finally, I'm sorry to asking this here as an issue. I know it's really not, I just couldn't figure out how to ask a question.

Rpi

Pardon my ignorance, but will this work on a raspberry pi running Raspberry PI OS?

build fail : missing system_error

Hi there.
I'm unable to build on Ubuntu 18.04 ( ubuntu studio low latency + KX studio repos)

[  5%] Building CXX object CMakeFiles/aes67-daemon.dir/error_code.cpp.o
In file included from /home/studio/Bureau/aes67-linux-daemon/daemon/error_code.cpp:20:
/home/studio/Bureau/aes67-linux-daemon/daemon/error_code.hpp:23:10: fatal error: 'system_error' file not found
#include <system_error>
         ^~~~~~~~~~~~~~
1 error generated.
CMakeFiles/aes67-daemon.dir/build.make:62: recipe for target 'CMakeFiles/aes67-daemon.dir/error_code.cpp.o' failed
make[2]: *** [CMakeFiles/aes67-daemon.dir/error_code.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/aes67-daemon.dir/all' failed
make[1]: *** [CMakeFiles/aes67-daemon.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

I've used ubuntu-packages.sh, so dependencies should be ok.

cannot create more than 8 sources or 8 sinks using the WebUI

I hit a problem trying to receive the 10 channel stream that I was receiving before.
I get the following error from the driver:

CManager::get_live_in_jitter_buffer() failed: retrieving channel #9 buffer jitter buffer

I can receive 8 channels or less but the sink creation fails with the following error if I try receiving 9 or 10 channels.
Same happens when creating more than 8 sources.

Daemon fails to parse AVIO SDP file

Hi Andrea,
I'm trying to receive a stream from an Audinate Dante AVIO USB with the Daemon, but it fails.
After creating the Multicast flow with the Dante Controller, I can see it on the Browser page of the daemon, this is its info:

v=0
o=- 1415370 1415370 IN IP4 192.168.1.81
s=AVIOUSB-503633 : 2
c=IN IP4 239.69.251.175/32
t=0 0
a=keywds:Dante
m=audio 5004 RTP/AVP 97
i=2 channels: Left Right
a=recvonly
a=rtpmap:97 L24/48000/2
a=ptime:1
a=ts-refclk:ptp=IEEE1588-2008:00-1D-C1-FF-FE-50-36-33:0
a=mediaclk:direct=2911906980

but when I try to add it as a sink, I receive an HTTP 400 error.

Please tell me if you need more info or tests

Thank you for your really nice work

Guido

pre-build webui

Building the webui on a BeagleBone takes quite long ...

So I had the idea of opening a PR and adding a github CI job that builds and releases the webui as some .zip etc.
This would allow to update the build.sh script and replace the complete webui building with hopefully a simple wget 😉

What do you think about this idea?

WebGUI not working - returns blank page

First of all, thanks for the good work on this project.

I have this running on a Mac mini with Lubuntu 18.04 LTS and:
Dependencies installed ok.
It compiled ok.
I do not have PulseAudio installed.
The Daemon test passes 100%.

However the webGUI doesn't seem to be working.

The run_demo.sh produces this output:

net.ipv4.igmp_max_memberships = 66 Starting PTP master ... Opening in existing browser session. Waiting for PTP slave to sync ... [0722/120419.634330:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox! Most likely you need to configure your SUID sandbox correctly [1517:1517:0100/000000.732448:ERROR:broker_posix.cc(43)] Invalid node channel message [1524:1524:0722/120419.766176:ERROR:broker_posix.cc(43)] Invalid node channel message [2020-07-22 12:04:19.832611] [0x00007f999d7fa700] [error] http_server:: GET /favicon.ico response 404 Starting to record 60 secs from sink ... Starting to playback test on source ... Recording to file "demo/sink_test.wav" successfull Terminating processes ... daemon exiting with code: 0

I was getting favicon error in Google Chrome browser as it could not find the file. I removed the favicon line line from index.html to see if it made a difference - the error went away but I just get a blank page.
I have a MacBook running ANEMAN audio config software and the Mac mini shows up, but has no audio source/sink. I guess because I can't get the the webGUI to set them up. The Daemon log does show a GET / response 200, so Guess it tries to send a page. I have tried the webGUI locally and from another computer/browser and the result is the same.

The daemon seems to start ok: The output is below:

./aes67-daemon -c daemon.conf [2020-07-22 10:50:51.117645] [0x00007fad142ef600] [info] driver_manager:: cmd Hello done data len 0 [2020-07-22 10:50:51.117827] [0x00007fad142ef600] [info] driver_manager:: cmd Start done data len 0 [2020-07-22 10:50:51.117933] [0x00007fad142ef600] [info] driver_manager:: cmd Reset done data len 0 [2020-07-22 10:50:51.117953] [0x00007fad142ef600] [info] driver_manager:: setting interface enp1s0 [2020-07-22 10:50:51.118018] [0x00007fad142ef600] [info] driver_manager:: cmd SetInterfaceName done data len 0 [2020-07-22 10:50:51.118049] [0x00007fad142ef600] [info] driver_manager:: setting PTP Domain 0 DSCP 48 [2020-07-22 10:50:51.118113] [0x00007fad142ef600] [info] driver_manager:: cmd SetPTPConfig done data len 0 [2020-07-22 10:50:51.118209] [0x00007fad142ef600] [info] driver_manager:: cmd SetTICFrameSizeAt1FS done data len 0 [2020-07-22 10:50:51.118278] [0x00007fad142ef600] [info] driver_manager:: cmd SetPlayoutDelay done data len 0 [2020-07-22 10:50:51.118368] [0x00007fad142ef600] [info] driver_manager:: cmd SetMaxTICFrameSize done data len 0 [2020-07-22 10:50:51.119682] [0x00007fad0d7de700] [info] igmp:: joined multicast group 224.0.1.129 on 192.168.2.18 [2020-07-22 10:50:51.119831] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPConfig done data len 2 [2020-07-22 10:50:51.119899] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPStatus done data len 16 [2020-07-22 10:50:51.119936] [0x00007fad0d7de700] [info] session_manager:: new PTP clock status unlocked [2020-07-22 10:50:51.131086] [0x00007fad142ef600] [info] mdns_server:: adding service _http._tcp for AES67 daemon a8c01202 [2020-07-22 10:50:51.132333] [0x00007fad142ef600] [info] mdns_server:: adding service _rtsp._tcp for AES67 daemon a8c01202 [2020-07-22 10:50:51.137438] [0x00007facff7fe700] [info] mdns_client:: (Browser) NEW: service CoreAudio (on ians-macbook-pro)_11 of type _rtsp._tcp in domain local [2020-07-22 10:50:51.141131] [0x00007facfeffd700] [info] igmp:: joined multicast group 239.255.255.255 on 192.168.2.18 [2020-07-22 10:50:51.148011] [0x00007facf6ffd700] [info] http_server:: GET /api/config response 200 [2020-07-22 10:50:51.243240] [0x00007facf57fa700] [info] rtsp_client:: completed rtsp://192.168.2.11:9090/by-name/CoreAudio (on ians-macbook-pro)_11 [2020-07-22 10:50:51.243324] [0x00007facf57fa700] [info] browser:: adding RTSP source rtsp:480e name CoreAudio (on ians-macbook-pro)_11 domain local [2020-07-22 10:50:52.120134] [0x00007fad0d7de700] [info] session_manager:: next SAP announcements in 30 secs [2020-07-22 10:51:01.121303] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPConfig done data len 2 [2020-07-22 10:51:01.121422] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPStatus done data len 16 [2020-07-22 10:51:11.122674] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPConfig done data len 2 [2020-07-22 10:51:11.122825] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPStatus done data len 16 [2020-07-22 10:51:21.124251] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPConfig done data len 2 [2020-07-22 10:51:21.124365] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPStatus done data len 16 [2020-07-22 10:51:21.545899] [0x00007fad0dfdf700] [info] driver_manager:: event GetMasterOutputVolume -20 [2020-07-22 10:51:21.546151] [0x00007fad0dfdf700] [info] driver_manager:: event GetMasterOutputSwitch 0 [2020-07-22 10:51:21.547388] [0x00007fad0dfdf700] [info] driver_manager:: event SetSampleRate 48000 [2020-07-22 10:51:22.124600] [0x00007fad0d7de700] [info] session_manager:: next SAP announcements in 30 secs [2020-07-22 10:51:31.125790] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPConfig done data len 2 [2020-07-22 10:51:31.125938] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPStatus done data len 16 [2020-07-22 10:51:41.127207] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPConfig done data len 2 [2020-07-22 10:51:41.127353] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPStatus done data len 16 [2020-07-22 10:51:51.128678] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPConfig done data len 2 [2020-07-22 10:51:51.128824] [0x00007fad0d7de700] [info] driver_manager:: cmd GetPTPStatus done data len 16 [2020-07-22 10:51:52.129061] [0x00007fad0d7de700] [info] session_manager:: next SAP announcements in 30 secs

Compilation error on 5.4.19-rt11 realtime kernel

Trying to compile on 5.4.19-rt11 realtime kernel on archlinux:
gcc version 9.2.1+20200130-2
I have an error about undefined named operand ‘new’

make -C /lib/modules/5.4.19-rt11-1-rt/build/ M=/media/linux/Downloads/Temp/Ravenna/ravenna-alsa-lkm/driver modules
make[1]: Entering directory '/usr/lib/modules/5.4.19-rt11-1-rt/build'
CC [M] /media/linux/Downloads/Temp/Ravenna/ravenna-alsa-lkm/driver/c_wrapper_lib.o
In file included from ./include/linux/atomic.h:7,
from ./include/linux/jump_label.h:249,
from ./arch/x86/include/asm/string_64.h:6,
from ./arch/x86/include/asm/string.h:5,
from ./include/linux/string.h:20,
from /media/linux/Downloads/Temp/Ravenna/ravenna-alsa-lkm/driver/MTAL_stdint.h:68,
from /media/linux/Downloads/Temp/Ravenna/ravenna-alsa-lkm/driver/c_wrapper_lib.h:35,
from /media/linux/Downloads/Temp/Ravenna/ravenna-alsa-lkm/driver/c_wrapper_lib.c:32:
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_try_cmpxchg’:
./arch/x86/include/asm/atomic.h:200:2: error: undefined named operand ‘new’
200 | return try_cmpxchg(&v->counter, old, new);
| ^~~~~~
./arch/x86/include/asm/atomic.h:200:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic.h:200:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic.h:200:2: error: undefined named operand ‘new’
In file included from ./arch/x86/include/asm/atomic.h:262,
from ./include/linux/atomic.h:7,
from ./include/linux/jump_label.h:249,
from ./arch/x86/include/asm/string_64.h:6,
from ./arch/x86/include/asm/string.h:5,
from ./include/linux/string.h:20,
from /media/linux/Downloads/Temp/Ravenna/ravenna-alsa-lkm/driver/MTAL_stdint.h:68,
from /media/linux/Downloads/Temp/Ravenna/ravenna-alsa-lkm/driver/c_wrapper_lib.h:35,
from /media/linux/Downloads/Temp/Ravenna/ravenna-alsa-lkm/driver/c_wrapper_lib.c:32:
./arch/x86/include/asm/atomic64_64.h: In function ‘arch_atomic64_try_cmpxchg’:
./arch/x86/include/asm/atomic64_64.h:186:2: error: undefined named operand ‘new’
186 | return try_cmpxchg(&v->counter, old, new);
| ^~~~~~
./arch/x86/include/asm/atomic64_64.h:186:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic64_64.h:186:2: error: undefined named operand ‘new’
./arch/x86/include/asm/atomic64_64.h:186:2: error: undefined named operand ‘new’
make[2]: *** [scripts/Makefile.build:266: /media/linux/Downloads/Temp/Ravenna/ravenna-alsa-lkm/driver/c_wrapper_lib.o] Error 1
make[1]: *** [Makefile:1652: /media/linux/Downloads/Temp/Ravenna/ravenna-alsa-lkm/driver] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.4.19-rt11-1-rt/build'
make: *** [Makefile:14: modules] Error 2

compatible devices

Is there a list of compatible devices, i.e. tested and working with aes67 daemon?

During simultaneous playback and record on RAVENNA ALSA device if recording gets stopped playback gets interrupted and vice versa

AES67 daemon PTP clock is locked and independent Source and Sink are properly configured (L24 @ 48Khz stereo for this example).
If I start a playback on the RAVENNA device with for example:
speaker-test -D plughw:RAVENNA -r 48000 -c 2 -t sine
and at the same time I start a recording on the RAVENNA device with:
arecord -D plughw:RAVENNA -c 2 -f S24_3LE -d 30 -r 48000 -t wav sink.wav

Both playback and recording work properly but when the recording terminates or it gets interrupted the playback is interrupted too with the following error:

Write error: -5,Input/output error
xrun_recovery failed: -5,Input/output error
Transfer failed: Input/output error

Version Information

Hi,

Do you think you could add a command line parameter to print a version number and exit... something like -v or --version?
That way we could compare versions to know if we're running an obsolete version of the daemon?

Also, I don't know if this is possible, but maybe you could also patch the kernel driver to indicate the version of the daemon it's supposed to be run against? Currently modinfo returns a version of 0.2 (which I assume is the Merging Tech version number). Since you're modifying it with patches, maybe it could say 0.2-x.x.x (where x.x.x is the daemon version) or something?

Hardly essential, but would be helpful to track versions running.

Thanks again for the great project!

Alexa

module_timer.c: patch does not apply

I have this problem:

Apply patches to ravenna-alsa-lkm module ...
error: patch failed: driver/module_timer.c:35
error: driver/module_timer.c: patch does not apply

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.