Audio IC Feature Support Table

IC features table

Function

RTL8721Dx

RTL8720E

RTL8726E

RTL8713E

RTL8730E

RTL8721F

I2S

Y

Y

Y

Y

Y

Y

AMIC

N

N

Y

Y

Y

N

DMIC

Y

Y

Y

Y

Y

Y

VAD

N

N

N

N

Y

N

PDM

N

Y

Y

Y

Y

N

LINEOUT

N

N

Y

Y

Y

N

HPO

N

N

N

N

Y

N

Introduction

The audio whole block diagram is illustrated below.

Audio block consists of two parts:

  • SPORT: 2x

    • SPORT0 is for internal digital microphone interface and external I2S interface

    • SPORT1 is only for external I2S interface.

  • DMIC

../../../rst_um/peripherals/8_audio/figures/audio_block_diagram_dplus.svg

SPORT

SPORT Data Path

The data paths of SPORT 0/1/2/3 are shown below respectively.

../../../rst_um/peripherals/8_audio/figures/sport0_data_path.svg

SPORT0 data path

../../../rst_um/peripherals/8_audio/figures/sport1_data_path.svg

SPORT1 data path

../../../rst_um/peripherals/8_audio/figures/sport2_data_path.svg

SPORT2 data path

../../../rst_um/peripherals/8_audio/figures/sport3_data_path.svg

SPORT3 data path

Support SPORT0 and SPORT1.

SPORT Function

SPORT Feature

  • General features

    • Supports up to 8-channel I2S transmitter

    • Supports 16/20/24/32 bits data length

    • Supports 16/20/24/32 bits channel length

    • Works in master and slave mode.

    • Supports sampling rate up to 192kHz

    • Support Multi-IO mode, fs up to 192kHz

    Note

    • For RTL8730E, SPORT0/1 not support Multi-IO mode.

  • General functions

    • SPORT fs counter and phase counter under BCLK

      • When using phase counter, rx_bclk_div_ratio/ tx_bclk_div_ratio should be configured to 63.

      • Fs counter is used to count the number of LRCLK.

      • On every falling edge of LRCLK, phase counter would accumulate once in two BCLK cycles by default. On the next falling edge of LRCLK, phase counter will be reset to 0 and then start counting again. At this time, the maximum accumulated value of phase counter is 31.

      • Phase counter also can accumulate once in one BCLK cycle, the maximum accumulated value of phase counter is 63.

      • SPORT fs and phase counter is shown below:

      ../../../rst_um/peripherals/8_audio/figures/sport_fs_and_phase_counter.svg
    • SPORT direct mode feature:

      • Used for data transmission between different sports without CPU and DMA involved in data transfer.

      • When two sports work in direct mode, clock needs to be at the same frequency.

    • SPORT FIFO:

      • TX_FIFO_0 and TX_FIFO_1 are two asynchronous ping-pong FIFO. Each FIFO is depth=32 and width=32, so 2*32*4 bytes=64 words.

      • RX_FIFO_0 and RX_FIFO_1 are two asynchronous ping-pong FIFO. Each FIFO is depth=32 and width=32, so 2*32*4 bytes=64 words.

      • 6/8 channels for data transmission, FIFO0 and FIFO1 would be used. Two FIFOs will request at the same time, and four SPORTs will produce 16 requests at the same time.

    • WIFI TSF latch SPORT counter

      ../../../rst_um/peripherals/8_audio/figures/wifi_tsf_latch_sport_counter.svg

      Hardware latch SPORT counter when it detects a change in the TSFT specified bit, software specifies the bits. The latch period is optional: 1.024/ 2.048/ 4.096 ……/ 131.072.

  • SPORT0 is for internal digital microphone interface and external I2S interface

  • SPORT1 is only for external I2S interface.

  • Not support LRCLK start and stop detect

  • Not support SPORT fs counter and phase counter under SPORT CLK

  • Support WIFI TSF,but not support WIFI TSF start SPORT

I2S Signal Introduction

