Table of contents
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
HW IP Features
.
Typical system using SDI Rx and SDI Tx:
Following design depicts the typical SDI embed/extract IP interfaces for audio recording and playback.
In Embed mode, audio from a source like file storage is fed to SDI Embed via audio Formatter. SDI audio Embed core then embeds audio and video and sends to SDI Video Transmitter to transmit AV stream. Audio Formatter IP GUI should be configured in PCM_TO_AES format for this operation.
Similarly, in Extract mode, audio Extract core extracts audio from an input SDI AV stream and gives it to Audio Formatter which converts to PCM data and writes in to memory. From memory, audio can be stored to a file. Audio Formatter IP GUI should be configured in AES_TO_PCM format for this operation.
SW Driver Overview
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.
Kernel Configurations
Code Block | ||
---|---|---|
| ||
CONFIG_SND_SOC=y
CONFIG_SND_SOC_XILINX_SDI=y should be enabled. |
Device Tree Bindings
A sample binding is shown below and the description of DT property is documented at
The driver is present at https://github.com/Xilinx/linux-xlnx/blob/master/
Code Block | ||
---|---|---|
| ||
audio_ss_0_v_uhdsdi_audio_extract_0: v_uhdsdi_audio@80080000 {
compatible = "xlnx,v-uhdsdi-audio-2.0";
interrupt-names = "interrupt";
interrupt-parent = <&gic>;
interrupts = <0 106 4>;
reg = <0x0 0x80080000 0x0 0x10000>;
xlnx,snd-pcm = <&audio_ss_0_audio_formatter_0>;
};
audio_ss_0_v_uhdsdi_audio_embed_0: v_uhdsdi_audio@80090000 {
compatible = "xlnx,v-uhdsdi-audio-2.0";
interrupt-names = "interrupt";
interrupt-parent = <&gic>;
interrupts = <0 107 4>;
reg = <0x0 0x80090000 0x0 0x10000>;
xlnx,snd-pcm = <&audio_ss_0_audio_formatter_0>;
sdi_av_port: port@0 {
reg = <0>;
sditx_audio_embed_src: endpoint {
remote-endpoint = <&sdi_audio_sink_port>;
};
};
}; |
Guide lines
IP/Driver Features
IP Features | 2019.1 |
---|---|
Supports up to 32 channels of audio. | Supports only 2 channels |
20/24-bit audio at multiple sample rates (32 KHz, 44.1 KHz and 48 KHz) | Yes |
Synchronous and asynchronous audio support | Yes |
Supports 192-bit AES3 channel status extraction | Yes |
Reports the presence and status of audio groups on the incoming SDI stream | Yes |
AXI4-Stream interface to carry audio samples in AES3 format | Yes |
AXI4-Lite and port based interface for configuration of the core | Yes |
Known Issues & Limitations
- Only 2 channels supported.
- Not tested for 20 bit depth.
- AES3 data is given as debug information.
Kernel Configurations
Below kernel config options should be enabled.
Code Block | ||
---|---|---|
|
CONFIG_ |
Here <&misc_clk_1> is the clock source for embed_clk and extract_clk.
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.
- ALSA Utilities.
- Gstreamer Utilities.
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.
Code Block | ||
---|---|---|
| ||
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.
Code Block | ||
---|---|---|
| ||
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.
Code Block | ||
---|---|---|
| ||
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.
Code Block | ||
---|---|---|
| ||
gst-launch-1.0 filesrc location=48000.raw ! audio/x-raw,format=S24_32LE,rate=48000, |
...
channels= |
...
2 ! alsasink device=hw:0,0 |
Debug Capability
This page provides different tools and techniques useful for debugging audio issues encountered in Linux-based systems. The document is mostly focused on the Linux operating system and also describes the build-in ALSA driver tool to debug PCM ring buffer positions.
/proc/asound/card#/pcm0p/xrun_debug
Replace '#' with your card number (usually 0). This proc file can enable various debugging tools. The CONFIG_SND_PCM_XRUN_DEBUG, CONFIG_SND_VERBOSE_PROCFS, CONFIG_SND_DEBUG options must be enabled in your kernel (if xrun_debug proc file is present - this feature is enabled).
Code Block | ||
---|---|---|
| ||
1 Basic debugging - show xruns in ksyslog interface
2 Dump stack - dump stack for basic debugging
4 Jiffies check - compare the position with kernel jiffies (a sort of in-kernel monotonic clock),
show what's changed when basic debugging is enabled
8 Dump positions on each period update call
16 Dump positions on each hardware pointer update call
32 Enable logging of last 10 ring buffer positions
64 Show the last 10 ring buffer position only once (when first error situation occurred) |
Some good value combinations:
Code Block | ||
---|---|---|
| ||
# Enable basic debugging and dump stack
# Usefull to just see, if PCM stream is stopped for a reason (usually wrong audio process timing from scheduler)
echo 3 > /proc/asound/card0/pcm0p/xrun_debug |
Boards Supported
Driver has been tested on the following boards
- ZCU106 Rev D
- Corrected format of this page to make it uniform with the other documents.
Related Links
Boards Supported
Driver has been tested on the following boards
- ZCU106 Rev 1.0
Change log
2019.1
- Summary:
- Used Common Clock Framework(CCF) API to configure clocks.
- Added support for audio enablement in 4K video mode.
- Commits:
2018.3:
- Summary
- Initial version released