# CobraNet

CobraNet is a combination of software, hardware, and network protocols designed to deliver uncompressed, multi-channel, low-latency digital audio over a standard Ethernet network. Developed in the 1990s, CobraNet is widely regarded as the first commercially successful audio-over-Ethernet implementation.
CobraNet was designed for and is primarily used in large commercial audio installations such as convention centers, stadiums, airports, theme parks, and concert halls. It has applications where a large number of audio channels must be transmitted over long distances or to multiple locations.
CobraNet is an alternative to analog audio, which suffers from signal degradation over long cable runs due to electromagnetic interference, high-frequency attenuation, and voltage drop. Additionally, the use of digital multiplexing allows audio to be transmitted using less cabling than analog audio.

## History

CobraNet was developed in 1996 by Boulder, Colorado-based Peak Audio. Initial demonstrations were of a 10 Mbit/s point-to-point system with limited channel capacity. The first permanent installation of CobraNet in this early form was to provide background music throughout Disney's Animal Kingdom theme park. The first commercial use of CobraNet was during the halftime show at Super Bowl XXXI in 1997.
CobraNet was first introduced as an interoperable standard in collaboration with manufacturer QSC Audio Products. QSC was the first to license the technology from Peak Audio and marketed it under the RAVE brand. At this point CobraNet had graduated to fast Ethernet and used a unique collision avoidance technique to carry up to 64 channels per Ethernet collision domain.
CobraNet was subsequently enhanced to support and eventually require a switched Ethernet network. An SNMP agent was added for remote control and monitoring. Support for higher sample rates, increased bit resolutions and lowered latency capabilities were later introduced in an incremental and backward-compatible manner.
In May 2001, Cirrus Logic announced that it had acquired the assets of Peak Audio. Leveraging Cirrus DSP technology, a low-cost SoC implementation of CobraNet was developed and marketed.

## Advantages and disadvantages
### Advantages

Using CobraNet and fast Ethernet, 64 channels of uncompressed digital audio are carried through a single category 5 cable. Using gigabit or fiber optic Ethernet variants, the cost of cabling per audio channel is reduced further compared to the fast Ethernet implementation. CobraNet data can coexist with data traffic over existing Ethernet networks so a single network infrastructure can serve audio distribution and other networking needs.
Audio routing can be changed at any time with network commands, and does not require rewiring.
Audio is transmitted in digital form, and provides reduced susceptibility to electromagnetic interference, crosstalk, coloration, and attenuation owing to cable impedance.
Use of Ethernet by CobraNet offers many high availability features such as Spanning Tree Protocol, link aggregation, and network management. For critical applications, CobraNet devices can be wired with redundant connections to the network. In this configuration, if one CobraNet device, cable, or Ethernet switch fails, the other takes over almost immediately.

### Disadvantages

Delays over the CobraNet transmission medium itself are at least 1+1⁄3 milliseconds per network traversal. For some applications, these delays can be unacceptable – especially when combined with further delays resulting from propagation time, digital signal processing and the conversions between analog and digital.
Licensing the technology or purchasing the required CobraNet interfaces, which encode and decode the CobraNet signal, can be expensive.

## Transmission

CobraNet is transmitted using standard Ethernet packets. Instead of using TCP/IP packets, CobraNet transfers data using data link layer packets, which travel quickly through hubs, bridges and switches, and are not as susceptible to the latency and QoS problems commonly found in streaming protocols using a higher transport layer. However, since CobraNet does not use IP protocol, its packets cannot travel through routers, and therefore it is limited to use on a LAN; CobraNet cannot be used over the Internet. The network over which CobraNet is transmitted must be able to operate at a minimum of 100 Mbit/s. All CobraNet packets are identified with a unique Ethernet protocol identifier (0x8819) assigned to Cirrus Logic.
CobraNet is not designed to work over wireless networks. Bandwidth and reliability issues associated with typical 802.11 wireless networks tend to cause frequent dropouts and errors. However, wireless communication of CobraNet data can be accomplished reliably using lasers.

### Channels and bundles