The I2S bus has three lines:

  • Continuous serial clock (SCK/BCLK)

    • One SCK pulse generates a data bit

    • Master generates SCK

  • Word select (WS/LRCLK)

    The word select line indicates the channel being transmitted:

    • WS = 0: channel 1 (left)

    • WS = 1: channel 2 (right)

    Changes one clock period before the MSB is transmitted

  • Serial data (SD)

    SD is transmitted in two complements with the MSB first. The MSB has a fixed position, whereas the position of the LSB depends on the word length.

    When the system word length is greater than the transmitter word length, the word is truncated (the least significant data bits are set to 0).

    • If the receiver is sent more bits than its word length, the bits after the LSB are ignored.

    • If the receiver is sent fewer bits than its word length, the missing bits are set to zero internally.

I2S Data Format

The I2S interface supports I2S (Philips) format, Left-justified (MSB) format, Right-justified (LSB) format, PCM, and TDM mode. Software can select any mode by setting the I2S control register. The following figures show the I2S data format.

  • I2S format

../../../rst_um/peripherals/8_audio/figures/i2s_format.png

Note

  • Typically, fs = 8/16/32/44.1/48/88.2/96/192/192kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK = Arbitrarily cycles within 1/fs, but >= 2*(N+1) * fs, <= 256 * fs

  • Left-justified format

../../../rst_um/peripherals/8_audio/figures/left_justified_format.png

Note

  • Typically, fs = 8/16/32/44.1/48/88.2/96/192/192kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 2*(N+1)*fs, <= 256 *fs

  • PCM mode A

../../../rst_um/peripherals/8_audio/figures/pcm_mode_a.png

Note

  • Typically, fs = 8/16/32/44.148/88.2/96/192kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 2*(N+1)*fs, <= 256 * fs

  • PCM mode B

../../../rst_um/peripherals/8_audio/figures/pcm_mode_b.png

Note

  • Typically, fs = 8/16/32/44.148/88.2/96/192kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 2*(N+1)*fs, <= 256 * fs

  • I2S TDM 8 mode

../../../rst_um/peripherals/8_audio/figures/i2s_tdm_8_mode.png

Note

  • Typically, fs = 8/16/32/44.1/48kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 8*(N+1)*fs, <= 256 * fs

  • Left-justified TDM 8 mode

../../../rst_um/peripherals/8_audio/figures/left_justified_tdm_8_mode.png

Note

  • Typically, fs = 8/16/32/44.1/48kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 8*(N+1)*fs, <= 256 * fs

  • PCM mode A in TDM 8 mode

../../../rst_um/peripherals/8_audio/figures/pcm_mode_a_in_tdm_8_mode.png

Note

  • Typically, fs = 8/16/32/44.1/48kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 8*(N+1)*fs, <= 256 * fs

  • PCM mode B in TDM 8 mode

../../../rst_um/peripherals/8_audio/figures/pcm_mode_b_in_tdm_8_mode.png

Note

  • Typically, fs = 8/16/32/44.1/48kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 8*(N+1)*fs, <= 256 *fs

  • I2S TDM 6 mode

../../../rst_um/peripherals/8_audio/figures/i2s_tdm_6_mode.png

Note

  • Typically, fs = 8/16/32/44.1/48kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 6*(N+1)*fs, <= 256 * fs

  • Left-justified TDM 6 mode

../../../rst_um/peripherals/8_audio/figures/left_justified_tdm_6_mode.png

Note

  • Typically, fs = 8/16/32/44.1/48kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 6*(N+1)*fs, <= 256 * fs

  • PCM mode A in TDM 6 mode

../../../rst_um/peripherals/8_audio/figures/pcm_mode_a_in_tdm_6_mode.png

Note

  • Typically, fs = 8/16/32/44.1/48kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 6*(N+1)*fs, <= 256 * fs

  • PCM mode B in TDM 6 mode

../../../rst_um/peripherals/8_audio/figures/pcm_mode_b_in_tdm_6_mode.png

Note

  • Typically, fs = 8/16/32/44.1/48kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 6*(N+1)*fs, <= 256 * fs

  • I2S TDM 4 mode

../../../rst_um/peripherals/8_audio/figures/i2s_tdm_4_mode.png

Note

  • Typically, fs = 8/16/32/44.1/48/88.2/96kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 4*(N+1)*fs, <= 256 * fs

  • Left-justified TDM 4 mode

