The purpose of this page is to describe the Linux ALSA SoC driver for audio formatter IP, which does audio DMA and data repacking.
Table of contents
The Xilinx® LogiCORE™ IP Audio Formatter is a soft Xilinx IP core for use with the Xilinx Vivado® Design Suite. The Audio Formatter provides high-bandwidth direct memory access between memory and AXI4-Stream target peripherals supporting audio data.
Typical system using Audio Formatter with I2S Rx and I2S Tx:
This driver programs the DMA IP block and registers a platform component with ASoC framework. Audio Formatter gets PCM/AES data and converts to AES/PCM format needed by sink.
AES format contains PCM and channel status information, and the Audio Foramtter IP will strip non-audio content such as channel status and make it available in registers. Audio Formatter driver can parse the content of channel status to get audio parameters.
Audio Formatter driver needs to be used along with other audio IPs such as I2S/HDMI/SDI/SPDIF to create a respective functional sound card, and this driver cannot be used as standalone.
The driver is available at, https://github.com/Xilinx/linux-xlnx/blob/master/sound/soc/xilinx/xlnx_formatter_pcm.c
|Supports 2, 4, 6, or 8 audio channels||Supports 2 channels only|
|Supports 8, 16, 20, 24, and 32 bits PCM data width||Yes|
|Independent S2MM (Stream to Memory) and MM2S (Memory to Stream) operations.||Yes|
Supported data formats while write from Audio stream to Memory buffer (S2MM):
Supported data formats while reading from memory Buffer as audio stream (MM2S):
Known Issues & Limitations
- Tested for only 2 channels.
- Tested only for 16 and 24 bit depths.
- In the capture path PCM_TO_AES mode and playback path AES_TO_PCM modes were only tested.
- This driver is tested with Xilinx I2S, HDMI, SDI and SPDIF audio pipelines.
Kernel Configuration options for Driver
Below driver configurations should be enabled.
Device Tree Binding
A sample binding is and the description of the DT properties are described at, xlnx,audio-formatter.txt
Driver is tested as a part of either of I2S/HDMI/SDI/SPDIF sound card. Test procedure can be referred from supported audio pipeline test cases. Please refer related links.
Driver has been tested on the following boards
- ZCU106 Rev 1.0
This driver is upstreamed and present at, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/soc/xilinx/xlnx_formatter_pcm.c.
- Used Common Clock Framework(CCF) for clock configurations.
- Added Support for multiple instances of sound cards.
- Used ALSA framework macros to parse AES audio header.
- Refined Audio Formatter IRQ enablement.
- 61450ab - ASoC: xlnx: use clock framework for clocks to audio formatter.
- a919327 - ASoC: xlnx: move mm2s/s2mm configuration to functions.
- a8c2933 - ASoC: xlnx: clear bits before assigning desired value.
- 621e5f3 - ASoC: xlnx: support multiple instances of sound card.
- 0f67965 - ASoC: xlnx: reuse framework macros to parse AES audio header.
- e5cc4fc1 - ASoC: xlnx: refine audio formatter irq enablement.
- 26a8a4d - Merge tag 'v4.19' into master
- 9f34535 - ASoC: xlnx: disable strict check of AES parameters
- e065240 - ASoC: xlnx: Set missing/invalid channel count to default value in con
- 5b626db - ASoC: xlnx: enable axi clock in audio formatter.
- d69a510 - ASoC: xlnx: support multiple sampling rates for I2S.