Xilinx ALSA HDMI Audio driver

The purpose of this page is to describe the audio Linux drivers for HDMI Rx/Tx IP.

Table of contents

Introduction

The Xilinx® LogiCORE™ IP HDMI Transmitter and Receiver cores are soft Xilinx IP core for use with the Xilinx Vivado® Design Suite. These IPs provide easy way of sending/receiving audio over HDMI interface. These IPs requires minimal register programming.

Typical system using HDMI Rx and HDMI Tx:

The following block diagrams shows the data flow between HDMI-Tx/HDMI-Rx and memory.

HDMI Rx receives the data from HDMI source and split the audio from video content.

Xilinx Audio Formatter converts this AES data to PCM data and stores in memory.

HDMI TX gets the AES data from Audio Formatter and embeds it into video.

To form a HDMI audio pipeline the HDMI audio drivers should be used along with Audio Formatter driver and Sound Card driver. HDMI audio drivers cannot be used as standalone driver.

A dummy CPU DAI driver is used here, as there needs to be a CPU DAI to be registered with ASoC framework.

Codec DAI will be part of HDMI Tx and Rx video drivers, as those provide and consume the digital audio data (there is no analog to digital conversion here, compared to I2S).

The driver role is to let audio stream in and out of HDMI Tx and Rx modules respectively.

Additionally, an Audio Clock Recovery block is programmed with ‘N’ and ‘CTS’ values using playback audio parameters in case of playback pipeline.

User has a provision to enable/disable HDMI audio from HDMI video drivers. If HDMI Tx/Rx device tree node has 'xlnx,audio-enabled' entry audio functionality is enabled, else disabled.

The drivers are present at, https://github.com/Xilinx/hdmi-modules/blob/master/hdmi/xlnx_hdmirx_audio.chttps://github.com/Xilinx/hdmi-modules/blob/master/hdmi/xlnx_hdmitx_audio.c.

HW IP Features

IP Features2019.1
Supports up to 8 audio channelsSupports only 2 channels


Know Issues & Limitations in Driver

  • Tested only 16 and 24 bit depths.
  • Tested for only sampling rates (32, 44.1, 48, 88.2, 96, 176.4 and 192kHz).
  • HDMI audio pass-through (capture and playback as in one pipeline) is not supported.
  • In Playback path an Audio Clock Recovery block(ACR) IP is required to generate the N and CTS values for HDMI TX audio.

Kernel Configurations

Device tree binding

To enable audio functionality add 'xlnx,audio-enabled' entry to HDMI TX/RX Video DT nodes. Find at below links.

https://github.com/Xilinx/hdmi-modules/blob/master/Documentation/devicetree/bindings/xlnx%2Cv-hdmi-rx-ss.txt#L99

https://github.com/Xilinx/hdmi-modules/blob/master/Documentation/devicetree/bindings/xlnx%2Cv-hdmi-tx-ss.txt#L137

Test Procedure

The driver has been tested using following tools:

  1. ALSA Utilities.
  2. Gstreamer Utilities.

Setup: Connect a HDMI source such as Apple TV to ZCU106 HDMI Rx port and a monitor to HDMI Tx port and start a multimedia stream.

Note:
  1. Below commands assume registered sound card is #0, playback device is #0 and record device is #1.
  2. Input audio stream properties to be recorded are sampling rate of 48000 Hz, 24 bits per sample, 2 channels.

Procedure to test HDMI with ALSA utilities

Record (HDMI Rx): Records the audio data into a file.

Playback (HDMI Tx):  Playing the recorded file from above step

Device enumeration:

For record device:

For playback device:


Procedure to test HDMI with Gstreamer utilities

Record (HDMI Rx): Records the audio data into a file.

Playback (HDMI Tx):  Playing the recorded file from above step


Boards Supported

Driver has been tested on the following boards

  1. ZCU106 Rev 1.0

Change log

2020.1

  • Summary
    • No changes

2019.2

  • Summary
    • No changes

2019.1

  • Summary:
    • Modified lookup table for audio N parameter for hdmi tx audio driver.
  • Commits:
    • cccf4a9 - hdmitx:hdmirx: Adaptation to 4.19 kernel version
    • 6f65b2  - hdmitx: modify lookup table for audio N parameter.

2018.3:

  • Summary
    • Initial version released

Related Links