../../../rst_um/peripherals/8_audio/figures/left_justified_tdm_4_mode.png

Note

  • Typically, fs = 8/16/32/44.1/48/88.2/96kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 4*(N+1)*fs, <= 256 * fs

  • PCM mode A in TDM 4 mode

../../../rst_um/peripherals/8_audio/figures/pcm_mode_a_in_tdm_4_mode.png

Note

  • Typically, fs = 8/16/32/44.1/48/88.2/96kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 4*(N+1)*fs, <= 256 * fs

  • PCM mode B in TDM 4 mode

../../../rst_um/peripherals/8_audio/figures/pcm_mode_b_in_tdm_4_mode.png

Note

  • Typically, fs = 8/16/32/44.1/48/88.2/96kHz

  • Channel length: 16/20/24/32 bits (N+1)

  • SCK >= 4*(N+1)*fs, <= 256 * fs

I2S supports 16/20/24/32 bits channel length, the relationship between audio data length and channel length is illustrated below.

../../../rst_um/peripherals/8_audio/figures/i2s_data_length_and_channel_length.png

SPORT Parameters

SPORT parameters

Interface/Format

Sampling rate

Audio bits

Channel

Channel length

BCLK polarity

Serial data

Mode

I2S

192kHz

16 bits

Stereo

16 bits

BCLK

MSB first

Master

Left-justified

96kHz

20 bits

Mono

20 bits

BCLK inverse

LSB first

Slave

PCM Mode A

(Short Frame Sync)

88.2kHz

24 bits

24 bits

PCM Mode A

(Short Frame Sync)

48kHz

32 bits

32 bits

PCM Mode B

(Short Frame Sync)

44.1kHz

PCM Mode B

(Short Frame Sync)

32kHz

16kHz

8kHz

I2S PINMUX

The data PIN DIO[3:0] of I2S can be used as output or input. It can be set as input or output in the corresponding part of I2S in the PAD register. I2S data pinmux is shown below.

../../../rst_um/peripherals/8_audio/figures/i2s_data_pinmux.svg

Audio Codec

General Description

The digital microphone (DMIC) interface is for digital microphone, and supports 2-channel digital microphone recording. The following figure shows the details block of digital microphone interface.

../../../rst_um/peripherals/8_audio/figures/audio_recording_path_configuration.svg

Features

The DMIC interface has the following features:

  • 8kHz/11.025kHz/12kHz/16kHz/22.5kHz/24kHz/32kHz/44.1kHz/48kHz/88.2kHz/96kHz for digital microphone interface

  • Asynchronous sample rate converter (ASRC) for each interface

  • Configurable 0-5 band EQ

  • Adjustable digital volume control

  • For digital volume control, supports zero-crossing detection to minimize audible artifacts

  • DC remove function

Audio Codec Data Path

Recording Data Path

The following figure shows the recording data path of digital microphone interface. In the recording path, the input source is 2-channel DMIC.

../../../rst_um/peripherals/8_audio/figures/digital_microphone_interface_recording_data_path.svg

Playback Data Path

Not support.

Audio Codec Functional Description

Audio Recording

Audio Recording Block

Not support.

