Project
Name: Radio
People: hark
Description: audio networking
Radio
audio over ip / dsp etc.
hardware
Hardware suitable to build computerised fx rack / speaker processor / etc.
ffado
- there is 3 broken ffado cards (8x8 + 8x8 + 4x6) in lag, they should be fixed
emu10k
This chip is in soundblaster audigy cards, usually the cards have 6 analog outputs and some inputs For those unfamiliar with kX ASIO, this consists of 16 capture and 16 playback channels. With a post 2.6.9 Linux kernel, latencies down to 64 (1.33 ms) or even 32 (0.66ms) frames should work well. * http://alsa.cybermirror.org/manuals/creative/audigy2-pins.txt * https://www.kernel.org/doc/html/latest/sound/cards/emu10k1-jack.html * jackd -R -dalsa -r48000 -p64 -n2 -D -Chw:Audigy,2 -Phw:Audigy,3 -S gives you <5ms roundtrip
bela / beast (beagle bone black low latency audio)
https://github.com/BelaPlatform
freedsp
- http://www.freedsp.cc/
aurora
- https://www.kickstarter.com/projects/auverdion/freedsp-aurora-dsp?ref=discovery&term=aurora 195,- assembled 10,- pcb ??,- parts
infinitas
- 32x32 usb audio if/dsp https://www.tindie.com/products/auverdion/freedsp-infinitas/ ~100 in parts / pcb
- https://www.tindie.com/products/auverdion/freedspx-analogio-x8/ ~ 100 in parts/pcb So, complete 32x32 is 500 in parts
dsp software
- ecasound http://audio.claub.net/software/LADSPA/Implementing%20Crossovers%20Using%20Ecasound%20and%20LADSPA.txt
- https://www.ludd.ltu.se/~torger/files/almusvcu-doc-0.85.pdf
- https://rephase.org/
https://www.dropbox.com/s/10xdhh83jokzbxv/REW_rePhase_tuto.pdf?dl=0
jconvolver https://kokkinizita.linuxaudio.org/linuxaudio/
- https://github.com/greenm01/jcgui.git
- https://github.com/Tunetown/RoomMap.git
- https://github.com/greenm01/porc.git
sync
- http://research.microsoft.com/apps/pubs/default.aspx?id=65146
- https://github.com/snarfed/p4sync
- https://snarfed.org/libmsntp
- http://freenet-homepage.de/dl4yhf/spectra1.html
- https://datatracker.ietf.org/wg/tictoc/documents/
- IEEE 1588 Precision Time Protocol (PTP)
- https://linux-audio-dev.linuxaudio.narkive.com/pjSeWsQY/lad-aoip-question
audio network software
free software
- network audio sync https://github.com/blaa/WaveSync
- https://gavv.github.io/articles/new-network-transport/
- https://github.com/roc-project/roc (currently no jack support, but its on todo list)
- https://kokkinizita.linuxaudio.org/linuxaudio/ zita-njbridge
zita-njbridge seems best, has low latency, predictable latency, is stable, and works with jack, latency should be measured for each speaker and then corrected, but that has to only be done once
- https://en.wikipedia.org/wiki/Comparison_of_audio_network_protocols
protocols used in commercial world + free software implementations/stuff about how they work
airplay
- https://github.com/mikebrady/shairport-sync
aes67
ip/rtp audio transport based on ietf standards, most dante equipment can speak it rtp / mdns /sap / ptpv2 /
- http://forum.merging.com/viewforum.php?f=73
- (commercial )https://www.youraudiosystems.com/en/aes67-linux/
- (receive with rtpdump + sox) https://www.aelius.com/njh/posts/0002
- https://github.com/njh/mast
- https://www.collabora.com/news-and-blog/blog/2017/04/25/receiving-an-aes67-stream-with-gstreamer/
- jack -> aes67 https://github.com/markmcconnell/mai
- https://github.com/ndac-todoroki/esp32_aes67_sender
- pi audio monitor https://github.com/martim01/pam
- https://www.merging.com/products/aneman
- has aes67 support https://github.com/openbroadcaster/obplayer
- https://bitbucket.org/MergingTechnologies/ravenna-alsa-lkm/src/master/
- https://github.com/voc/aes67-recorder
ravenna
aes67 with some discovery stuff
- https://www.merging.com/products/alsa_ravenna_aes67_driver
madi / AES10
MADI supports serial digital transmission over coaxial cable or fibre-optic lines of 28, 56, or 32, 64 channels; and sampling rates of up to 192 kHz with an audio bit depth of up to 24 bits per channel. Like AES3 and ADAT Lightpipe, it is a unidirectional interface from one sender to one receiver.
l1: aes50
layer1 p2p multichannel audio over ethernet (does not support switches)
l1: rocknet
layer1
l1: A-net
layer1
l3: dante
proprietary ip based protocol
- focusrite rednet ,
- https://github.com/jsharkey/wycliffe
l2: cobranet
Ethernet based, supports switching
Developed in the 1990s, CobraNet is widely regarded as the first commercially successful implementation of audio over Ethernet. All CobraNet packets are identified with a unique Ethernet protocol identifier (0x8819) assigned to Cirrus Logic.
ultranet
- 2x aes3, not using ethernet
l3: q-lan
udp/ip A receiver will open a UDP port in the range 6511 to 6766 Q-Sys implements its own discovery protocol called QDP which uses multicast IP messaging on a dedicated registered address of 224.0.23.175 Q-LAN accomplishes clock distribution using the IEEE 1588 Precision time protocol (PTP). * https://www.qsc.com/resource-files/whitepapers/q_wp_sys_dn_qsys_qlan_networkredundancy.pdf
l3?: axia livewire
Livewire is an audio-over-IP system created by Axia Audio, a division of The Telos Alliance. Its primary purpose is routing and distributing broadcast-quality audio in radio stations.
- https://en.wikipedia.org/wiki/Livewire_(networking)
- https://github.com/kylophone/AXIA-LUFS
- https://github.com/kylophone/a-look-at-livewire
- https://github.com/kylophone/xplay
- https://github.com/ykmn/livewire-streamer
l2: AVB / tsn
- motu, apple airplay, automotive
- https://github.com/AVnu/OpenAvnu
- https://lwn.net/Articles/690998/
- https://elinux.org/images/5/56/ELC-2018-USA-TSNonLinux.pdf
- https://github.com/AVnu/OpenAvnu/tree/open-avb-next/lib/libavtp
- phc2sys
- https://github.com/intel/iotg_tsn_ref_sw
- there is an alsa driver that needs intel igb210 (or other card with tsn support)
- https://lac.linuxaudio.org/2019/doc/kuhr.pdf
- https://lac.linuxaudio.org/2019/doc/kuhr.pdf
- https://github.com/Drumfix/avb4linux
- https://github.com/L-Acoustics/avdecc
aes70 / open control architecture
The Open Control Architecture (OCA) is a communications protocol architecture for control, monitoring, and connection management of networked audio and video devices. Such networks are referred to as "media networks".
- ES67 control protocol
- https://github.com/DeutscheSoft/AES70.js
nmos
general linux audio stuff
languages
- http://chuck.cs.princeton.edu/
recorder
- https://www.aelius.com/njh/rotter/
plugin hosts
- ardour
- carla
- mod-host https://github.com/moddevices/mod-host https://github.com/moddevices/mod-ui
etc.
- https://github.com/raboof/realtimeconfigquickscan
- https://packages.debian.org/sid/rtirq-init
http://git.0pointer.net/rtkit.git/
https://github.com/onkelDead/ardmix
- https://openstagecontrol.ammd.net//
- https://github.com/jean-emmanuel/ardour-control
- low latency rpi kernel: https://www.raspberrypi.org/forums/viewtopic.php?t=250927
irqbalance, rtirq, some kernel boot options and maybe other tools may be used to optimize USB IRQ handling. This might be quite complex and still will be limited by the hardware configuration.
https://lists.linuxaudio.org/archives/linux-audio-user/2019-September/112221.html
"you can work around some of these TSC shortcomings by configuring additional kernel boot parameters. For instance, the idle=poll parameter forces the clock to avoid entering the idle state, and the processor.max_cstate=1 parameter prevents the clock from entering deeper C-states. Note however that in both cases there would be an increase on energy consumption, as the system would always run at top speed." - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_for_real_time/7/html/reference_guide/chap-timestamping
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_for_real_time/7/html/reference_guide/chap-timestamping
to find: * stop pulse touching alsamixer
https://git.puscii.nl/sms/streaming-media-stuff/blob/master/aes67.txt
AES67 AES67 is a very flexible protocol for transmitting audio data via Ethernet (AoIP). The protocol uses PTP (precision time protocol) for synchronising. AES67 is used in the Ravenna Network but is also an independent protocol on its own. Unlike AES50 and AVB, AES67 is not limited to a specific medium, it can be transmitted through any IP-based medium. The transmission itself is isochronous, which means that a minimum bandwidth is provided. AES67 can also be used in mixed networks, the QoS (Quality of Service) is provided by DiffServ, which, unlike IntServ, classifies the packages, so that clock-, audio- and controlsignals can be prioritized differently. The maximum transmission distance depends on the medium. AES67 doesn’t need any special networks requirements. The maximum samplingrate is 96 kHz. AES67 uses five layers of the OSI model: IP on Layer 3, UDP on Layer 4 and RTP on Layer 5. RTP provides a flexible buffer, timestramps of the individual data packages as well as identification for the different data formats and streams. RTP does not provide a timely transmission in the right order and packages won’t be resent. AES67 features a low latency (less than 5 ms) and thus can be used in live audio situations. The maximum number of channels is dependent from the network architecture.
AES70: The Open Control Architecture (OCA) is a communications protocol architecture for control, monitoring, and connection management of networked audio and video devices. Such networks are referred to as "media networks". https://en.wikipedia.org/wiki/Open_Control_Architecture javascript implementation: https://github.com/DeutscheSoft/OCA.js/tree/master/
The standards: Are freely downloadable by AES (audio engineering society) members
AES70 (control) http://www.aes.org/publications/standards/search.cfm?docID=103
General info:
https://www.ravenna-network.com/aes67/demystifying-discovery/
https://www.ravenna-network.com/aes67/aes67-practical-guide-web-copy/
http://medianetworkingalliance.com/wp-content/uploads/2015/04/MNA_AES67_NAB2015_16_9.pdf
http://jack-audio.10948.n7.nabble.com/Jack-Devel-AES67-SMPTE-ST-2110-30-td19699.html
https://tech.ebu.ch/docs/events/opensource17/presentations/SMPTE2110-ffmpeg.pdf
https://support.dhd.audio/doku.php?id=aes67:sync
How to signal SDP:
ravenna: zeroconf and rtsp/http
dante: SAP
Standards + gstreamer implementations: IEEE 1588-2008 - IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems, IEEE https://gstreamer.freedesktop.org/documentation/application-development/advanced/clocks.html https://github.com/pexip/gstreamer/blob/master/tests/examples/ptp/ptp-print-times.c https://sdroege.github.io/rustdoc/gstreamer/gstreamer_net/struct.PtpClock.html https://en.wikipedia.org/wiki/Precision_Time_Protocol https://github.com/ptpd/ptpd.git http://code.centricular.com/ptp-clock-reflector/
RFC 3190 RTP Payload Format for 12-bit DAT Audio and 20- and 24-bit Linear Sampled Audio, IETF https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-rtpL24pay.html
RFC 3261 - SIP: Session Initiation Protocol, IETF
RFC 3264 - An Offer/Answer Model with the Session Description Protocol (SDP), IETF
RFC 3550 RTP: A Transport Protocol for Real-Time Applications, IETF
RFC 4566 Session Description Protocol, IETF
RFC 7273 RTP Clock Source Signalling, IETF https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--rfc7273-sync
Has some code: ffmpeg implementation: https://github.com/cbcrc/FFmpeg https://github.com/piense/aes67-SAP https://github.com/sfc-arch/esp32_aes67_receiver.git https://github.com/sfc-arch/esp32_aes67_sender https://github.com/markmcconnell/mai (talks with jack) https://github.com/dholroyd/trimsoul (gstreamer) https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstPtpClock.html https://github.com/GStreamer/gstreamer/tree/master/tests/examples/ptp https://archive.fosdem.org/2016/schedule/event/synchronised_gstreamer/attachments/slides/889/export/events/attachments/synchronised_gstreamer/slides/889/synchronised_multidevice_media_playback_with_GStreamer.pdf (on gst clocks) https://github.com/luisbg/synchronised_media_playback.git
No code but info: https://coaxion.net/blog/2017/04/rtp-for-broadcasting-over-ip-use-cases-in-gstreamer-ptp-rfc7273-for-ravenna-aes67-smpte-2022-smpte-2110/ https://github.com/SimonTait/alsa67 https://github.com/kylophone/xplay/blob/master/xplay.py (just pipes the multicast stream in a player) https://github.com/masche842/rs_sixty_seven
Windows / mac software for interop testing: Audio: https://www.ravenna-network.com/2013/09/13/free-version-of-ravenna-virtual-sound-card-for-windows-now-available-for-download/ (free, but registration) https://www.lawo.de/vsc.html (not sure, probably paid?) https://www.merging.com/products/aes67-vad-standard (free, but registration)
https://www.audinate.com/products/software/dante-virtual-soundcard
For avb: If you have a Windows machine you can use the ALC Windows virtual sound card if you have a supported Intel NIC with hardware timestamp support, or you can use the Lawo Windows virtual sound card which supports software timestamping and will work on any network card. I tried out the demo version of the Lawo card and was able to transfer audio from one Windows machine to another (using an external master clock created by transferring NTP time using linuxptp on a small linux machine). The demo version of the Lawo software only runs for 15 minutes at a time and has to be restarted. The paid version costs about 200 dollars/euros.
Discovery / management: https://www.audinate.com/content/dante-controller-v4105-windows https://www.qsc.com/resources/software-and-firmware/q-sys-designer-software/ https://portal.atterotech.com/downloads/Unify_Control_Panel/unIFYControlPanel_Setup_v3_2_1.exe
Network stuff: http://www.ieee802.org/1/pages/802.1as.html (not necassary, and probably only on very fancy switches) IGMP (not necassary, asuming there is enough bandwith to send all channels networkwide) DiffSRV https://en.wikipedia.org/wiki/Differentiated_services (not necassary, only to prioritise different traffic) stream reservation: https://1.ieee802.org/tsn/802-1qcc/ (not sure for what) intel I210 network card support hardware timestamping (for AVB)
AVB (some ethernet audio thingie): https://github.com/AVnu/OpenAvnu
irc
16:45 <+hark> so, just got a m-audio firewire 1814, started jack with alsa backend, -p2 -n256 (5ms), then was running jack_iodelay with input connected to output, it measures 28ms, is this specific to this card, or is it normal that the card adds 9ms? 16:49 <+rgareus> hark: jack2 with defualt async mode? so nominal roundtrip is 16ms (assuming 48kHz SR) 16:50 <+rgareus> 12ms systemic latency is a bit large, but not unrealistic 17:09 <+alexmitchell> rgareus: "had I known what I was in for, I'd not have started it :)" Life no? 17:10 <+alexmitchell> As in I feel like this most days. 17:26 <+hark> rgareus: ah, in synchronous mode with 48khz 22.65ms 17:27 <+hark> if i put higher samplerate, it forces me to make the period size 512, is this some limitation of alsa driver, or is that specific to this hardware? 17:43 <+abbie> anything around 10 ms or less is good enough 17:43 <+abbie> but id like to hear it from rgareus too 17:49 <+hark> anyone knows what would be the systemic latency with a delta1010? 17:50 <+rgareus> hark: it's not a fixed value. 17:51 -!- nostar [~nostar@c-69-244-137-171.hsd1.mi.comcast.net] has joined #ardour 17:51 -!- mode/#ardour [+v nostar] by DasBot 17:52 <+rgareus> hark: it usually varies with kernel, mainboard, chipset, bus, and often is also dependent on the buffersize 17:53 <+las> rgareus: how would the kernel affect the systemic latency of a PCI device? 17:54 <+rgareus> las: pci latency and buffering in the driver 17:54 <+hark> rgareus: yes, that i get, but what's the minimum that could be gotten by choosing the right combination of hardware/ software 17:56 <+hark> seems that with this card, i am limited by the latency in the card, and alsa that does not let me make the buffers smaller 18:03 <+hark> is it possible to get <10ms roundtrip latency with any hardware? 18:04 <+rgareus> hark: maybe. I can't answer that question. 18:04 <+las> rgareus: i thought PCI latency was defined by standards 18:05 <+las> rgareus: and i didn't think that any device supported by ALSA (at least with mmap support) ever buffers 18:05 <+las> in the driver 18:08 <+rgareus> las: setpci -v -d : latency_timer=b0 18:10 <+rgareus> likely not significant here 18:12 <+FrnchFrgg> las: I thought snd_usb always buffered in the driver ? 18:13 <+rgareus> FrnchFrgg: yes 18:14 <+las> FrnchFrgg: that's why i mention "PCI" 18:14 <+FrnchFrgg> las: Oh, I thought the two sentences were disconnected. 18:31 <+hark> ah, with an audigy one 5.7 roundtrip works 18:36 <+las> rgareus: i don't think that the PCI latency time affects "latency". i may very well be wrong. i thought it controlled something more like how long the device could hold the bus. so it has more impact on DSP load than latency (it effectively steals or awards time to the process cycle)
https://access.redhat.com/sites/default/files/attachments/201501-perf-brief-low-latency-tuning-rhel7-v1.1.pdf
For the time being, this is a limitation common to all firewire audio kernel drivers. See alsa-devel thread "snd-fireworks requires larger period sizes than FFADO" from November to December 2015.
http://mailman.alsa-project.org/pipermail/alsa-devel/2015-November/100873.html http://mailman.alsa-project.org/pipermail/alsa-devel/2015-November/100899.html http://mailman.alsa-project.org/pipermail/alsa-devel/2015-December/101309.html http://mailman.alsa-project.org/pipermail/alsa-devel/2015-December/101326.html http://mailman.alsa-project.org/pipermail/alsa-devel/2015-December/101368.html
https://github.com/takaswie/alsa-firewire-report/blob/master/firewire.pdf
https://discourse.ardour.org/t/delay-compensation-effective-management-of-plugin-latencies-in-complex-mix-environments/79486/7 https://discourse.ardour.org/t/latency-compensation-for-busses/90075
http://jack-audio.10948.n7.nabble.com/JACK-netjack-and-remote-nodes-for-active-crossover-td20170.html
see also: netjack at LAG