Wiki

This version (25 Apr 2024 16:48) was approved by Rebecca Butler.The Previously approved version (22 Feb 2024 20:24) is available.Diff

Sharc Audio Module - Ethernet Audio Example

This section will take you through a few examples to set up and run ethernet audio, including using the shell terminal program to interface with the application.

Hardware Setup

Switch Setup

1. Connect the 5V input to the 5V barrel connector on the back of the switch. Plug the other side into an available outlet. If the switch is properly powered, the green Power will light up.
2. Connect one end of the first ethernet cable to an ethernet port on your PC. Connect the other end to port 5 of the switch. If a network has been identified, the switch will display a green LED above the corresponding port.
3. Connect one end of the second ethernet cable to port 1 on the ethernet switch.
4. Navigate to your PC's Network & Internet Settings. Under Advanced network settings, select Network and Sharing Center.
5. Select the Connections under Unidentified network to open the properties dialog
6. Under properties, select Internet Protocol Version 4 (TCP/IPv4) and set IP address to use the following:

IP address = 192.168.2.1
Subnet mask = 255.255.255.0

This will allow the Ethernet IP address of the Audio Starter project to be on the same domain as the switch.

Note that once the system is up and running, the IP address and Subnet mask settings can also be retrieved by running the syslog command.

Follow the next set of instructions below to set up your specific hardware variant.

ADZS-SC589-MINI

1. Power on your SAM board and plug in the 12V Power Supply to the 12V connector. If the board is properly powered, the green LED9/PWR will light up.
2. Plug the USB Micro Type B side to the SAM board USB connector and the USB Type A side to a USB connection on the PC.
3. For VBAN→CODEC

Connect the Portable speaker to the LINE OUT connector on the SAM (ensure the speaker is turned on!).

For CODEC→VBAN

Connect the 3.5MM Stereo Audio Cable to the LINE IN connector on the SAM.
4. Connect the other end of the second ethernet cable to the ethernet port on the SAM labelled J3
5. Proceed to the software setup instructions (common for all hardware variants) NA

ADZS-SC584-EZLITE

1. Power on your board and plug in the 12V Power Supply to the 12V connector. If the board is properly powered, the green PWR LED will light up.
2. Plug the USB Micro Type B side to the board USB OTG connector and the USB Type A side to a USB connection on the PC.
3. For VBAN→CODEC

Connect the Portable speaker ​to the HEADPHONES connector on the board (ensure the speaker is turned on!).

For CODEC→VBAN

Connect the RCA Left and Right side connector to the INPUT/OUTPUT connector on the hardware and the 3.5mm stereo audio cable to an audio source with audio jack support (such as a cell phone).
4. Connect the other end of the second ethernet cable to the ethernet port on the hardware labelled J4
5. Proceed to the software setup instructions (common for all hardware variants) NA

Software Setup

Follow the instructions below to set up the software.

Serial Terminal Setup

This tutorial uses TeraTerm as the serial interface to your hardware.

Follow the instructions below to set up a connection to your hardware:

1. Open TeraTerm and connect to a new Serial Session, connecting to the Port labeled SC5xx Communications Port.
2. After connection, navigate to the Serial Port settings under Setup and change the Port settings to the following:

Speed/Baud - 115200
Data Bits - 8-bit
Stop Bits - 1
Parity - None
Flow Control - None
3. With a successful connection, after reset, the terminal will display SAM Audio Starter with the version. Type help to list the available shell commands.

Audio Connection Setup: VBAN->CODEC

This setup will allow audio to pass from ethernet input to analog output through your hardware. This setup allows us to play audio via a virtual VBAN soundcard established by Voicemeeter and output to a mini portable speaker.

1. Ensure that a valid ethernet connection can be established between the PC and the board by pinging it. Using the Windows command prompt run:

ping 192.168.2.2

