TSI Audio Features

Introduction

TLSR8258F512 embeds audio module, which supports 4 types of audio input path: digital microphone(DMIC), Codec(I2S), USB, Analog microphone(AMIC). And there are 3 types of audio output path: USB, Codec(I2S), Sigma-Delta Modulation (SDM) DAC. Besides, the Audio Module of TLSR8258F512 intergrates a input processing module including Decimation filter, LPF, Down-Sample, HPF, ALC. The specific details are shown below.

Block Diagram of Audio Input and Output Path

Audio Input Path

AMIC Input

A programmable stereo PGA(Programmable Gain Amplifier) with adjustable gain is built in for AMIC. AMIC input channel can carry out signal amplification via the PGA. After implementing AD conversion for selected AMIC input signal, data of 3 analog channels(CH0 ~ CH2) will be generated. Data of CH0/CH1 are sent to the audio input processing module, while data of CH2 are directly written into FIFO.

DMIC Input

Stereo digital microphone(DMIC) interface is also supported in the TLSR8258F512. DMIC interface includes one configurable clock line and one data line. User can set the rising or falling edge of clock signal at which to sample data of DMIC by the related API. After data sampling of DMIC interface, sign extension and audio input processing, the signal can be written into FIFO.

I2S Input

Digital I2S audio interface supports Master mode only, 16-bit data width, and variable sampling rate: 8K/16K/22.05K/24K/32K/44.1K/48K. The sampling rate is determined by I2S clock.

TLSR8258F512 embeds I2S module including I2S Recorder and I2S Player. I2S interface includes one configurable clock line, one data line and one channel selection line. Data generated by the audio codec will be written into FIFO after implementing conversion via I2S Recorder and audio input processing.

USB Host Input

User can select USB Host as audio input. Packet transmitted by USB Host will be written into FIFO after implementing conversion via USB interface and audio input processing.

DFIFO

For any type of audio input path, the data will be finally written into DMA FIFO(DFIFO )0,1 or 2.DFIFO supports auto mode and manual mode. It's highly recommended to select auto mode.

Data Path Target SRAM
DFIFO0 DFIFO1 DFIFO2
DMIC Decimation filter/LPF/Down Sample/HPF/ALC ×
I2S ×
USB ×
Analog CH0 ×
Analog CH1 ×
Analog CH2 × ×

Audio Input Processing Module

Audio input processing mainly includes configurable decimation filter, LPF(Low Pass Filter), Down-sample module, HPF(High Pass Filter) and ALC (Automatic Level Control). all these modules can be enabled or disabled respectively.

Block Diagram of Audio Input Processing Module

Decimation Filter

The decimation filter serves to down-sample the mono or stereo input (e.g. DMIC) data to required audio data playback rate(e.g. 48K or 32K). Down-sampling rate is configurable as 1 ~ 8, 16, 32, 64, 128 or 256 by the related API.

LPF

The LPF serves to conduct frequency compensation.

Down-sample

If the Down-sample module is enabled by the related API, it will down-sample the data from LPF with fixed ratio of 2.

HPF

The HPF serves to eliminate internal DC offset to ensure audio amplifcation range.

ALC

The ALC supports analog mode and digital mode, and it mainly serves to regulate input volume level automaitcally or manually in each mode.

The analog mode is designed only for AMIC input, while the digital mode applies to all audio input types.

In analog mode, input volume level is regualted via PGA; while in digital mode, input volume level is regulated via Multiplier/Divider.

Audio Output Path

Audio output path mainly includes USB, SDMDAC(sigma-Delta Modulation DAC) and I2S player.

  • SDM: The audio data fetched from SRAM is processed by the Rate Matching module, then transferred to the SDM.
  • I2S: Select I2S Player as the output path by the related APIs.
  • USB: Transmit data to USB Host to test audio performance(e.g. SNR or THD).

Audio APIs List

In order to facilitate users to quickly develop products according to their own needs, TSI provide the following related APIs and examples.

APIs list Description Example Update Date Status
audio_config_mic_buf() set address and size of buffer for AMIC or DMIC API-AUDIO-CASE1 2019-1-10 Done
audio_set_dmic_clk() set clock frequency for DMIC API-AUDIO-CASE4 2019-1-10 Done
audio_set_i2s_clk() set clock frequency for I2S API-AUDIO-CASE3 2019-1-10 Done
audio_amic_init() initiate AMIC as audio input path API-AUDIO-CASE2 2019-1-10 Done
audio_dmic_init() initiate DMIC as audio input path API-AUDIO-CASE5 2019-1-10 Done
audio_usb_init() initiate USB as audio input path API-AUDIO-CASE9 2019-1-10 Done
audio_i2s_init() initiate I2S as audio input path API-AUDIO-CASE7 2019-1-10 Done
audio_set_usb_output() set USB as audio output path API-AUDIO-CASE1 2019-1-10 Done
audio_set_i2s_output() set I2S as audio output path API-AUDIO-CASE3 2019-1-10 Done
audio_set_sdm_output() set SDM as audio output path API-AUDIO-CASE5 2019-1-10 Done

TSI provides the following examples of this module to help users quickly understand and apply related modules.

Examples list Description Update Date Status
API-AUDIO-CASE1 AMIC To USB 2019-1-10 Done
API-AUDIO-CASE2 AMIC To SDM 2019-1-10 Done
API-AUDIO-CASE3 AMIC To I2S 2019-1-10 Done
API-AUDIO-CASE4 DMIC To USB 2019-1-10 Done
API-AUDIO-CASE5 DMIC To SDM 2019-1-10 Done
API-AUDIO-CASE6 DMIC To I2S 2019-1-10 Done
API-AUDIO-CASE7 I2S To USB 2019-1-10 Done
API-AUDIO-CASE8 I2S To SDM - Todo
API-AUDIO-CASE9 USB To SDM 2019-1-10 Done
API-AUDIO-CASE10 USB To I2S - Todo

History Record

Date Description Author
2019-1-10 initial release LJW
2019-8-15 update api name for application LJW