CobraNet data is organized into channels and bundles. A typical CobraNet signal can contain up to 4 bundles of audio traveling in each direction, for a total of 8 bundles per device. Each bundle houses up to 8 channels of 48 kHz, 20-bit audio, for a total capacity of 64 channels. CobraNet is somewhat scalable, in that channel capacity increases when 16-bit audio is used, and channel capacity decreases when 24-bit audio is used. The number of channels allowed per bundle is limited by the 1,500-byte Ethernet MTU.
There are three types of bundles: multicast, unicast, and private:
* Multicast bundles are sent from one CobraNet device to all other CobraNet devices in the network using Ethernet multicast addressing. Each CobraNet device individually determines if it will use the bundle or discard it. Therefore, multicast bundles are more bandwidth-intensive than other bundle types. Bundle numbers 1–255 are reserved for multicast bundles.
* Unicast bundles are sent from one CobraNet device to any other device or devices configured to receive the bundle number. Unicast bundles are much more efficient because network switches route them only to devices which actually want to receive them. Despite their name, unicast bundles may still be sent to multiple devices, either by transmitting multiple copies of the audio data or using multicast addressing. Bundle numbers 256–65279 are reserved for unicast bundles.
* Private bundles may be sent with unicast or multicast addressing. Bundle numbers 65280–65535 are reserved for private bundles. Private bundle numbers are paired with the MAC address of the device that transmits them. To receive a private bundle, both the bundle number and the MAC address of the transmitter must be specified. Because 256 private bundles available to each transmitter, there is no limit on the total number private bundles on a network.
As long as multicast bundles are used sparingly, it is virtually impossible to exceed the bandwidth of a 100 Mbit network with CobraNet data. However, there are limitations to the maximum number of bundles that can be sent on a network, since the conductor must include data in its beat packets for every bundle on the network, and the beat packet is limited to 1,500 bytes. If each device is transmitting one bundle, there may be up to 184 transmitters active simultaneously (for a total of 184 bundles). If each device is transmitting four bundles, then only 105 transmitters can be active, although they would be producing a total of 421 active bundles. The use of private bundles does not require any additional data in the beat packet, so these network limitations can be sidestepped by using private bundles.

### Synchronization

The CobraNet network is synchronized to a single CobraNet device known as the conductor. A conductor priority can be configured to influence the selection of the conductor. Among devices with the same conductor priority, the first to establish itself on the network becomes is elected conductor. All other devices are known as performers. In the event that the conductor fails, another CobraNet device will be chosen to become the conductor within milliseconds. CobraNet cannot function without a conductor.

### Packets

Four main types of packet are used in the transmission and synchronization of CobraNet:
* Beat packets – the conductor outputs a beat packet to all other CobraNet devices on the network at a rate of 750 packets per second. All other CobraNet devices on the network synchronize their audio clock and their data transmissions to the beat packet. The beat packet contains network operating parameters, clock data and transmission permissions for multicast and unicast bundles.
* Audio packets – also known as isochronous data packets, these packets are sent out by all CobraNet devices after they receive a beat packet. At standard latency settings, one audio packet is sent for each beat packet received, and each audio packet includes 64 samples of audio data per channel. At lower latency settings, audio packets may be sent twice or four times for each beat packet received. Bundles do not share packets; separate packets are sent in sequence for each bundle transmitted from the same device.
* Reservation packets – these packets are transmitted as needed or typically once per second at minimum. Their function is to control bandwidth allocation, initiate connections between CobraNet devices, and monitor the status of CobraNet devices.
* Serial bridge packets – asynchronous serial data may be sent between CobraNet devices on the same network. Many standard asynchronous serial formats are supported, including RS-232, RS-422, RS-485 and MIDI.

### Latency

The buffering and transmission of audio data in Ethernet packets typically incurs a delay of 256 samples or 5+1⁄3 milliseconds. Additional delays are introduced through analog-to-digital and digital-to-analog conversion. Latency can be reduced by sending smaller packets more often. In most cases, the programmer can choose the desired CobraNet latency for a particular CobraNet device (5+1⁄3, 2+2⁄3, or 1+1⁄3 milliseconds). However, reducing audio latency has consequences:
* Reducing latency requires more processing by the CobraNet interface and may reduce channel capacity.
* Reducing latency places additional demands on network performance, and may not be possible in some network configurations if the forwarding delay is too high.
* Since reducing latency means sending smaller packets more often, higher resolution (i.e. 96 kHz, 24-bit) audio channels can be sent per bundle without exceeding the 1,500-byte payload limit for Ethernet packets.
| Latency | Channels per bundle | Channels per bundle | Channels per bundle | Channels per bundle | Channels per bundle | Channels per bundle |
| Latency | 16-bit, 48 kHz | 20-bit, 48 kHz | 24-bit, 48 kHz | 16-bit, 96 kHz | 20-bit, 96 kHz | 24-bit, 96 kHz |
| 5+1⁄3 ms | 8 | 8 | 7 | 5 | 4 | 3 |
| 2+2⁄3 ms | 8 | 8 | 8 | 8 | 8 | 7 |
| 1+1⁄3 ms | 8 | 8 | 8 | 8 | 8 | 8 |
It may seem from the Latency vs. Channels per bundle table that more information can be sent at a lower latency. However, that is not the case. More channels can be sent per bundle, but fewer bundles can be processed simultaneously by one device. So, while eight 24-bit, 96 kHz channels can be sent in one bundle at 1+1⁄3 ms latency, due to processing constraints, the CobraNet device may only be able to send and receive one bundle instead of the usual four. The bundle capacity of CobraNet devices are unique to the particular device and are not always the same. The Channels per bundle vs. test case latencies table illustrates the bundle capacity for a Biamp AudiaFLEX-CM DSP device. The Rx and Tx columns indicate the absolute maximum number of channels that can be received or transmitted. The Rx/Tx column represents the maximum number of channels that can be received and transmitted simultaneously.
| Channels per bundle | 1+1⁄3 ms latency | 1+1⁄3 ms latency | 1+1⁄3 ms latency | 2+2⁄3 ms latency | 2+2⁄3 ms latency | 2+2⁄3 ms latency | 5+1⁄3 ms latency | 5+1⁄3 ms latency | 5+1⁄3 ms latency |
| Channels per bundle | Rx | Tx | Rx/Tx | Rx | Tx | Rx/Tx | Rx | Tx | Rx/Tx |
| 8 | 32 | 32 | 32/32 | 32 | 32 | 32/32 | 32 | 32 | 16/16 |
| 7 | 32 | 32 | 32/32 | 32 | 32 | 29/29 | 28 | 32 | 14/15 |
| 6 | 32 | 32 | 32/32 | 32 | 32 | 29/29 | 24 | 32 | 12/13 |
| 5 | 32 | 32 | 32/32 | 32 | 32 | 25/27 | 21 | 32 | 12/13 |
| 4 | 32 | 32 | 32/32 | 32 | 32 | 24/24 | 20 | 28 | 12/12 |
| 3 | 32 | 32 | 32/32 | 32 | 32 | 20/21 | 15 | 24 | 9/11 |
| 2 | 32 | 32 | 28/29 | 27 | 32 | 16/16 | 12 | 18 | 6/7 |
| 1 | 16 | 16 | 16/16 | 16 | 16 | 9/10 | 7 | 10 | 4/4 |