Digital Feature of Audio Recording

  • Recording DMIC/AMIC path for sampling rate 8k/11.025k/12k/16k/32k/22.05k/44.1k/48k/88.2k/96kHz

  • ASRC (asynchronous sample rate converter)

  • The ADC digital part supports digital volume control, and the gain is between 48dB and -17.625dB in 0.375dB per step.

  • There is a high pass filter for DC offset

  • Zero-crossing function

    • If the volume is adjusted while the signal is a non-zero value, an audible click can occur, as shown below.

    ../../../rst_um/peripherals/8_audio/figures/click_noise_without_zero_crossing.png

    Click noise without zero crossing

    • In order to prevent this click noise, a zero-crossing function is provided. When enabled, this will cause the volume to update only when a zero crossing occurs, minimizing click noise, as shown below.

    ../../../rst_um/peripherals/8_audio/figures/minimizing_click_noise_with_zero_crossing.png

    Minimizing click noise with zero crossing

    • When the signal is very quiet and consists of mainly of noise, zero crossing cannot be met, now the gain will change with steps, as shown below.

    ../../../rst_um/peripherals/8_audio/figures/gain_update_with_steps_as_zero_crossing.png

    Gain update with steps as zero crossing

  • Equalizer block

    The equalizer block cascades 0-5 bands of equalizer to tailor the frequency characteristics of the recording system according to user preferences and to emulate environment sound.

  • DC remove function block

    A high pass filter is implemented for dc offset. The high pass filter is mainly for ADC recording used. The cut-off frequency of filter is programmable and is varied according to different sample rates. The filter is used to remove DC offset at normal conditions.

  • Silence detector block

    The Silence detector is used to reduce the noise floor for DAC path or ADC path. When the input signal is below silence level, the input signal will be reduced to suppress the background noise. The reducing level can be set by registers.

  • Recording DMIC path for sampling rate 8kHz/11.025kHz/12kHz/16kHz/32kHz/22.05kHz/44.1kHz/48kHz/88.2kHz/96kHz

  • ASRC (asynchronous sample rate converter)

  • When enabling ASRC function, the clock sources from ad_fs and BCLK0 (or BCLK1) are allowed to be asynchronous. The ASRC technology can ensure data accuracy and keep audio performance under clock source asynchronous.

  • The ADC digital part supports digital volume control, and the gain is between 48dB and -17.625dB in 0.375dB/step.

  • There is a high pass filter for DC offset

  • Zero-crossing function

If the volume is adjusted while the signal is a non-zero value, an audible click can occur, as shown in Figure 1-27.

../../../rst_um/peripherals/8_audio/figures/click_noise_without_zero_crossing.png

Figure 1-27 Click noise without zero-crossing

In order to prevent this click noise, a zero-crossing function is provided. When the function enabled, this will cause the volume to update only when a zero-crossing occurs, minimizing click noise, as shown in Figure 1-28.

../../../rst_um/peripherals/8_audio/figures/minimizing_click_noise_with_zero_crossing.png

Figure 1-28 Minimizing click noise with zero-crossing

When the signal is very quiet and consists of mainly of noise, zero-crossing cannot be met, now the gain will change with steps, as shown in Figure 1-29.

../../../rst_um/peripherals/8_audio/figures/gain_update_with_steps_as_zero_crossing.png

Figure 1-29 Gain update with steps as zero-crossing

  • Equalizer block

The equalizer block cascades 0-5 bands of equalizer to tailor the frequency characteristics of the recording system according to user preferences and to emulate environment sound.

  • DC remove function block

A high pass filter is implemented for DC offset. The high pass filter is mainly for ADC recording used. The cut-off frequency of filter is programmable and is varied according to different sample rates. The filter is used to remove DC offset at normal conditions.

  • Silence detector block

The Silence detector is used to reduce the noise floor for DAC path or ADC path. When the input signal is below silence level, the input signal will be reduced to suppress the background noise. The reducing level can be set by registers.

Audio Playback

Not support.Not support.

Audio Playback Block

Not support.

Digital Feature of Audio Playback

Not support.

VAD_PITCH

  • Not support VAD_PITCH

VAD_PITCH Features

VAD (Voice Activity Detection) is a low-energy voice detect IP. It supports voice trigger. Once the VAD function is enabled, it will automatically sample the voice and detect the voice energy above the threshold value or not, even the processor is in sleep mode.

The overall design of VAD mainly includes two aspects, one is the generation of wake-up interrupt, to wake up the processor; the other is the transmission of voice data after wake-up, to let the processor timely access to audio data for keyword recognition.

VAD data source may be up to four analog microphones, and up to eight digital microphones. The VAD can configure software to choose which audio source to use as input. An APB configuration interface is also supported. When the VAD successfully recognizes a human voice in CPU low power mode, an interrupt is generated and reported to the CPU.

SRAM is used to store audio data buffer during power consumption. It is 128KB in size and supports 64 bits read/write. The data source is parallel to the VAD’s audio data source and is also audio data after the MUX.

At the same time, SRAM can also be read and written by KM0, KM4 and CA32 at workflow.

Register