A valid connection will respond with four replies. Note that the user's VPN and firewall can affect this connection so local traffic may need to be permitted by the firewall and/or VPN may need to be disabled to run this test.
2. Open Voicemeeter and after the hardware out option has finished initializing, set the PCs playback device to Voicemeeter Input
2. Press the VBAN button in the top right corner to configure VBAN ethernet audio.
3. Under Outgoing Streams set the following parameters:

Source = Bus B
Stream Name = SAM
IP Address To = 192.168.2.2
SamplerRate = 48000Hz
Ch = 2
Format = PCM 16 Bits
Net Quality = Slow

Press the On button to enable the source.

Note that the clock domain mismatch will be much more pronounced when Net Quality = Optimal
4. In the shell terminal, type

vban rx on 192.168.2.2 6980 2 16

and

vban rx domain system

This will prime the board to receive VBAN audio on port 6980 at ethernet address 192.168.2.2 with 2 channels of audio at 16-bits per channel. Type vban again to verify the proper settings.
5. In the shell terminal, type help route. The shell will display the usage for the route command.
6. In the shell terminal, type route. The shell will display the current audio routing table.
7. In the shell terminal, type route 0 vban 0 codec 0 2 20 to add to route table index 0 the audio routing of vban audio to codec output with 2 channels and an attenuation of 20dB. Type route again to ensure that table was updated properly.
8. Finally, on your PC, enable audio through a preferred method, such as Youtube. You should now be able to hear the audio from your PC, through the VBAN virtual audio card, through the hardware and coming out of the speaker connected to LINE OUT or HEADPHONES. NA
There are no ASRCS currently implemented for a VBAN to DAC clocking domain at this time. As a result, the output may underrun eventually. This is a very basic example just to show ethernet audio. VBAN to VBAN audio should be used to keep clock domains aligned. Clock domain mismatch means that the audio may pop/click/drop samples, etc. ASRCS may be implemented in the future.

Audio Connection Setup: CODEC->VBAN

This setup will allow audio to pass the codec input (LINE IN) to the ethernet port via the VBAN protocol. This setup allows us to play audio to a virtual VBAN soundcard established by Voicemeeter.

1. Ensure that a valid ethernet connection can be established between the PC and the board by pinging it. Using the Windows command prompt run:

ping 192.168.2.2

A valid connection will respond with four replies. Note that the user's VPN and firewall can affect this connection so local traffic may need to be permitted by the firewall and/or VPN may need to be disabled to run this test.
2. Open Voicemeeter and after the hardware out option has finished initializing, set the PCs playback device to Voicemeeter Input
2. Press the VBAN button in the top right corner to configure VBAN ethernet audio.
3. Under Incoming Streams set the following parameters:

Stream Name = SAM
IP Address To = 192.168.2.2
SamplerRate = 48000Hz
Ch = 2
Format = PCM 16 Bits
Net Quality = Fast
Destination = Virtual Input
Press the On button to enable the stream.
4. In the shell terminal, type

vban tx on 192.168.2.1 6980 2 16

This will prime the PC to receive VBAN audio on port 6980 at ethernet address 192.168.2.1 with 2 channels of audio at 16-bits per channel from the input codec. Type vban again to verify the proper settings.
5. In the shell terminal, type help route. The shell will display the usage for the route command.
6. In the shell terminal, type route. The shell will display the current audio routing table.
7. In the shell terminal, type route 0 codec 0 vban 0 2 20 to add to route table index 0 the audio routing of codec audio to vban with 2 channels and an attenuation of 20dB. Type route again to ensure that table was updated properly.
8. Finally, on your PC, Phone, or other analog source, enable audio through a preferred method, such as Youtube. You should now be able to hear the audio from your analog source, input to the codec, and out through the Ethernet port via VBAN. NA

Having trouble? Check out our list of common issues!

Navigation - Advanced Audio Projects

resources/tools-software/sharc-audio-module/advanced-audio-projects/examples-ethernet-audio.txt · Last modified: 23 Apr 2024 17:46 by Sagar Vaidya