## Hardware and software
### CobraNet network cards

CobraNet interfaces come in several varieties, some of which can support more channels than others. Additionally, CobraNet interfaces have two Ethernet ports labelled "primary" and "secondary". Only the primary Ethernet port needs to be connected, but if both ports are connected the latter acts as a fail-safe. Careful network design and topology which takes advantage of this feature can provide extremely high reliability in critical applications.
The typical CobraNet interfaces provided by Cirrus Logic are the CM-1 and the CM-2:
* CM-1 – the standard CobraNet card, provides 32 in and 32 out audio channels.
* CM-2 – compact, low-power, lower cost design provides 8 or 16 audio channels.
Both cards are designed to be added to audio products by the manufacturer.

### Software

Cirrus Logic provides a software application known as CobraCAD, which assists in the design of the network on which the CobraNet system will run. It helps to identify if there are too many routers between two CobraNet devices, if a certain latency is possible given the network configuration and other tasks. However, Cirrus Logic does not provide software to manipulate their hardware. In fact, in the simplest of cases, no software is required by the end user. For instance, a simple breakout box which converts a CobraNet signal to eight analog audio signals would require little or no configuration by the end user apart from possibly selecting the bundle number. If configuration is required (for example, in a DSP box with integrated CobraNet I/O), then the manufacturer of the device typically supplies proprietary software for that purpose.

### Devices

One type of device that integrates CobraNet is the audio DSP. As self-powered speakers became more common, Cobranet was frequently used to distribute the audio signal from the DSP. These devices typically receive audio from CobraNet (and often from other digital or analog sources simultaneously), and process the audio using digital filters and effects (for example, volume control, EQ, compression, delay, crossovers, etc.) and then output the audio via CobraNet (or other digital or analog outputs). Some DSPs even have an integral telephone hybrid, and can incorporate CobraNet and other sources into a teleconferencing application.
Amplifiers with integrated CobraNet help keep the signal chain digital for a longer span. Amplifiers with CobraNet inputs may also have limited DSP and network monitoring capabilities.
Loudspeakers with integrated CobraNet help keep the signal chain digital for an even longer span. In a typical unpowered speaker application, the amplifier would be housed far away from the speaker, and a long speaker cable (analog) would be run between the speaker and the amplifier. The speaker cable would be subject to interference and signal loss from electrical resistance. However, a powered speaker, powered by an electrical cable and fitted with integrated CobraNet inputs, eliminates the speaker cable and replaces it with a network cable. Since a speaker will only use one audio channel out of the bundle, many speakers with CobraNet will also have a number of analog outputs for the rest of the channels in the bundle, which is useful in speaker cluster applications.
Many digital mixing consoles are available with optional CobraNet interfaces for increased channel capacity and reduced cabling.

### Manufacturers

Manufacturers who wish to integrate CobraNet connectivity into their devices either license the technology or purchase CobraNet interface modules or chips from Cirrus Logic. Many audio equipment manufacturers have included CobraNet in their products. Below is a partial list:
* Biamp Systems
* Bose Corporation
* dbx
* Crest Audio
* Crown International
* D&R Electronica
* Dolby Laboratories
* EAW
* Electro-Voice
* JBL
* Lab.gruppen
* Mackie
* Midas Consoles
* Peavey MediaMatrix
* QSC Audio Products
* Rane
* Renkus-Heinz
* Soundcraft
* Symetrix
* Yamaha Corporation