Xilinx ALSA SDI Audio driver

The purpose of this page is to describe the Linux ALSA SoC driver for SDI Embed/Extract SoftIP.

Table of contents

Introduction

The Xilinx® LogiCORE™ IP UHD SDI Audio Core is a soft Xilinx IP core for use with the Xilinx Vivado® Design Suite. This IP can be configured in Embed/Extract mode to provide embed PCM audio with SDI Video or extract PCM audio from SDI AV stream.


Typical system using SDI Rx and SDI Tx:

Following design depicts the typical SDI embed/extract IP interfaces for audio recording and playback.


Audio Formatter is set in AES_TO_PCM for SDI Audio in extract mode and PCM_TO_AES in embed mode.

The SDI audio Rx/Tx driver is based on the ALSA framework(refer ASoC sound card). This driver registers one of the 'component' expected by the ALSA framework.  This SDI audio driver along with Audio Formatter and Sound Card drivers will create a SDI audio pipeline. Driver cannot be used as standalone. The driver is present at https://github.com/Xilinx/linux-xlnx/blob/master/sound/soc/xilinx/xlnx_sdi_audio.c

IP/Driver Features

IP Features2021.1

Supports up to 32 channels of audio.

Supports up to 8 channels

20/24-bit audio at multiple sample rates (32 KHz, 44.1 KHz and 48 KHz)

Yes
Synchronous and asynchronous audio supportYes
Supports 192-bit AES3 channel status extractionYes
Reports the presence and status of audio groups on the incoming SDI streamYes
AXI4-Stream interface to carry audio samples in AES3 formatYes
AXI4-Lite and port based interface for configuration of the coreYes

Known Issues & Limitations

  • Only 8 channels supported.
  • Not tested for 20 bit depth.
  • AES3 data is given as debug information.


Kernel Configurations

Below kernel config options should be enabled.

CONFIG_SND_SOC=y
CONFIG_SND_SOC_XILINX_SDI=y

Device Tree Bindings

The dts node should be defined with correct hardware configuration. How to define the node is documented in, xlnx,v-uhdsdi-audio.txt

Test Procedure

The driver has been tested using following tools.

  1. ALSA Utilities.
  2. Gstreamer Utilities.
Note: Below examples assume sound card registered is #0, playback device is #0, record device is #1.

Procedure to test SDI audio with ALSA Utilities

Recording a file: arecord tool is used to record the audio file.
Following is the recording audio file with 24bit bit depth, 48khz sampling frequency and 2 channel audio properties.

arecord -Dhw:0,1  -fS24_LE -r 48000 -c 2  -d 30 -t raw file.raw


Playing a file:
 aplay tool is used to play the audio file. 

Following is the playing audio file with 24bit bit depth, 48khz sampling frequency and 2 channel audio properties.


aplay -D hw:0,0 -fS24_LE -r 48000 -c 2  -d 30 -t raw file.raw

Procedure to test SDI audio with Gstreamer Utilities

Recording a file: gst-launch is used to record the audio file.

Following is the recording audio file with 24bit bit depth, 48khz sampling frequency and 2 channel audio properties. gst-launch is using alsa src plugin to enable recording with SPDIF driver.

gst-launch-1.0 alsasrc device=hw:1,1 ! queue ! audio/x-raw,format=S24_32LE,rate=48000,channels=2 ! filesink location=48000.raw


Playing a file: gst-launch is used to play the audio file.

Following is the playing audio file with 24bit bit depth, 48khz sampling frequency and 2 channel audio properties. gst-launch is using alsa sink plugin to enable playback with SPDIF driver.

gst-launch-1.0 filesrc location=48000.raw ! audio/x-raw,format=S24_32LE,rate=48000,channels=2  ! alsasink device=hw:0,0


Boards Supported

Driver has been tested on the following boards

  1. ZCU106 Rev 1.0

Change log

2024.2

2024.1

  • Summary
    • No changes

2021.2 & 2022.1 & 2022.2

  • Summary
    • No changes

2021.1 

  • Summary:
    • 8 Channel audio support added

2020.1

  • Summary
    • No changes

2019.2

  • Summary
    • No changes

2019.1

  • Summary:
    • Used Common Clock Framework(CCF) API to configure clocks.
    • Added support for audio enablement in 4K video mode (upto 2 channels).
  • Commits:
    • 424948a - ASoC: xlnx: use clock framework for clocks to SDI audio.
    • 987fdfe4 - ASoC: xlnx: add audio support in 4k mode.

2018.3:

  • Summary
    • Initial version released

Related Links

© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy