1 version 2 introduction 3 glossary - maestroupdate.maestro-wireless.com/m100/m1003g/sierra app note...

51
SL8x OAT Audio Tuning Guide 2174046-01.06-DRAFT Author: Sierra Wireless Date: January 6, 2015 APN Content Level BASIC INTERMEDIATE ADVANCED Confidentiality Public Private Hardware Compatibility Product Line AirPrime Series SL808xT SL808xBT SL808xBTA Software Compatibility From OAT FW 753 2174046 Rev 01.06-DRAFT January 6, 2015 1 1 Version Application Notes may be updated over their lifetime. To ensure you design with the correct version, please check the application notes page in http://developer.sierrawireless.com for latest versions. 2 Introduction This Application Note (APN) is provided to Sierra Wireless distributors and clients to aid more rapid development of embedded applications using the Sierra Wireless portfolio of cellular solutions. To request a new application note, contact your regional Sierra Wireless Product Marketing Manager. 3 Glossary Acronym Description AAGC Audio Automatic Gain Control AEC Acoustic Echo Canceller AF Adaptive Filter AGC Automatic Gain Control AVC Automatic Volume Control EC Echo Canceller ERP Ear Reference Point FIR “Finite Impulse Response” is a filter whose impulse response (or response to any finite length input) is of finite duration, because it settles to zero in finite time. MMI Man to Machine Interface MRP Mouth Reference Point NLP Nonlinear Process NB Narrowband audio usually considered to cover frequencies 3003400 Hz NS Noise Suppressor PCM Pulse Code Modulation POI Point of Interconnection (with PSTN) QDV Qualcomm DSP Viewer Rx-path, or Rx Forward-link, Far-end speech, or speaker path S/N Signal to Noise ratio Tx-path, or Tx Reverse-link, Near-end speech, or microphone path WB Wideband audio relaxes the bandwidth limitation and transmits in the audio frequency range of 50 Hz to 7 kHz or higher

Upload: phamkhanh

Post on 18-May-2018

215 views

Category:

Documents


2 download

TRANSCRIPT

SL8x OAT Audio Tuning Guide

2174046-01.06-DRAFT

Author: Sierra Wireless Date: January 6, 2015

APN Content Level BASIC INTERMEDIATE ADVANCED Confidentiality Public Private

Hardware Compatibility

Product Line AirPrime Series SL808xT SL808xBT

SL808xBTA

Software Compatibility From OAT FW 753

2174046 Rev 01.06-DRAFT January 6, 2015 1

1 Version

Application Notes may be updated over their lifetime. To ensure you design with the correct version, please check the application notes page in http://developer.sierrawireless.com for latest versions.

2 Introduction

This Application Note (APN) is provided to Sierra Wireless distributors and clients to aid more rapid development of embedded applications using the Sierra Wireless portfolio of cellular solutions. To request a new application note, contact your regional Sierra Wireless Product Marketing Manager.

3 Glossary

Acronym Description

AAGC Audio Automatic Gain Control

AEC Acoustic Echo Canceller

AF Adaptive Filter

AGC Automatic Gain Control

AVC Automatic Volume Control

EC Echo Canceller

ERP Ear Reference Point

FIR “Finite Impulse Response” is a filter whose impulse response (or response to any finite length input) is of finite duration, because it settles to zero in finite time.

MMI Man to Machine Interface

MRP Mouth Reference Point

NLP Nonlinear Process

NB Narrowband audio usually considered to cover frequencies 300–3400 Hz

NS Noise Suppressor

PCM Pulse Code Modulation

POI Point of Interconnection (with PSTN)

QDV Qualcomm DSP Viewer

Rx-path, or Rx Forward-link, Far-end speech, or speaker path

S/N Signal to Noise ratio

Tx-path, or Tx Reverse-link, Near-end speech, or microphone path

WB Wideband audio relaxes the bandwidth limitation and transmits in the audio frequency range of 50 Hz to 7 kHz or higher

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 2

4 References

Reference # Document Number Description

R1 TIA/EIA/IS-127-1 Enhanced Variable Rate Codec, Speech Service option 3 for Wideband Spread Spectrum Digital Systems, Addendum 1.

R2 80-VB076-1 QUALCOMM® DSP Viewer (QDV) User Guide (QDV1.0.00)

R3 3GPP TS 26.131 3rd Generation Partnership Project; Technical Specification Group Services and System Aspects;Terminal Acoustic Characteristics for Telephony; Requirements

R4 ETSI TS 126 132 Speech and video telephony terminal acoustic test specification

R5 ITU-T P.79 Calculation of loudness ratings for telephone sets

R6 4111843 AT Commands Interface Guide for Firmware 7.53

5 Definitions

Item Description

Q-number

Qm.n

Q is a fixed point number format where the number of fractional bits (and optionally the number of integer bits) is specified. For example, a Q15 number has 15 fractional bits; a Q1.14 number has 1 integer bit and 14 fractional bits.

The Q notation is written as Qm.n, where:

‘Q’ designates that the number is in the Q format notation.

‘m’ is the number of bits set aside to designate the two's complement integer portion of the number, exclusive of the sign bit (therefore if m is not specified it is taken as zero).

‘n’ is the number of bits used to designate the fractional portion of the number, i.e. the number of bits to the right of the binary point. (If n = 0, the Q numbers are integers – the degenerate case).

Note that the most significant bit is always designated as the sign bit (the number is stored as a two's complement number) in order to allow standard arithmetic-logic hardware to manipulate Q numbers. Representing a signed fixed-point data type in Q format therefore always requires m+n+1 bits to account for the sign bit. Hence the smallest machine word size required to accommodate a Qm.n number is m+n+1, with the Q number left justified in the machine word.

For a given Qm.n format, using an m+n+1 bit signed integer container with n fractional bits:

its range is [-2m, 2m - 2-n]

its resolution is 2-n

For example, a Q14.1 format number:

requires 14+1+1 = 16 bits

its range is [-214, 214 - 2−1] = [-16384.0, +16383.5] = [0x8000, 0x8001 … 0xFFFF, 0x0000, 0x0001 … 0x7FFE, 0x7FFF]

its resolution is 2−1 = 0.5

Unlike floating point numbers, the resolution of Q numbers will remain constant over the entire range.

6 Document Structure

This application note describes the audio design guidelines to optimize the implementation of hardware, gains and algorithms tuning of the AirPrime SL808xT, SL808xBT and SL808xBTA embedded module. The document is subdivided into the following sections:

Audio Design Guidelines

Block Diagram of the Audio Section

Description of Gains and Algorithms

Gain Calibration

Tuning Algorithm Parameters

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 3

Reference Gain and EC Settings

7 Audio Design Guidelines

The AirPrime SL808xT, SL808xBT and SL808xBTA module supports an analog audio interface and a digital audio interface (PCM). This section mainly provides guidelines on how to optimize the analog audio interface.

Several items have to be considered to be able to achieve optimum performance in an audio system, which includes:

1. minimizing noise and allowing flexibility,

2. ensuring signals are never distorted (clipped) through proper gain distribution, and

3. optimizing audio levels in all interfaces and blocks to maximize the utilization the available dynamic range.

7.1 Optimizing the HW Implementation

The analog audio interface of the SL808xT, SL808xBT and SL808xBTA module provides one differential line level input and one differential line level output.

7.1.1 AUDIO_IN_P/M

The SL808xT, SL808xBT and SL808xBTA analog input interface is AC-coupled to block bias current. The interface does not provide a microphone bias voltage to the application. Any microphone bias voltage will have to be generated by the application, and as long as it is ≤8V, no coupling capacitors are required in the application.

100nF

100nF

≥ 1M

AUDIO_IN_P

AUDIO_IN_M

SL808xApplication

AC

AUDIO_IN_x Overview Figure 1.

To take advantage of the whole dynamic range and maximize the S/N-ratio, it is strongly recommended that the application implement the AUDIO_IN interface differentially.

Table 1 AUDIO_IN_x Parameters

Signal Parameter Notes Value Units

AUDIO_IN_P/M

Full-scale input level

AT+VGT ≤0 dB; f = 1.02 kHz; internal gains ≤0dB

Differential input signal to get 0 dBFS

0 dBV

1.0 Vrms

AT+VGT ≤0 dB; f = 1.02 kHz

Single-ended input signal to get -4.5 dBFS

-4.5 dBV

0.6 Vrms

Input impedance All gain modes 50 Hz to 7.0 kHz ≥1.0 MΩ

Cutoff frequency Input high-pass filter ≤16 Hz

Input DC-bias level Vbias referenced to GND ≤8 V

Common-mode rejection ration

IN_P = IN_M = -20 dBFS at 1 kHz (same signal is applied to both pins)

>45 dB

Rx to Tx crosstalk attenuation

Tx path measurement with -5 dBFS Rx-path signal; f = 1 kHz >90 dB

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 4

7.1.2 AUDIO_OUT_P/M

The SL808xT, SL808xBT and SL808xBTA AUDIO_OUT_P/M interface is a differential DC-coupled line-level analog output. For stability reasons it is recommended that the application provide a 20kΩ differential load between AUDIO_OUT_P and AUDIO_OUT_M.

AUDIO_OUT_P

AUDIO_OUT_M

20kΩ

SL808xApplication

AC

AUDIO_OUT_x Overview Figure 2.

Table 2 AUDIO_OUT_x Parameters

Signal Parameter Notes Value Units

AUDIO_OUT_P/M

Full-scale output level

Differential line output

f = 1.02 kHz; 0 dBFS

+6 dBV

2.0 Vrms

Single-ended line output

f = 1.02 kHz; 0 dBFS

0 dBV

1.0 Vrms

Load impedance Recommended differential load tolerance ±20% 20 kΩ

Recommended single-ended load tolerance ±20% 10 kΩ

SNR Ratio of full-scale output to output noise level >92 dB

Tx to Rx crosstalk attenuation

Rx path measurement with -5 dBFS Tx-path signal. f = 1 kHz >90 dB

7.1.3 Application HW Design Recommendations

To minimize noise and optimize the dynamic range usage, it is recommended to utilize differential audio implementation even if the source is single ended. The figures in the following sub-sections show the basic recommended implementations. Note that these figures do not include EMI, ESD, or any other circuitry that might be required.

The recommended amplifiers in the designs below are:

THS4131 from Texas Instruments for any implementation that requires a differential output

TLC227x from Texas Instruments for any implementation that requires a single-ended output

Other components can be used if the suggested ones do not meet the specific application requirements.

Audio frequency bandwidth:

NB = 300 Hz to 3.4 kHz

WB = 50 Hz to 7.0 kHz

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 5

Table 3 Filter Characteristics of the Recomended Design

Name Filter Type Components Cut-off Frequency Notes

HPF1 First order High pass filter C1 / R1 30 ±10Hz

DC-block and wind noise filter

𝑓𝑐 =1

2𝜋 × 𝑅1 × 𝐶1

LPF1 First order Low pass filter C2 / R2 9.0 ±1kHz

Stability and pre-aliasing filter

𝑓𝑐 =1

2𝜋 × 𝑅2 × 𝐶2

LPF2 First order Low pass filter C3 / R3 >20 kHz

Optional noise filter eliminating application internal noise sources (clock, data)

𝑓𝑐 =1

2𝜋 × 2𝑅3 × 𝐶3

7.1.4 Tx-Path

Recommendations for four different design implementations are described below:

1. Direct microphone support

2. Microphone with external pre-amplifier (preferred)

3. Differential line level (preferred)

4. Single-ended line level

Direct Microphone Differential Implementation 7.1.4.1

This implementation is only recommended if the microphone is located in close proximity to the SL808xT, SL808xBT or SL808xBTA. In this case all gain is applied in the SL808xT, SL808xBT or SL808xBTA. Ensure to apply all positive gain before the EC in the codec (AT+VGT). This will ensure that the bulk of the gain is applied in the analog domain improving the voice

quality.

Cx

CxRbias

Rbias

AUDIO_IN_P

AUDIO_IN_M

Rbias

Rbias

AUDIO_IN_P

AUDIO_IN_M

Vbias ≤8V Vbias >8V

Direct Microphone with Differential Bias Design Recommendations Figure 3.

By splitting the microphone bias resistors up equally (same resistor values) the microphone signal can be connected differentially to the SL808xT, SL808xBT or SL808xBTA audio input. This ensures that the impedance is the same on both signals, and if routed in parallel, any noise subjected to the traces will be in phase and of the same amplitude. The noise will then be cancelled in the differential input amplifier inside the SL808xT, SL808xBT or SL808xBTA.

Direct Microphone Single-Ended Implementation 7.1.4.2

This implementation is only recommended if the microphone is located in close proximity to the SL808xT, SL808xBT or SL808xBTA and where the negative side of the microphone is directly connected to ground.

In this case all gain is applied in the SL808xT, SL808xBT or SL808xBTA. Ensure to apply all positive gain before the EC in the codec (AT+VGT). This will ensure that the bulk of the gain is applied in the analog domain improving the voice quality.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 6

AUDIO_IN_P

AUDIO_IN_M

Rbias

Vbias ≤8V

AUDIO_IN_P

AUDIO_IN_M

Rbias Cx

Cx

Vbias >8V

Direct Microphone with Single-Ended Design Recommendations Figure 4.

AUDIO_IN_M should be routed in parallel to AUDIO_IN_P and connected to ground as close as possible to the negative side of the microphone. Capacitors CX shall be placed as close as possible to the SL808xT, SL808xBT or SL808xBTA.

Microphone with Pre-Amp Implementation 7.1.4.3

This microphone implementation uses an external microphone pre-amp and is the preferred implementation. For optimal performance, the amplifier should be placed as close to the microphone as possible. There are two gain stages in this design where the initial stage amplifies the microphone level, and the second stage attenuates the signal down to an optimal level for the SL808xT, SL808xBT or SL808xBTA.

Indicates where any

potential trace

length should be

applied.

VCC

R2

R2

R1

R1

C2

C2

C1

C1Rbias

Rbias

Vbias

R3

R4

R3

AUDIO_IN_P

AUDIO_IN_M

C3

HPF1

LPF1

LPF2

G1

G2

THS4131

OM

OP

IP

IM

VCC

GND

Microphone with Pre-Amp Design Recommendation Figure 5.

It is recommended that the initial gain stage amplifies the signal up to the maximum possible level with a 3dB margin.

Assuming VCC is +12V, it is recommended to amplify the microphone signal so that the maximum peak-to-peak level is 3dB below VCC (8.5Vpp). The differential input level on AUDIO_IN_x is 0dBV (1.0Vrms) which is 2.8Vpp. The second stage should have a gain of -9.6dB in this case.

Initial gain stage gain formula:

𝐺1 = 20 × log (𝑅2

𝑅1) , 𝑤ℎ𝑒𝑟𝑒 𝑅1 ≫ 𝑅𝑏𝑖𝑎𝑠

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 7

Secondary gain stage gain formula:

𝐺2 = 20 × log (𝑅4

2𝑅3 + 𝑅4)

The main benefit of this design is that the audio level can be set by only changing R4. Changing R4 does not affect any filter characteristics; the only thing it affects is the differential level between AUDIO_IN_P and AUDIO_IN_M.

Microphone with Built-In Pre-Amp Implementation 7.1.4.4

This is the preferred implementation when using a microphone with a built-in pre-amplifier.

Ensure that the maximum echo level from the speaker does not saturate the microphone itself. The only way to recover from this is to have the microphone manufacturer either lower the sensitivity of the microphone element, or lower the built-in microphone pre-amplifier gain.

Indicates where any

potential trace

length should be

applied.

VCC

R2

R2

R1

R1

C2

C2

C1

C1

Rbias

Vbias

R3

R4

R3

AUDIO_IN_P

AUDIO_IN_M

C3

HPF1

LPF1

LPF2

G1

G2

GTHS4131

OM

OP

IP

IM

VCC

GND

Microphone with Built-In Pre-Amp Design Recommendation Figure 6.

The initial gain stage (G1) can be excluded if the total gain (G1 + G2) is negative. In this case, leave coupling capacitors C1 in the design and ensure that R3 >> Rbias.

Initial gain stage gain formula:

𝐺1 = 20 × 𝑙𝑜𝑔 (𝑅2

𝑅1) , 𝑤ℎ𝑒𝑟𝑒 𝑅1 ≫ 𝑅𝑏𝑖𝑎𝑠

Secondary gain stage gain formula:

𝐺2 = 20 × 𝑙𝑜𝑔 (𝑅4

2𝑅3 + 𝑅4)

The main benefit of this design is that the audio level can be set by only changing R4. Changing R4 does not affect any filter characteristics; the only thing it affects is the differential level between AUDIO_IN_P and AUDIO_IN_M.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 8

Differential Line Level 7.1.4.5

This implementation follows the same guidelines as those specified in section 7.1.4.3 Microphone with Pre-Amp Implementation.

Indicates where any

potential trace

length should be

applied.

AC

VCC

R2

R2

R1

R1

C2

C2

C1

C1

R3

R4

R3

AUDIO_IN_P

AUDIO_IN_M

C3

LPF2

LPF1

HPF1

G1

G2

THS4131

OM

OP

IP

IM

VCC

GND

Differential Line-In Design Recommendation Figure 7.

Single-Ended Line Level 7.1.4.6

This implementation follows the same guidelines as those specified in section 7.1.4.4 Microphone with Built-In Pre-Amp Implementation.

Indicates where any

potential trace

length should be

applied.

AC

VCC

R2

R2

R1

R1

C2

C2

C1

C1

R3

R4

R3

AUDIO_IN_P

AUDIO_IN_M

C3

HPF1

LPF1

LPF2

G1

G2

THS4131

OM

OP

IP

IM

VCC

GND

Single-Ended Line-In Design Recommendation Figure 8.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 9

7.1.5 Rx-Path

Recommendations for two different audio output design implementations are described below:

1. Output with external pre-amplifier differential speaker interface

2. Output with external pre-amplifier single-ended interface

Differential Speaker Interface 7.1.5.1

The audio from the AirPrime SL808xT, SL808xBT and SL808xBTA is output differentially. The following figure shows a flexible implementation that is recommended if the distance from the SL808xT, SL808xBT or SL808xBTA and the loudspeaker PA is long. Apply gain in G1 so that a maximum differential output (+6dBV, 2.0Vrms, 5.66Vpp) is amplified to be VCC -3dB. The signal is then attenuated in G2 as close to the loudspeaker PA as possible. G1 and G2 can be individually excluded if gain and/or attenuation outside the loudspeaker PA is not required.

AC

VCC

R2

R2

R1

R1

C2

C2

C1

C1

R3

R4

R3

AUDIO_OUT_P

AUDIO_OUT_M

C3THS4131

OP

OM

IP

IM

VCC

GND

PA

C5

C5

G (dB)R5RL

Indicates where any

potential trace

length should be

applied.

G1

HPF1

LPF1

G2

LPF2

Differential Loudspeaker PA I/F Design Recommendation Figure 9.

The main benefit of this design is that the audio level can be set by only changing R4. Changing R4 does not affect any filter characteristics; the only thing it affects is the differential level between AUDIO_IN_P and AUDIO_IN_M.

Single-Ended Speaker Interface 7.1.5.2

To minimize noise in an implementation where the input to the loudspeaker PA is single ended, i.e. AUX I/F, it is required to implement a differential to single ended conversion gain stage (G1).

It is recommended to locate G1 as close to the loudspeaker PA input as possible, running the SL808xT, SL808xBT or SL808xBTA AUDIO_OUT_x signals as a differential pair.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 10

AC

VCC

R2

R2

R1

R1

C2

C2

C1

C1

AUDIO_OUT_P

AUDIO_OUT_M

RL

Indicates where any

potential trace

length should be

applied.

C5

PA

G (dB)R5

G1

LPF1

HPF1

THS4131

OM

OP

IP

IM

VCC

GND

CC

Single-Ended Loudspeaker PA I/F Design Recommendation Figure 10.

Gain formula:

𝐺1 = 20 × 𝑙𝑜𝑔 (𝑅2

𝑅1)

7.2 Optimizing the System Implementation

The following sections describe each audio block and the parameter settings that affect them, as well as describe how important proper gain settings for each block is and to the overall performance of the whole system.

7.2.1 Poor Gain Setting Implementation

An example of a poor gain setting implementation is shown in the following figure. The signal is kept at a low non distorted level at the input of the EC-block and the EC filter uses this signal to build its echo model. Excessive gain has to be applied after the echo canceller to achieve a proper acoustical level at the ERP (Ear Reference Point), causing the signal to be distorted. Similarly, an excessive microphone gain is applied before the EC-block, causing the already distorted speaker signal echo to further distort before reaching the echo canceller.

Echo Canceller

Filte

r

+NLP Gain

Gain

Echo channel

modeled by EC-filter

Signal saturated/distorted

due to large gain

Rx path signal

Signal saturated/distorted

again due to large gain

Echo inaccurately

modeled

Echo not completely

cancelled

Bad design – the Rx-gain

after EC and/or Tx-gain

before EC results in non-

linear distortion of echo

and cannot be accurately

modeled by EC.

Poor Gain Setting Implementation Figure 11.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 11

This causes the Forward-link audio signal to be vastly different from the estimated signal calculated from the Reverse-link audio in the EC-Filter due to the nonlinearity of the echo path, resulting in poor echo cancellation.

7.2.2 Good Gain Setting Implementation

An example of a good gain setting implementation is shown in the following figure. The signal is amplified before the input of the EC-block, and the EC filter uses this signal to build its echo model. Similarly, the microphone gain is set not to cause additional distortion. The modeled echo matches the true echo.

Echo Canceller

Filte

r

+NLPGain

Gain

Echo channel

modeled by EC-filter

Signal saturated

due to large gainRx path signal

Echo signal seen by the EC

Echo accurately

modeled

Echo cancelled

Good design – the Rx-gain

is applied before EC and

Tx-gain is applied after EC.

The speaker should not

distort. The microphone

should not saturate.

Acoustic output

generated accurately

(no distortion /

clipping)

Good Gain Setting Implementation Figure 12.

This causes the Forward-link audio signal to match the estimated signal calculated from the Reverse-link audio in the EC-Filter, resulting in good echo cancellation.

7.2.3 Volume Control Implementation

There are three ways to implement volume control:

1. Internal Volume Control (loudspeaker volume is adjusted inside the SL808xT, SL808xBT or SL808xBTA using the AT+CLVL command)

2. External Volume Control (loudspeaker volume is adjusted in the customer application. This is the most common vehicle implementation, where the volume is controlled through the vehicle entertainment system)

3. Automatic Volume Control (The AVC inside the SL808xT, SL808xBT or SL808xBTA automatically adjusts the volume based on background noise level measurements)

Internal Volume Control 7.2.3.1

This is the preferred implementation since it allows for the input to the AF in the Rx-path to be directly proportional to the generated echo seen on the AF input of the Tx-path (see section 7.2.5 AF Level Adjustment for more information).

When the user changes the speaker volume using the application MMI (car-stereo, steering wheel, etc.), it will adapt the changes and forward the information to the SL808xT, SL808xBT or SL808xBTA, using the AT+CLVL command, which in turn

will change the volume in the internal RxVolume block using the pre-defined levels of the RxVolume table.

The recommended RxVolume table (+CLVL gain) for an internal volume control implementation is listed below:

AT+CLVL index Gain

0 -50 dB (mute)

1 -16 dB

2 -10 dB

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 12

AT+CLVL index Gain

3 -4 dB

4 0 dB (nominal)

5 4 dB

6 8 dB

7 12 dB

Please refer to section 12.1.4 for RxVolume gain table configuration.

One advantage of this implementation is that it allows for better EC performance by optimizing the levels of the AF. However, the disadvantages include being limited to the eight (0-7) available adjustment levels (AT+CLVL=<level>) and requiring a

more advanced implementation, where the volume control MMI of the application must be converted and sent to the SL808xT, SL808xBT or SL808xBTA using AT+CLVL.

External Volume Control 7.2.3.2

In this implementation, the RxVolume is controlled external from the SL808xT, SL808xBT or SL808xBTA, which means that the internal RxVolume in the SL808xT, SL808xBT or SL808xBTA is fixed.

Automatic Volume Control 7.2.3.3

Section 5.2.3 “Connections with Desktop and Vehicle-mounted hands-free UE” of document 3GPP TS 26.131 recommends that the RxVolume have its maximum gain being >15dB above selected nominal.

“Where a user controlled volume control is provided, the RLR shall meet the nominal value at one setting of the control. It is recommended that a volume control giving at least 15 dB increase from the nominal RLR (louder) is provided for hands-free units intended to work in the vehicle environment. This is to allow for the increased noise volume in a moving vehicle.”

This recommendation is provided through the AVC feature (see section 9.1.2 AVC (Automatic Volume Control) for more information), which has the capability of adding 18dB gain when going from a quiet to a noisy environment. This would theoretically allow the nominal volume to be fixed.

The recommended RxVolume table for an automatic volume control implementation is listed below:

AT+CLVL index Gain

0 -50 dB (mute)

1 -9 dB

2 -6 dB

3 -3 dB

4 0 dB (nominal)

5 3 dB

6 6 dB

7 9 dB

Please refer to section 12.1.4 for RxVolume gain table configuration.

7.2.4 Determining Gain Distribution

For the echo canceller algorithm to operate optimally, the audio characteristics from the Forward-link EC to the loudspeaker, echoed back to microphone, and up the Reverse-link, must be linear. Any nonlinearity such as saturation, distortion, mechanical vibrations, etc. will degrade the echo model created by the adaptive filter resulting in a more aggressive nonlinear process being required, which in turn will degrade double talk performance.

Typical nonlinearities seen in a design include:

Acoustical, electrical or digital saturation in the speaker path due to excessive gain.

Acoustical, electrical or digital saturation of the return echo at the microphone.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 13

Acoustic speaker distortion due to the speaker’s inability to generate the desired acoustic output.

Acoustic vibration due to inadequate isolation or dampening between the acoustic transducers and other components.

Voice Characteristics 7.2.4.1

Sound or voice levels are defined in dBPa. The typical average speech level in sending (Tx) direction is -4.7dBPa. This represents the rms level of the used speech. The peak levels of this signal must be taken into consideration so that these peak levels do not exceed the available dynamic range (supply levels).

There are three items that need to be considered when determining the possible peak levels:

1. Crest factor of speech

2. Lombard effect on speech

3. Acoustical environmental tolerances

Speech Crest Factor 7.2.4.2

The definition of Crest Factor is “a measure of a waveform showing the ratio of peak levels to the average levels”.

Crest Factor Overview Figure 13.

The crest factor of speech can be as high as 15dB. That means that headroom of at least 15dB has to be accounted for in the link budget when determining the microphone gain.

Crest Factor of Speech Figure 14.

Lombard Effect 7.2.4.3

The Lombard effect or Lombard reflex is the involuntary tendency of speakers to increase their vocal effort when speaking in loud noise to enhance the audibility of their voice. This change includes not only loudness but also other acoustic features such as pitch, rate, and duration of sound syllables. This compensation effect results in an increase in the auditory signal-to-noise ratio of the speaker’s spoken words.

Changes between normal and Lombard speech include:

increase in phonetic fundamental frequencies,

shift in energy from low frequency bands to middle or high bands,

increase in sound intensity,

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 14

increase in vowel duration,

spectral tilting,

shift in formant center frequencies,

duration of content words are prolonged to a greater degree in noise than function words, and

greater lung volumes are used.

The compensational headroom required to account for the Lombard effect depends on the expected background noise level in the targeted environment.

It is recommended to account for a 12dB to 18dB increase of the speakers’ voice in the link budget to compensate for the noise generated in a standard vehicle travelling at a speed of 130 kph (80mph).

Acoustical Environment Tolerances 7.2.4.4

There are two elements to consider when looking into what can affect the required tolerances:

1. Variation in MRP to microphone between the nominal and the minimum anticipated distance.

2. Echo path gain from speaker to microphone and the effects of the acoustical enclosure and the type (directionality) of the microphone used. The only way to get a correct gain is to measure it in the target environment.

Echo Path Gain 7.2.4.5

To compensate and correct the gains in the total solution, and to be able optimize the EC-parameters, the acoustical echo environment of the customer application must be characterized.

The maximum echo gain over the active frequency range must be known and compensated for. The setup for the application frequency response measurement is shown in the figure below, together with the normal effects on sound by different objects in the vehicle acoustic chamber.

Vehicle Acoustic Chamber

AUDIOx_IN_P

AUDIOx_IN_M

AUDIOx_OUT_P

AUDIOx_OUT_M

AC

MIC1 MIC2

PA

Echo

AV

Meter

Application Module

PreAmp

Cloth coverings

absorb sound

Windows

reflect sound Dashboard causes

peaks and dips

Seats change

frequenciesCarpeted areas suppress

mid frequencies

ERP RLR

MIC_GAIN

SPKR_GAIN

Vehicle Cabin Echo Frequency Response Setup Figure 15.

The echo characterization of the application is done without the module being mounted in the application. Set the application volume to maximum level (where RLR is at desired minimum) if using an external volume implementation.

The Full-scale output level of the SL808xT, SL808xBT and SL808xBTA is applied to AUDIOx_OUT, either differentially or single-ended, depending on the application implementation. The frequency response is measured on AUDIOx_IN, and should not exceed the Full-scale input level of the SL808xT, SL808xBT and SL808xBTA at any frequency.

The reason a Full-scale level is used is to guarantee that there are no nonlinearities in the echo path. If the signal becomes distorted, find where in the echo path it occurs and try to correct the problem.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 15

Vehicle Cabin Echo Frequency Response Example Figure 16.

The microphone gain of the application will have to be decreased by the same amount that any frequency response level exceeds 0dB. As can be seen in the example shown in the figure above, the microphone gain must be decreased by 10dB to not clip the input stage of the module.

The measure Echo Gain can be entered into the Audio Linkbudget to get a more accurate simulation.

7.2.5 AF Level Adjustment

It is important for the AF that the gains are distributed correctly and that they are set so that there is minimum nonlinear distortion from Rx EC-block (x[k]) to Tx EC-block (z[k]).

Acoustic

Echo Gain

ERP

MRP

MIC

_G

AIN

SP

KR

_G

AIN

Output

Gain

Input

Gain

NLPP

_Gain

z[k]

x[k]

AF

TxDRC

TxAIG

TxFIR

TxIIR

TxVolume

RxVolume

POI

RxDRC

RxAIG

RxFIR

RxIIR

EC

RxGain

TxGain

Rx_

Lin

e O

ut

SL808xApplication

EC Gain Lineup Figure 17.

There can be nonlinear speech in the shaded blocks without affecting the AF, but it will have a negative effect on TMOS (voice quality) results.

The AF requires that the Rx signal going into the adaptive filter must be greater than the echo that is to be cancelled. For this reason, it may be necessary to adjust the levels going into and out of the AF without changing the overall gain of the Rx and Tx signals. The AF is capable of providing a maximum of 21dB of echo attenuation, so it is important to keep the x[k] level as high as possible without causing distortion.

Figure 18 Audio Block Diagram illustrates the gain lineup. It shows the points x[k] in the Rx-path and z[k] in the Tx-path. Because the adaptive filter coefficients may only have a value of unity (1) or less, the signal level at x[k] must be greater than the level at z[k].

-5

0

5

10

15

Ech

o G

ain

(d

B)

Frequency (Hz)

Echo Frequency Response (AUDIOx_OUT to AUDIOx_IN)

AUDIOx_OUT (diff)

AUDIOx_IN (diff)

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 - DRAFT January 6, 2015 16

If z[k] is larger than x[k], then the adaptive filter will not operate to its full potential for echo cancellation and so the gain prior to z[k] must be decreased by the amount that it is larger than x[k]. If gain adjustments are necessary, decrease the gain in the microphone amplifier (try not to have AvCodecMicTxG or AvTxG set to less than 0 dB). Compensate the lowered gain with an identical increase in the OutputGain of the EC (parameter 6 in the AT+ECHO command), or in TxVolume. It is recommended to

keep x[k] +6dB relative to z[k].

7.2.6 Link Budget

To help determine the gain distribution, a link budget spreadsheet is provided below. This spreadsheet takes into account the sensitivity of the acoustic elements and the distances between them including:

distance from MRP to microphone

distance from speaker to ERP

distance from speaker to microphone

The spreadsheet also takes into account the crest factor as well as compensating for the Lombard effect.

AirPrime - SL808x - Link Budget Spreadsheet.xlsx

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 17

8 Block Diagram

AirPrime SL808xT, SL808xBT, SL808xBTA

CODEC VOICE Pre-Processing

ADC

ST_GA

IN

AT+SIDET

AT+WAGC

To Host PCM client

AT+CLVL

AT+ECHO

AT+WAGC

AT+VGT

AT+VGR

DACLineOut

HPF

HPF/Slope

PC

M_L

OO

PB

AC

K

PCF IF

PCM IF

AT+WADF AT+WDGT

NS & AAGC

TX FIR

AT+WDTMF

DTMF Detection

AT+WDTMF

DTMF Generation

ESECor

AEC

Audio Loopback

RX FIR AAGC

FREFRHR

AMREncoder

FREFRHR

AMRDecoder

AT&T

AT+WADF

MICGAIN

AT+VGT

RX path

TX path

Audio Block Diagram Figure 18.

Green blocks are items that the end user can update or change during an active call (using AT commands).

Yellow blocks are items that are determined by the OEM during development (also using AT commands), but not changed during normal operations.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 18

9 Description of Gains and Algorithms

To ensure optimum Echo Cancellation (EC) performance, the gains, volumes, and limits must be properly adjusted. Refer to Figure 18 Audio Block Diagram above for detailed audio block diagram.

9.1 Rx-Path (Forward-link)

The gains set in these blocks, excluding RxGain, determine the levels seen by the EC-block and are critical to its operation. These gains are not used to compensate for the final level of the speaker. Those gains will be set in the “Application Gain & PA”-block, or in RxGain.

9.1.1 Rx AGC

To

Codec

Input

GainAGCAVC

RX

PCM

filter

RX_Volume

From

vocoder

decoder

rxAgcEnableFlag

compFlinkStaticGain

compFlinkAIGFlag

rxAgcEnableFlag

compFlinkThreshold

compFlinkSlope

expFlinkThreshold

expFlinkSlope

rxAvcEnableFlag

avcRlinkSensitivityOffset

avcFlinkHeadroom

From EC

Tx Out Rx AAGC

Rx AAGC Gains Figure 19.

The Rx-AGC enhances the forward link speech quality. Applications often have difficulty finding the right sound level due to loudness variations in the far-end speaker’s voice, automated voicemail recordings, and analog phone, landline, and mobile phone signals. The Rx-AGC compensates for this variation.

The Rx AAGC allow for greater control over the audio signal, but introduce non linear processing that may impact speech quality measures.

The default setting for the AGC follows the curves illustrated below.

Lo

ut(d

Bm

0)

Lin(dBm0)

Ethresh Cthresh 00

-75-21-60

Static-level curve

-75

Lin(dBm0)

Ethresh Cthresh 0

0

+3

-20

G(d

B)-5

-21-60

Static-gain curve

-75

Eslope

CslopeEslope

Cslope

AGC Compression/Expansion Curve Example Figure 20.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 19

AT command AT+WAGC sets and queries the Rx AGC parameters. If Rx AGC is activated, the recommended settings listed in

Table 4 should be used for all parameters, except in extreme circumstances. These parameters do not affect the EC performance.

Table 4 Rx AAGC Common Configuration Parameter List

Register AT Command

Recommended value

Description

link AT+WAGC

(value1)

0

(Rx link) 0 : Rx link (Forward-link)

mode AT+WAGC

(value2)

1

(Activated)

0 : Deactivate

1 : Activate

compFlinkStaticGain

(staticgain)

AT+WAGC

(value3)

0x2000

(0 dB)

Forward-link pre-compressor static gain. This gain is applied to the input samples when static gain is enabled. This parameter is defined as a linear unsigned Q13 number. Recommended range is 0 to 18 dB.

compFlinkStaticGain = 8192 * 10^(0..18 dB/20)

compFlinkAIGFlag

(gainselec)

AT+WAGC

(value4)

0

(static)

Forward-link pre-compressor gain selection flag. Write 1 to enable adaptive gain (static gain disabled);

Write 0 to enable static gain (adaptive gain disabled).

expFlinkThreshold

(expthrshld)

AT+WAGC

(value5)

0x0780

(-60 dBm0mu)

Forward-link expansion threshold (Ethresh). This is the energy threshold of the input under which expansion is applied. This parameter is defined as a dB Q7 number. Meaningful range is -75 to 0 dBm0mu. This parameter must be less than compFlinkThreshold. Write 0x0000 to disable the expander.

expFlinkThreshold = 128 * (-75..0 dBm0mu+75)

expFlinkSlope

(expslp)

AT+WAGC

(value6)

0xFF9A

(-0.4 or 1:1.5)

Forward-link expansion slope (Eslope). This is the slope of the expander gain when expansion is applied. This parameter is defined as a Q8 ratio. Meaningful range is -0.04 to -0.996.

expFlinkSlope = 256 * -0.04..-0.996

compFlinkThreshold

(compthrshld)

AT+WAGC

(value7)

0x1B00

(-21 dBm0mu)

Forward-link compression threshold (Cthresh). This is the energy threshold of the input above which compression is applied. This parameter is defined as a dB Q7 number. Meaningful range is -75 to 0 dBm0mu. This parameter must be greater than expFlinkThreshold.

compFlinkThreshold = 128 * (-75..0 dBm0mu+75)

compFlinkslope

(compslp)

AT+WAGC

(value8)

0xF333

(0.95238 or 20:1)

Forward-link compression slope (Cslope). This is the slope of the compressor gain when compression is applied. This parameter is defined as an unsigned Q16 ratio. Recommended range is 0.50001 to 0.99999.

compFlinkslope = 65536 * 0.50001..0.99999

*dBm0mu = dBm0 measured for a µ-law 14-bit dynamic range; specified as an RMS dBm0 value, meaning that a full-scale sinusoid sees an RMS of 0 dBm0.

9.1.2 AVC (Automatic Volume Control)

The AVC is used to automatically adjust the volume level for loud ambient noise situations. It tracks the background noise levels in the applications operating environment and automatically adjusts the volume level. This block enables users experiences call clarity, regardless of background noise levels, without manually adjusting the volume level.

AT command AT+WAVC sets and queries the RX AVC parameters;

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 20

Table 5 Rx AVC Common Configuration Parameter List

Register AT Command

Default Description

mode AT+WAVC

(value0) 0

0 : Deactivated

1 : Activated

avcRlinkSensitivityOffset

(variation)

AT+WAVC

(value1)

0x0000 for +SPEAKER=2

0x0012 for +SPEAKER=9

Forward-link AVC variation from nominal sensitivity. This offset is applied to the background noise estimate before comparing against the thresholds. Increasing this parameter makes the AVC more sensitive to background noise.

avcRlinkSensitivityOffset = 256 * -75..75 dB

Scaling: Q8, Range -75 to 75

avcFlinkHeadroom

(headroom)

AT+WAVC

(value2)

0x0000

(0 dB)

Forward-link AVC headroom. This is the maximum total output gain below the 0 dBm0mu that is allowed.

avcFlinkHeadroom = 256 * 0..75 dB

Scaling: Q8, Range 0 to 75

Fixed Parameters 9.1.2.1

There are four AVC parameters or lists that are fixed:

1. avcFlinkThresholdList

2. avcFlinkTargetGainList

3. avcFlinkSmoothK

4. avcRlinkBNERamp

avcFlinkThresholdList 9.1.2.1.1

rx_avc_thresh_list; Forward-link AVC list of noise thresholds and hysteresis allowances.

The background noise estimate must exceed a particular threshold before its corresponding gain is applied. The estimate must maintain a level above that threshold, less the hysteresis allowance before the gain is dropped to the next lower gain. The order is from highest threshold to lowest, with each threshold’s hysteresis value immediately following it. The last desired threshold entry must be 0x0000 (-75 dB m0mu). These parameters are defined as dB Q8 numbers.

Meaningful threshold range is -75 to 0 dBm0mu. Implementation also limits the range to -75 to 0 dBm0mu. Recommended hysteresis range is no greater than one-half the distance between the corresponding threshold and the next lower threshold. Meaningful range is no greater than the distance between the corresponding threshold and the next lower threshold. Implementation limits the range to 0 to 75 dBm0mu.

avcFlinkThresholdList(index) = 256 ∗ (-75..0 dBm0mu+75)

Fixed (uses 4 of 12 maximum entries):

avcFlinkThresholdList(0) – 0x3815 (-19 dBm0mu threshold)

avcFlinkThresholdList(1) – 0x0300 (3 dB hysteresis allowance)

avcFlinkThresholdList(2) – 0x3215 (-25 dBm0mu threshold)

avcFlinkThresholdList(3) – 0x0300 (3 dB hysteresis allowance)

avcFlinkThresholdList(4) – 0x2C15 (-31 dBm0mu threshold)

avcFlinkThresholdList(5) – 0x0300 (3 dB hysteresis allowance)

avcFlinkThresholdList(6) – 0x0000 (-75 dBm0mu threshold)

avcFlinkThresholdList(7) – 0x0000 (0 dB hysteresis allowance)

avcFlinkThresholdList(8) – 0x0000

avcFlinkThresholdList(9) – 0x0000

avcFlinkThresholdList(22) – 0x0000

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 21

avcFlinkThresholdList(23) – 0x0000

avcFlinkTargetGainList 9.1.2.1.2

rx_avc_gain_list; Forward-link AVC list of gains. This is the list of gains that is applied when the background noise estimate exceeds a corresponding threshold. The gain to be applied is ordered from the highest noise threshold to the lowest. These parameters are defined as dB Q8 numbers.

Recommended range is -24 to 24 dB. Implementation also limits the range to -24 to 24 dB.

avcFlinkTargetGainList(index) = 256 ∗ -24..24 dB

Fixed (uses 4 of 12 maximum entries):

avcFlinkTargetGainList(0) – 0x1200 (+18 dB)

avcFlinkTargetGainList(1) – 0x0C00 (+12 dB)

avcFlinkTargetGainList(2) – 0x0600 (+6 dB)

avcFlinkTargetGainList(3) – 0x0000 (0 dB)

avcFlinkTargetGainList(10) – 0x0000

avcFlinkTargetGainList(11) – 0x0000

avcFlinkSmoothK 9.1.2.1.3

rx_avc_smooth_k; Forward-link AVC gain-smoothing constant. This constant is used to smooth the gain over time. This parameter is defined as an unsigned Q16 number.

Recommended range is T=0.0001 to 20.0000 sec. Implementation limits the range to T=0.0001 to 1000.0000 s.

avcFlinkSmoothK = 65536 ∗ ( 1 – 10^([0.016*log10(0.111)]/T))

T is the time, in seconds, for a 10/90% gain change.

Fixed to: 0x01CB (0.00701 or T=5.000 s)

avcRlinkBNERamp 9.1.2.1.4

rx_avc_ramp; Forward-link AVC ramping constant. This time constant is part of the background noise estimate calculation. This parameter is defined as a Q14 number.

Recommended range is 1.00001 to 1.99994. Implementation also limits the range to 1.00001 to 1.99994.

avcRlinkBNERamp = 16384 ∗ 1.00001..1.99994

Fixed to: 0x40B4 (1.01099)

9.1.3 Volume

The Rx-volume is adjusted using the AT+CLVL command.

Recommended Rx-volume setup table is dependent on the Volume Control Implementation (refer to section 7.2.3 Volume Control Implementation).

9.1.4 Rx Gain

A general purpose gain stage is available in the receive path after the voice processing algorithms. This gain stage should be set to 0dB by default and should only be adjusted if the gain cannot be modified in the application.

Note that if positive gain is applied in this stage, the NLPP_limit must be adjusted (see section 11.3.2.3 NLPP_limit for more information).

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 22

9.1.5 Sidetone

The sidetone gain should be disabled by default.

9.2 Tx-Path (Reverse-link)

9.2.1 Tx Gain

There are two separate gain stages before the EC-block:

1. Microphone gain 0dB or 24dB

2. Codec Tx Gain -90dB to +12dB

The command AT+VGT is using both blocks:

- From -90dB to +12dB Microphone gain is 0dB (using full TX codec range)

- From +12dB to +36dB Microphone gain is 24dB (using only from -12dB to +12dB Tx codec range)

The microphone gain should only be used if a microphone is directly connected to the SL808xT, SL808xBT or SL808xBTA. Otherwise, it should be set to 0dB.

The TxGain is a general purpose gain stage that can be used if there is no possibility of adjusting the gain in the application. Otherwise, it should be set to 0dB.

9.2.2 Tx AGC

From

Codec

Input

Gain

Noise

Supp.AGC

LVB

noise

repl.

TX

PCM

filter

TX_Volume

To

vocoder

encoder

Tx AAGC

txAgcEnableFlag

compRlinkStaticGain

compRlinkAIGFlag

txAgcEnableFlag

compRlinkThreshold

compRlinkSlope

expRlinkThreshold

expRlinkSlope

To AVC

Tx AAGC Gains Figure 21.

Tx AGC benefits are to make the audio quality of the implementation much more consistent for various user and usage models.

AT command AT+WAGC sets and queries the Tx AGC parameters. The recommended parameters are listed in Table 6.

Table 6 Tx AAGC Recommended Values

Register AT Command

Recommended Value

Description

link AT+WAGC

(value1)

1

(Tx link) 1 : Tx link (Reverse-link)

mode AT+WAGC

(value2)

1

(Activated)

0 : Deactivate

1 : Activate

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 23

Register AT Command

Recommended Value

Description

compRlinkStaticGain

(staticgain)

AT+WAGC

(value3)

0x2000

(0 dB)

Reverse-link pre-compressor static gain. This gain is applied to the input samples when static gain is enabled. This parameter is defined as a linear unsigned Q13 number. Recommended range is 0 to 18 dB.

compRlinkStaticGain = 8192 * 10^(0..18 dB/20)

compRlinkAIGFlag

(gainselec)

AT+WAGC

(value4)

0

(static)

Reverse-link pre-compressor gain selection flag. Write 1 to enable adaptive gain (static gain disabled);

Write 0 to enable static gain (adaptive gain disabled).

expRlinkThreshold

(expthrshld)

AT+WAGC

(value5)

0x0780

(-60 dBm0mu)

Reverse-link expansion threshold (Ethresh). This is the energy threshold of the input under which expansion is applied. This parameter is defined as a dB Q7 number. Meaningful range is -75 to 0 dBm0mu. This parameter must be less than compRlinkThreshold. Write 0x0000 to disable the expander.

expRlinkThreshold = 128 * (-75..0 dBm0mu+75)

expRlinkSlope

(expslp)

AT+WAGC

(value6)

0xFF9A

(-0.4 or 1:1.5)

Reverse-link expansion slope (Eslope). This is the slope of the expander gain when expansion is applied. This parameter is defined as a Q8 ratio. Meaningful range is -0.04 to -0.996.

expRlinkSlope = 256 * -0.04..-0.996

compRlinkThreshold

(compthrshld)

AT+WAGC

(value7)

0x1B00

(-21 dBm0mu)

Reverse-link compression threshold (Cthresh). This is the energy threshold of the input above which compression is applied. This parameter is defined as a dB Q7 number. Meaningful range is -75 to 0 dBm0mu. This parameter must be greater than expRlinkThreshold.

compRlinkThreshold = 128 * (-75..0 dBm0mu+75)

compRlinkslope

(compslp)

AT+WAGC

(value8)

0xF333

(0.95238 or 20:1)

Reverse-link compression slope (Cslope). This is the slope of the compressor gain when compression is applied. This parameter is defined as an unsigned Q16 ratio. Recommended range is 0.50001 to 0.99999.

compRlinkslope = 65536 * 0.50001..0.99999

9.2.3 Volume

Tx-volume is typically the last item adjusted in the Tx audio path.

𝑇𝑥𝑉𝑜𝑙𝑢𝑚𝑒 = 16384 ∗ 10−84..+12 𝑑𝐵

20

Depending on the acoustic echo coupling between the loudspeaker and the microphone, the gain is distributed between TxVolume and the application MIC_GAIN so that AF levels are set optimally (see section 7.2.5 AF Level Adjustment for more information).

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 24

9.3 Codec Gains

The default gain for both Tx and Rx is set to 0 dB, and should only be adjusted in extreme conditions.

Mic

Speaker

Application

Gain

Application

Gain & PA

Customer application

Tx_Codec_

Gain

Tx_Mic_

GainA

D

Sidetone_

Gain

+A

D

Input

GainEC

Output

Gain

NLPP

Gain

NLPP

Limit

AF

Limit

Echo canceller block

TX

AGC

Gain

Compression

and

Expansion

TX

PCM

Gain

TX_Volume

RX

_V

olu

me

RX

AGC

Gain

Compression

and

Expansion

Automatic

Volume

Control

TX AAGC

RX AAGC

TX

Processing

and

Interface

RX

Processing

and

Interface

Codec and LNA Gains Echo canceller Gains Volumes and AGC Gains

Audio Front End Modem Module

Rx_Codec_

Gain

Setting codec gains

RX

PCM

Gain

CODEC Gains Block Diagram Figure 22.

The NLPP_limit is directly inversely proportional to the Rx_Codec_Gain. It is important to update the NLPP_limit whenever Rx_Codec_Gain is changed (see nlpp_limit in Table 10 EC register names for more information).

Table 7 CODEC Gain Parameter Configuration

Register AT Command Description

Rx_Codec_Gain AT+VGR Range -∞ to +12 dB

Tx_Codec_Gain

AT+VGT

Range -∞ to +36 dB.

AT+VGT works with the combination of Tx_Mic_Gain and Tx_Codec_Gain blocks. See 9.2.1 for more details. Tx_Mic_Gain

Sidetone_Gain AT+SIDET Should be changed for modes where sidetone is not required.

Range -∞ to +12 dB.

9.4 PCM Filter Rx and Tx Path

The Rx and Tx path contains IIR & FIR filters to compensate for nonlinear acoustical element anomalies, and improving overall perceptual sound quality.

Tuning of voice filters is driven by the uncorrected frequency response measurement that is taken as a part of telecom compliance testing.

Tuning is accomplished with the following procedure.

1. Obtain the initial uncorrected frequency response for Tx/Rx (as the case may be). This is the response with the PCM filter disabled.

2. Determine the frequencies (ranges) that need to be boosted and those that need to be attenuated.

3. Important considerations while determining frequencies in step 2 are to:

Fit the conformance mask.

Minimize the overall gain introduced by the PCM filter. PCM filters are intended to correct frequency response and not to boost overall loudness of the voice.

Modify the filter to improve naturalness and intelligibility (if needed). This is shown in the example below.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 25

4. Design the filter using any third-party software. The designed filter should compensate for undesired dips and peaks in the uncorrected frequency response.

5. For third-party software, ensure that the Q-format of the generated coefficients is accurate.

Notes:

Potential gain compensation should be applied in the “Application Gain & PA”-block if the RLR fails when the filter is enabled.

Potential gain compensation should be applied in the “Tx_Codec_Gain”-block if the SLR fails when the filter is enabled.

9.4.1 IIR Filter

The PCM filter is a standard Biquad IIR filter. The coefficients are 32-bits wide in Q1.30 format.

AT command AT+WADF sets and queries the biquad IIR PCM filter parameters.

AT command AT+WADF=x,9 sets and queries the Tx biquad IIR PCM filter parameters.

AT command AT+WADF=x,10 sets and queries the Rx biquad IIR PCM filter parameters.

The biquad filter is a second-order, 2-pole IIR filter. The Z-transform of a typical biquad filter is 2

3 given as:

𝐻(𝑧) =𝑏0 + 𝑏1 ∗ 𝑧−1 + 𝑏2 ∗ 𝑧−2

𝑎0 + 𝑎1 ∗ 𝑧−1 + 𝑎2 ∗ 𝑧−2

Usually, the coefficients are scaled by a0. The time domain equation for the output of the filter is 5

6 given as:

A single-stage biquad filter topology using direct form I Figure 23.

9.4.2 FIR Filter

The PCM filter is a standard 13-tap symmetric FIR filter with linear phase response.

The filters can give substantial gain, sometimes in excess of +12 dB. Make sure to verify that the gain does not change much when enabling the filter.

Ensure that the lowest gain of the filter in the 500 Hz to 3 kHz range is not greater than 0 dB.

The greatest amount of gain above 2 kHz should be less than 9 dB.

The greatest amount of gain below 2 kHz should be less than 6 dB.

AT command AT+WADF sets, activates and queries the Rx and Tx FIR PCM filter parameters. See Table 8 for syntax details.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 26

Table 8 AT+WADF parameter set for FIR filtering

Parameter Description

Mode

0 : Deactivate filter (default)

1 : Activate filter.

2 : Query current settings

Filter type 7 : Tx FIR filter

8 : Rx FIR filter

Param1 tap0=tap12

[0-65535], but representing signed values. Scaling: Q1.14. Range: -2 - 2.

Param2 tap1=tap11

[0-65535], but representing signed values. Scaling: Q1.14. Range: -2 - 2.

Param3 tap2=tap10

[0-65535], but representing signed values. Scaling: Q1.14. Range: -2 - 2.

Param4 tap3=tap9

[0-65535], but representing signed values. Scaling: Q1.14. Range: -2 - 2.

Param5 tap4=tap8

[0-65535], but representing signed values. Scaling: Q1.14. Range: -2 - 2.

Param6 tap5=tap7

[0-65535], but representing signed values. Scaling: Q1.14. Range: -2 - 2.

Param7 tap6

[0-65535], but representing signed values. Scaling: Q1.14. Range: -2 - 2.

9.5 EC Block Parameter Description

The enhanced EC performs a full-duplex echo cancellation for all modes of operation, including speakerphone and operation. The enhanced EC also removes part of the background noise. The following figure illustrates the enhanced EC block diagram; blocks are color coded and match the color of related cells in Table 10 EC register names.

LVHF_tx

LVHF_rx

HPFTx In

Delay

line

PCD

Rx Out

Tx Out

Rx In

Input_

Gain

Output_

Gain+

-

Σ

Adaptive

Filter (AF)SPDET

DENS

Rx-preprocessing

NLPP

Limit

NLPP

Gain

EC Block Diagram Figure 24.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 27

The Tx-path includes the following components:

Microphone filter – Removes DC and low-frequency noise from the microphone signal

Adaptive filter – Models the linear acoustical path between loudspeaker and microphone

Path Change Detector (PCD) – Detects changes in the acoustical path between loudspeaker and microphone

Speech Detector (SPDET) – Detects far-end/near-end activity and controls the activation of the nonlinear echo-suppression

Dynamic Echo and Noise Suppressor (DENS) – Removes residual echoes after the adaptive filter and suppresses stationary background noise.

The Rx path includes the following components:

Rx-preprocessing – Rx preprocessing includes HPF, digital gain, and clipping

Programmable delay – Compensates for delays in the echo path from Rx_out to Tx_in; which are caused by audio I/O buffering, filtering, processing, AD/DA converter, and propagation time between the loudspeaker and microphone

AT commands AT+ECHO sets and queries the enhanced EC and noise suppression registers.

Table 9 AT+ECHO parameter set

Parameter Description

Mode

0: Deactivate echo cancellation (default)

1: Activate echo cancellation.

2: Query current settings

Algo_Id 1: Only valid value for the SL808xT, SL808xBT and SL808xBTA.

Echo Mode 1-4: Identifier of the set of EC parameters to be activated or queried. Up to 4 different set of parameters can be stored and activated.

EC and NS registers.

38 parameters.

See table below

See table below for detailed description.

If no parameters specified, default or previously entered parameters apply. If parameters are specified, they will apply only to the selected Echo Mode parameter set.

9.5.1 Reference EC parameter set

The recommended EC and NS settings in the table below are a good initial settings reference to start tuning Acoustic Echo Cancellation in car environment.

Table 10 EC register names

Register Name Recommended value

Description

nlpp_limit (0)

32767

(0x7FFF)

(0 dB)

By limiting the signal before both the EC and the codec, the echo return path will be more closely estimated by the adaptive filter portion of the EC. This will result in better EC performance.

Should be directly inversely proportional to the Rx_Codec_Gain, and set to 0dB for Rx_Codec_Gain = 0dB.

nlpp_limit = Dec2Hex (32768 * 10^(limit dB/20)

Scaling: Q0.15, Range 0.0625 to 1

nlpp_gain (1)

2048

(0x0800)

(0 dB)

This is the gain into the echo canceller on the Rx path. It should be set to 0dB.

nlpp_gain = Dec2Hex(2048 * 10^(gain dB/20)

Scaling: Q4.11, Range -∞ to +24 dB

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 28

Register Name Recommended value

Description

af_limit (2)

32767

(0x7FFF)

(0 dB)

af_limit = Dec2Hex (32768 * 10^(limit dB/20)

Scaling: Q0.15, Range 0.0625 to 1

ecModeNew (3)

6047

(0x179F)

(AEC)

Enables particular portions of the EC.

HS Mode Bit Alias Functionality On/Off

0 = 0x01 AF Adaptive filter

1 = 0x02 DES Dynamic echo suppression

2 = 0x04 NS Noise suppression

3 = 0x08 CNI Comfort noise injection

4 = 0x10 NLES Nonlinear echo suppression

5 = 0x20 HB Wideband: high-band unmute

6 = 0x40 VA Wideband: high-band variable attenuation

7 = 0x80 PCD Patch change detector

8 = 0x100 FEHI Far-end highpass filter

9 = 0x200 NEHI Near-end highpass filter

10 = 0x400 NLPP Nonlinear preprocessing

11 = 0x800 Reserved Reserved

12 = 0x1000 PRE-AF AF preprocessing

For the most part, the value of these items should be set as shown in the bulleted section below. The items to be careful about are FEHI (Far-End Highpass Filter) and NEHI (Near-End Highpass Filter). These are 200 Hz high-pass filters, where FEHI allows for greater output level and NEHI acts as a wind noise filter.

These will typically be turned on only for Speakerphone and AEC mode, as they can make frequency response difficult to pass for the other modes. But, if is it possible to turn on the FEHI, then it is recommended to do so because it can have a slightly helpful effect on doubletalk performance.

Speakerphone & AEC (Car-kit): 0x179F

Bluetooth, Headset, Handset: 0x149F

tuning_mode (4)

0

(0x0000)

(normal)

Speech frame can be replaced by 1 kHz sinusoidal frame depending on the internal status of EEC set by tuning_mode. 0x0000 = normal mode; 0x0001 = allows 1kHz tone

Range 0 to 1

echo_path_delay (5)

144

(0x0090)

(18.0ms)

In any system with echo, there is an inherent delay between the original sound and the echo sound. This is made up of the delays in the A/D and D/A conversion, filtering, processing, audio I/O buffering, and propagation time between the loudspeaker and microphone.

If this inherent echo delay is not somehow accounted for, then there is a waste of adaptive filter taps as the EC tries to cancel echo in the non-echo delay period. For this reason, there is an echo_path_delay parameter.

The echo_path_delay is applied to the AF-reference signal. It should be set just smaller than the actual inherent echo delay. The delay is expressed in samples at 8kHz (0.125ms).

Delay(ms) = Dec2Hex (0.125 * echo_path_delay

Range 0x000 to 0x0275

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 29

Register Name Recommended value

Description

outputGain (6)

2048

(0x0800)

(0 dB)

Gain at the output of EEC Tx to compensate the scaling in order to conserve the overall gain in Tx path.

OutputGain = Dec2Hex (2048 * 10^(gain dB/20))

Scaling: Q4.11, Range -∞ to +24 dB

inputGain (7)

8192

(0x2000)

(0 dB)

Gain at the input of EEC Tx to scale the microphone signal to avoid clipping AF coefficients.

InputGain = Dec2Hex (8192 * 10^(gain dB/20))

Scaling: Q2.13, Range -∞ to +12 dB

AF_twoalpha (8)

8192

(0x2000)

Step size to update the coefficients of the adaptive filter. It is the trade-off between convergence speed/tracking of acoustic changes and the stability of the adaptive filter. High values lead to a fast speed of the adaptation. Low values lead to a slow adaptation speed but a stable adaptive filter.

Do not change the default value of 0x2000.

Scaling: Q0.15, Range 0 to 1.0

AF_erl (9)

256

(0x0100)

Adaptive step size control for AF filter.

To avoid divergence during doubletalk, the adaptive filter module uses an adaptive step size control that slows down the adaptation speed.

The physical ERL value can be measured knowing the Rx and microphone signal. The real physical value of the ERL can lead to a non-stable adaptive filter during doubletalk. This is especially the case in Hands-free mode. Choosing a higher ERL value has a positive impact on the stability of the solution. Such a choice will improve the quality of the near-end speech during doubletalk. However, the convergence of the adaptive filter can suffer from the increase of the AF_erl.

This value has been selected so that convergence speed takes about 1 sec. It does not usually need to be changed from the default.

Scaling: Q9.6, Range -∞ to +54 dB

AF_taps (10) 140

(0x008C)

Number of taps of AF foreground filter.

The number of taps AF_taps of the filter has been chosen to capture the most significant energy in the echo path impulse response, plus additional room/boundary echo. Typically, a larger number of taps is needed when the loudspeaker driver puts out more volume because there is more energy put into the space surrounding the loudspeaker and therefore longer delayed echo paths will be picked up by the microphone. These delays for each mode have been carefully selected and typically do not need adjustment.

Range 0x0000 to 0x0190

AF_preset_coef (11) 2

(0x0002)

Indicates whether a preset of AF coefficients should be done. This parameter must be set to 0x0002.

Range 0 to 2

AF_offset (12) 400

(0x0190) Set to default for the selected mode and do not change.

AF_erl_bg (13) 32

(0x0020)

Adaptive step size control for AF background filter, which is typically smaller than the one of the foreground filter (AF_erl) to guarantee a fast reaction. These parameters should be left at the default setting.

Scaling: Q9.6, Range -∞ to +54 dB

AF_taps_bg (14) 32

(0x0020)

Number of taps of AF background filter. The number of taps for the background AF filter is typically smaller than the number of taps of the foreground AF-filter (AF_taps) in order to react faster on changes in the direct field. These parameters should be left at the default setting.

Range 0 to 200

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 30

Register Name Recommended value

Description

PCD_threshold (15) 14000

(0x36B0)

Threshold parameter to detect path changes. Too high a value results in false detections of path changes while too small a value makes the detector insensitive (some path changes are not detected).

This parameter should be left at the default settings.

Scaling: Q0.15, Range 0 to 1.0

minimum_erl (16) 64

(0x0040)

minimum_erl is the adaptive step size control during path changes. AF_erl is the increase rate control.

If a path change is detected, the AF_erl of the foreground filter is set to minimum_erl value to assure a fast-adapting filter. After a path change, the AF_erl of the foreground filter increases back to its nominal value. The speed to increase can be controlled by erl_step.

These parameters should be left at the default settings.

minimum_erl: Scaling: Q9.6, Range -∞ to +54 dB

erl_step: Scaling: Q1.14, Range 0 to 2.0

erl_step (17) 16800

(0x41A0)

max_noise_floor (18) 2048

(0x0800) Should not be changed from its default value.

det_threshold (19) 99

(0x0063) Should not be changed from its default value.

SPDET_far (20) 20000

(0x4E20)

Detection threshold for far-end activity.

Scaling: Q0.15, Range 0 to 1.0

SPDET_mic (21) 20000

(0x4E20)

Detection threshold for microphone activity.

Scaling: Q0.15, Range 0 to 1.0

SPDET_xclip (22) 64

(0x0040)

SPDET_xclip is the threshold at which DENS_NL_Atten is activated. It controls the activation of nonlinear echo suppression.

If the mic-earpiece separation is good, and there is good echo loss without any EC enabled, then SPDET_xclip can be set higher. However, if you hear nonlinearities in the output, then you will have to tune DENS_NL_atten, and reduce SPDET_xclip.

Range 0 to 0x7FFF

SPDET_xclip = Dec2Hex (32768 * 10^(-gain dB/20))

DENS_tail_alpha (23) 16384

(0x4000)

Represents the decay in energy of the echo tail of the impulse response (time).

Set to high, the echo tail is overestimated, resulting in suppression of near-end speech during doubletalk.

Set to low, late echoes are not suppressed sufficiently.

Scaling: Q0.15, Range 0 to 1.0

DENS_tail_portion (24) 8704

(0x2200)

Represents the portion of the echo trail present in the power estimated by the AF-filter that has to be extrapolated in time (amplitude).

Set too low, tail echoes are not suppressed sufficiently.

Set too high, the echo tail is overestimated resulting in suppression of near-end speech during doubletalk.

Scaling: Q0.15, Range 0 to 1.0

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 31

Register Name Recommended value

Description

DENS_gamma_e_alpha (25) 0

(0x0000)

To smooth the gain factor between DENS_gamma_e_high and DENS_gamma_e_low. It is the time smoothing of the gain change between far-end and doubletalk mode.

Default values should be good. Typical range is from zero to the value of DENS_tail_alpha.

Scaling: Q0.15, Range 0 to 1.0

DENS_gamma_e_dt (26) 80

(0x0050)

This is the additional echo muting gain applied during doubletalk. Higher value is more muting.

Default values should be good. The value can be decreased slightly if more doubletalk is desired. Do not decrease below 0x00C8.

Scaling: Q7.8, Range 0 to 128

DENS_gamma_e_low (27) 224

(0x00E0)

Additional muting gain applied in DES during near-end only. Higher value is more muting. Set to same as DENS_gamma_e_dt or 0x0040 to 0x0100 higher.

Scaling: Q7.8, Range 0 to 128

DENS_gamma_e_rescue (28) 7680

(0x1E00)

Additional muting gain applied in DES during path change. Default values should be good. Value can be decreased if more doubletalk is desired. Do not decrease below 0x00C8.

Default value gives a good initial convergence while optimizing doubletalk.

Scaling: Q7.8, Range 0 to 128

DENS_gamma_e_high (29) 450

(0x01C2)

Additional echo muting gain applied during a far-end speech. Higher value is more muting. Set to 2x of DENS_gamma_e_dt and DENS_gamma_e_low

Scaling: Q7.8, Range 0 to 128

DENS_spdet_near (30) 512

(0x0200)

It’s the near-end speech detection threshold. It controls the selection between gamma_e_high and gamma_e_dt. Higher is less sensitive.

This value usually does not need to be changed from defaults in each mode.

Scaling: Q7.8, Range 0 to 128.

DENS_spdet_act (31) 768

(0x0300)

Detection threshold for microphone activity.

Scaling: Q7.8, Range 0 to 128

DENS_gamma_n (32) 600

(0x0258)

Noise subtraction factor in spectral gain function. Oversubtraction factor and bias compensation for noise estimation. Used with DENS_limit_NS.

Default value should work well.

Scaling: Q7.8, Range 0 to 128

DENS_NFE_blocksize (33) 200

(0x00C8)

Window for estimating stationary component of noise.

This is the window of noise floor estimation, expressed in frames at 8 kHz. The default is 400 (decimal) = 4 sec.

Default value should work well.

Range 0 to 32768

DENS_limit_NS (34)

5193

(0x1449)

(-13 dB)

Controls the maximum amount of noise suppression.

Noise Suppression DENS_limit_NS (Dec) DENS_limit (Hex)

- 10 dB 10349 0x286D

- 13 dB 7336 0x1CA8

- 15 dB 5827 0x16C3

- 16 dB 5193 0x1449

DENS_limit_NS = Dec2Hex (32768 * 10^(-NS dB/20))

Scaling: Q0.15, Range 0 to 1.0

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 32

Register Name Recommended value

Description

DENS_NL_atten (35) 768

(0x0300)

Nonlinear echo power estimation. It controls the amount of nonlinear echo suppression; tradeoffs are:

Too low a value will result in high frequency echo

Too high a value will suppress high frequency

Scaling: Q4.11, Range -∞ to 24 dB

DENS_CNI_level (36) 13000

(0x32C8)

Subtraction of echo also results in extra suppression of near-end noise. Hence, near-end noise is modulated by the far-end speech. To avoid this noise-gating effect, comfort noise injection is implemented. The amount of comfort noise is controlled by the DENS_CNI_Level parameter. The far-end should not hear a change in noise level when there is far-end speech.

Default value should work well.

Scaling: Q1.14, Range 0 to 2.0

WB_echo_ratio (37) 4000

(0x0FA0) Scaling: Q7.8, Range -∞ to 21 dB

9.5.2 Other parameters set examples

The table below present example of parameters sets from the embedded ASIC vendor for various profiles of echo cancellation.

Table 11 Examples of EC Parameter Settings

Parameter

Sp

ea

ke

r

ph

on

e

ag

gre

ss

ive

Sp

ea

ke

r

ph

on

e

me

diu

m

Sp

ea

ke

r

lea

st

ag

gre

ss

ive

Blu

eto

oth

Blu

eto

oth

les

s

ag

gre

ss

ive

Blu

eto

oth

lea

st

ag

gre

ss

ive

Ha

nd

s F

ree

He

ad

se

t

Ha

nd

se

t

NLPP_limit 0x7FFF 0x7FFF 0x7FFF 0x7FFF 0x7FFF 0x7FFF 0x7FFF 0x7FFF 0x7FFF

NLPP_gain 0x0800 0x0800 0x0800 0x0800 0x0800 0x0800 0x0800 0x0800 0x0800

AF_limit 0x7FFF 0x7FFF 0x7FFF 0x7FFF 0x7FFF 0x7FFF 0x7FFF 0x7FFF 0x7FFF

ecModeNew 0x179F 0x179F 0x179F 0x149F 0x149F 0x149F 0x179F 0x149F 0x149F

tuning mode 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000

echo_path_delay 0x0014 0x0014 0x0014 0x0078 0x0078 0x0078 0x0014 0x0014 0x0014

outputGain 0x0800 0x0800 0x0800 0x0800 0x0800 0x0800 0x0800 0x0800 0x0800

inputGain 0x2000 0x2000 0x2000 0x2000 0x2000 0x2000 0x2000 0x2000 0x2000

AF_twoalpha 0x2000 0x2000 0x2000 0x2000 0x2000 0x2000 0x2000 0x2000 0x2000

AF_erl 0x0100 0x0100 0x0100 0x0140 0x0140 0x0140 0x0100 0x0200 0x0100

AF_taps 0x00A0 0x00A0 0x008C 0x0190 0x0190 0x0190 0x008C 0x003C 0x0046

AF_preset_coef 0x0002 0x0002 0x0002 0x0002 0x0002 0x0002 0x0002 0x0002 0x0002

AF_offset 0x0190 0x0190 0x0190 0x0190 0x0190 0x0190 0x0190 0x02FF 0x02FF

AF_erl_bg 0x0040 0x0040 0x0040 0x0040 0x0040 0x0040 0x0040 0x0040 0x0040

AF_taps_bg 0x0020 0x0020 0x0020 0x0020 0x0020 0x0020 0x0020 0x0020 0x0020

PCD_threshold 0x36B0 0x36B0 0x36B0 0x3977 0x3977 0x3977 0x36B0 0x2710 0x4650

MinimumErl 0x0040 0x0040 0x0040 0x0040 0x0040 0x0040 0x0040 0x0040 0x0040

erl_step 0x41A0 0x41A0 0x41A0 0x408A 0x408A 0x408A 0x41A0 0x41A0 0x41A0

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 33

Parameter

Sp

ea

ke

r

ph

on

e

ag

gre

ss

ive

Sp

ea

ke

r

ph

on

e

me

diu

m

Sp

ea

ke

r

lea

st

ag

gre

ss

ive

Blu

eto

oth

Blu

eto

oth

les

s

ag

gre

ss

ive

Blu

eto

oth

lea

st

ag

gre

ss

ive

Ha

nd

s F

ree

He

ad

se

t

Ha

nd

se

t

max_noise_floor 0x0800 0x0800 0x0800 0x0800 0x0800 0x0800 0x0800 0x0800 0x0800

det_threshold 0x0063 0x0063 0x0063 0x0063 0x0063 0x0063 0x0063 0x0063 0x0063

SPDET_far 0x4E20 0x4E20 0x4E20 0x4E20 0x4E20 0x4E20 0x4E20 0x4E20 0x4E20

SPDET_mic 0x4E20 0x4E20 0x4E20 0x4E20 0x4E20 0x4E20 0x4E20 0x4E20 0x4E20

SPDET_xclip 0x0001 0x0001 0x0001 0x0001 0x0001 0x0001 0x0001 0x0001 0x0001

DENS_tail_alpha 0x4A38 0x4A38 0x3E80 0x6D60 0x5DC0 0x5208 0x3E80 0x4650 0x4A38

DENS_tail_portion 0x1770 0x1770 0x0BB8 0x4650 0x2EE0 0x1F40 0x0BB8 0x0BB8 0x1770

DENS_gamma_e_alpha 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000

DENS_gamma_e_dt 0x0190 0x0130 0x0100 0x0106 0x0106 0x0106 0x0100 0x012C 0x0100

DENS_gamma_e_low 0x0190 0x0130 0x0100 0x0161 0x0161 0x0161 0x0100 0x012C 0x0100

DENS_gamma_e_rescue 0x1E00 0x1E00 0x1E00 0x1E00 0x1E00 0x1E00 0x1E00 0x0400 0x0400

DENS_gamma_e_high 0x0300 0x0258 0x01C2 0x0384 0x02BC 0x0200 0x01C2 0x0200 0x0200

DENS_spdet_near 0x0400 0x0400 0x0400 0x1912 0x1912 0x1912 0x0400 0x0200 0x0400

DENS_spdet_act 0x0300 0x0300 0x0300 0x0300 0x0300 0x0300 0x0300 0x0300 0x0300

DENS_gamma_n 0x0258 0x0258 0x0258 0x0258 0x0258 0x0258 0x0258 0x0258 0x0258

DENS_NFE_blocksize 0x0190 0x0190 0x0190 0x0190 0x0190 0x0190 0x0190 0x0190 0x0190

DENS_limit_NS 0x1CA8 0x1CA8 0x1CA8 0x1CA8 0x1CA8 0x1CA8 0x1CA8 0x1CA8 0x1CA8

DENS_NL_atten 0x0380 0x0300 0x0280 0x0300 0x0300 0x00C8 0x0300 0x0384 0x01C2

DENS_CNI_level 0x32C8 0x32C8 0x32C8 0x2D55 0x2D55 0x2D55 0x32C8 0x32C8 0x2EE0

WB_echo_ratio 0x0FA0 0x0FA0 0x0FA0 0x0100 0x0100 0x0100 0x0FA0 0x0FA0 0x0FA0

10 Gain Calibration

Before adjusting the gains, the desired audio profile to calibrate/tune must be selected (using AT+SPEAKER).

To perform gain calibration, follow these steps:

1. Set all AEC parameters to the recommended values listed in 9.5. using the AT+ECHO command. This will set the EC-

gains to a good starting point.

2. Set RxVolume to its nominal level.

Internal Volume Control; AT+WDGR=1,0 (0dB)

3. Set Rx_Gain to 0dB by sending AT+VGR=0

4. Set the Tx_Gain to 0dB:

Codec gain: AT+VGT=0

TxGain: AT+WDGT=1,0

5. Disable sidetone gain by sending AT+SIDET=0

6. Set TxVolume to +6dB by sending AT+WDGT=1,600.

7. Set RxAGC, TxAGC, and RxAVC to their recommended settings as listed in 9.1.1, 9.2.2 and 9.1.2.

TxAGC: AT+WAGC=1,0,8F47,0000,0780,FF9A,1B0C,F333

RxAGC: AT+WAGC=0,0,4000,0000,0780,FF9A,1B00,F333

8. Set AGC and AVC to SLR/RLR calibration mode:

Enable TxAGC (if used): AT+WAGC=1,1

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 34

Enable RxAGC (if used): AT+WAGC=0,1

Disable RxAVC by sending AT+WAVC=0,0,0

10.1 Frequency Response

Filters are enabled using AT+WADF=1,x commands:

Enable Rx FIR: AT+WADF=1,8,65407,64727,64564,64737,65037,65082,15878

Disable Tx FIR: AT+WADF=0,7

10.2 SLR and RLR Calibration

Measurement should be performed in accordance to ETSI TS 126 132.

1. Adjust the “MIC_GAIN” until SLR requirements are met.

2. Adjust the “SPKR_GAIN” until RLR requirements are met.

3. Enable Tx AGC (if used): AT+WAGC=1,1

4. Enable Rx AGC (if used): AT+WAGC=0,1

5. Adjust TxVolume level slightly if SLR levels are not met. There should not be any drastic change in SLR when enabling the Tx AGC (should not be needed).

6. Adjust “SPKR_GAIN” level slightly if RLR levels are not met. There should not be any drastic change in RLR when enabling the Rx AGC (should not be needed).

11 Tuning Algorithm Parameters

The basic EC tuning procedure should be carried out in the order listed below:

1. Select default recommended AEC parameters

2. Determine echo delay

Parameters can be updated while on a call. It should be noticed that after a parameter is updated, the echo canceller will “reset”. It will take up to 1s for it to converge and go back to normal operation.

11.1 Select Default AEC Parameters

This section describes how to pick a set of default parameters that will give the best EC performance with your application. The term best performance is intended to mean all echo is removed and the most amount of doubletalk is achieved (where perfect double performance would be called full-duplex operation).

The EC has 38 adjustable parameters that will set up its operation and give a certain level of performance. However, most of these parameters only need to be set to an operational value and do not require tuning.

Several reference sets of the 38 EC parameters are provided in section 9.5

11.2 Testing for Echo

Before performing VDA testing, it is recommended to tune the EC parameters in the targeted environment.

With the receive volume adjusted to maximum level (RLRmax), a person will speak at various loudness levels into the far-end phone listening for echo. This is in order to test for sound that goes to the Rx side of the application and returns to the Tx side of the application. Any sound that returns is considered to be echo. The goal of the Echo Canceller is to remove this returning sound.

It is also the goal of tuning to use the least amount of echo cancellation (least aggressive), so that doubletalk performance is optimal. There is no need to tune for doubletalk performance, because when echo is cancelled with the least amount of echo suppression, the doubletalk is the best it can be.

11.3 Parameter Description

This section describes how to tune individual parameters.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 35

11.3.1 Echo Path Delay

In any system with echo, there is an inherent delay between the original sound and the echo sound. In an application, this is made up of the delays in the A/D and D/A conversion, filtering, processing, audio I/O buffering, and propagation time between the loudspeaker and microphone. This delay is “echo_path_delay” parameter of the AT+ECHO command.

The “echo_path_delay” is applied to the AF-reference signal in the AF-path. The delay is expressed in samples at 8 kHz (0.125ms). The echo delay is measured between x[k] and z[k]

Appl_Delay Int_DelayEcho

MIC

_G

AIN

SP

KR

_G

AIN

Output

Gain

Input

Gain

NLPP

_Gain

z[k]

x[k]

AF

RxGain

TxGain

Rx_

Lin

e O

ut

SL808xApplication

Echo Path Delay Overview Figure 25.

The total delay is divided between two entities; application delay (Appl_Delay) and the internal delay of SL808xT, SL808xBT or SL808xBTA (Int_Delay).

x[k]

z[k]

AF_taps

Int_Delay

Appl_Delay

offset

Echo Path Delay Timeline Figure 26.

The Int_Delay of the SL808xT, SL808xBT and SL808xBTA is 10ms.

The Appl_Delay has to be measured in the user’s application using the method described in section 11.3.1.1 Measuring the Application Delay (Appl_Delay).

In addition, a short offset is required to ensure that the initial part of the echo is not missed. Empirical tests have shown that to get the best performance, the “echo_path_delay” offset used should be 3ms.

𝑒𝑐ℎ𝑜_𝑝𝑎𝑡ℎ_𝑑𝑒𝑙𝑎𝑦ℎ𝑒𝑥 = 𝐷𝐸𝐶2𝐻𝐸𝑋 (𝐴𝑝𝑝𝑙_𝑑𝑒𝑙𝑎𝑦 + 𝐼𝑛𝑡_𝐷𝑒𝑙𝑎𝑦 − 𝑜𝑓𝑓𝑠𝑒𝑡

0.125)

Using the Appl_Delay (10.8ms rounded to 11ms) in the example below gives a delay of 11ms + 10ms – 3ms = 18ms. This gives an “echo_path_delay” of 144Dec or 0x0090.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 36

Measuring the Application Delay (Appl_Delay) 11.3.1.1

The application delay must be measured in the intended usage environment. The point of this test is to measure the direct echo (shortest echo path). Therefore, ensure that there are no non-intended obstacles in the direct path between the application speaker and microphone.

Vehicle Acoustic Chamber

AUDIOx_IN_P

AUDIOx_IN_M

AUDIOx_OUT_P

AUDIOx_OUT_M

AC

MIC1 MIC2

PA

Echo

AV

Meter

Application Module

PreAmp

Cloth coverings

absorb sound

Windows

reflect sound Dashboard causes

peaks and dips

Seats change

frequenciesCarpeted areas suppress

mid frequencies

ERP RLR

MIC_GAIN

SPKR_GAIN

Test Setup Figure 27.

Procedure:

1. Create the test setup shown in the figure above. With the SL808xT, SL808xBT or SL808xBTA not mounted on the customer application, apply oscilloscope probes on AUDIOx_OUT_P and AUDIOx_IN_P, and a signal generator on AUDIOx_OUT_P. The scope trigger should be on AUDIOx_OUT_P.

2. The input stimulus on AUDIOx_OUT_P should preferably be pink or white noise at an appropriate level.

3. Set the oscilloscope to “Single Trig” and generate a signal burst.

4. Measure the echo delay, add the internal delay of the module to get the “total_delay_ms” then calculate the correct “echo_path_delay” value using the earlier mentioned formula.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 37

Application Audio Delay Scope Trace Example Figure 28.

The example in the figure above shows the echo delay response measured in a car.

Using the Appl_Delay of the example above gives a delay of 10.8ms + 10ms – 5ms = 15.8ms. The delay calculation results in an “echo_path_delay” parameter setting of 126Dec or 0x007E.

11.3.2 Adaptive Filter (AF) Parameters

AF_taps 11.3.2.1

The number of taps of the filter has been chosen to capture the most significant energy in the echo path impulse response, plus additional room/boundary echo. Typically, a larger number of taps is needed when the loudspeaker driver puts out more volume because there is more energy put into the space surrounding the loudspeaker and therefore longer delayed echo paths will be picked up by the microphone. These delays for each mode have been carefully selected and typically do not need adjustment.

The trade-off of increasing the number of taps is between the following items:

Higher number of taps = Increase the convergence time of the adaptive filter. (Bad for EC performance.)

Higher number of taps = Increased MIPS. (Not usually desirable.)

Higher number of taps = Better capture of longer echo delays. (Good for EC performance.)

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 38

AF-taps trade-offs (example only, not to scale) Figure 29.

Recommendation 11.3.2.1.1

Do not change from the default value in each mode (see Table 11 Examples of EC Parameter Settings).

AF_erl 11.3.2.2

To avoid divergence during doubletalk, the adaptive filter module uses an adaptive step size control that slows down the adaptation speed.

The physical ERL value can be measured knowing the Rx and microphone signal. The real physical value of the ERL can lead to a non-stable adaptive filter during doubletalk. This is especially the case in hands free mode. Choosing a higher ERL value has a positive impact on the stability of the solution. Such a choice will improve the quality of the near-end speech during doubletalk. However, the convergence of the adaptive filter can suffer from the increase of the AF_ERL.

This value has been selected so that convergence speed takes about 1 sec.

AF_erl Trade-Offs (example only, not to scale) Figure 30.

The convergence tuning example in the figure below illustrates the medium fast convergence tuning example.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 39

Medium Fast Convergence Tuning Example (less than 1s) Figure 31.

Recommendation 11.3.2.2.1

This value usually does not need to be changed from defaults in each mode.

NLPP_limit 11.3.2.3

The NLPP_limit is a clipper that is applied after NLPP_gain, and prior to both the adaptive filter and the audio output of the Rx path. Because an amplifier or speaker can be clipped or saturated for brief periods of time, even with a properly adjusted AAGC, it is best to create the clipping situation prior to the amplifier and speaker, so that it can be modeled better by the adaptive filter.

The NLPP_limit is by default set to -12dB (0x2000) since there is a fixed +12dB gain after the Rx AF-tap. This ensures that there can be no clipping in this gain stage. The NLPP_limit must be set lower if there is any positive gain in the digital domain, i.e. if the RxGain (AT+VGR) is set to +6dB, NLPP_limit must be set to -18dB. This will make sure that any amplifier saturation

will be properly modeled.

11.3.3 Dynamic Echo and noise Suppression Parameters

The following three dynamic echo and noise suppression (DENS) parameters: DENS_tail_portion (parameter 24), DENS_tail_alpha (parameter 23) and DENS_NL_atten (parameter 35) are important for making further adjustments to the preset values. The tuning order should be:

1. DENS_tail_portion

2. DENS_tail_alpha

3. DENS_NL_atten

DENS_tail_portion and DENS_tail_alpha 11.3.3.1

DENS_tail_portion represents the portion of the echo tail, present in the power estimated by the AF-filter that has to be extrapolated in time. When DENS_tail_portion is set too low, tail echoes are not suppressed sufficiently. When set too high, the echo tail is overestimated resulting in suppression of near-end speech during doubletalk.

If a default set of parameters has been chosen and there is no echo, tune this parameter down to the lowest point where there is still no echo; then increase by 0x0400.

DENS_tail_alpha represents the decay in energy of the echo tail of the impulse response. When DENS_tail_alpha is set too high, the echo tail is overestimated, resulting in suppression of near-end speech during doubletalk. If it is set too small, late echoes are not suppressed sufficiently.

Tune DENS_tail_alpha down to the lowest point where there is still no echo; then increase by 0x0400.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 40

DENS_tail_portion

DENS_tail_alpha

DENS_tail_portion and DENS_tail_alpha Echo Decay and Echo Tail Parameter Tradeoff (example only, not to scale) Figure 32.

DENS_NL_atten 11.3.3.2

DENS_NL_atten (Nonlinear Echo Power Estimation) controls the amount of nonlinear echo suppression; tradeoffs are:

a value that is too low will result in a high-frequency echo, and

a value that is too high will suppress high-frequency.

Turn down DENS_NL_atten to the lowest point where there is still no echo, then increase by 256. The typical range for this value is 0x0100 to 0x0400.

0x0200 0x0400 0x0600 0x0800 0x0A00

Nonlinear Echo Suppression Parameter Trade Off (example only, not to scale) Figure 33.

11.3.4 SPDET_xclip

A higher value makes nonlinear echo cancellation less aggressive. Setting it higher will provide better double talk performance in an application where nonlinear distortion is low.

If the microphone loudspeaker separation is good, and there is good echo loss without any EC enabled, then you could go higher on SPDET_xclip, starting from 0x0080 and make your way down towards 0x0001, lowering the value by half for each step, and converge on a value when the nonlinear echo is cancelled and there is still reasonable double talk performance. However, if nonlinearities are heard in the loudspeaker, DENS_NL_atten will have to be tuned, and SPDET_xclip has to be reduced.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 41

The microphone (Tx) voice quality will be affected if SDET_xclip is set too high. This will affect MOS score. Perform the voice quality, distortion, and MOS score tests after making any adjustments to this parameter to make sure that these items will pass conformance.

It should be possible to keep this parameter set to 0x0080 in a good implementation.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 42

12 Audio AT Commands Synthesis

The table below contains the AT commands referenced in this document and associated default values. For more details, refer to complete document R6 - AT Commands Interface Guide for Firmware 7.53.

Description Command Factory default values

(1) Value

change (3)

Comments

dB mode(2)

Index mode(2)

Value

Rx Codec Gain AT+VGR=x +VGR: 400 +VGR: 56 4dB Volatile See gain table in 12.1.1.

Tx Codec Gain AT+VGT=x +VGT: 2048 +VGT: 13 ~ 20.5dB Volatile Command is ignored during voice call. See gain table in 12.1.2.

Sidetone Gain AT+SIDET=1,x +SIDET: 1,-2406 +SIDET: 1,4 ~ -24dB Volatile AT+SIDET=0 to de-activate sidetone. See gain table in 12.1.3.

Rx Volume AT+CLVL=x AT+WDGR=1,x

+CLVL: 0 +WDGR: 1,0

+CLVL: 4 +WDGR: 1,4

0dB Volatile Non volatile

See gain table in 12.1.4.

Tx Volume AT+WDGT=1,x +WDGT: 1,0 +WDGT: 1,64 0dB Non volatile See gain table in 12.1.5.

Rx AVC AT+WAVC= 0,0,0 Disabled Non volatile See 9.1.2 for parameters definition.

Rx AGC AT+WAGC=0,… 0, … Disabled Non volatile See 9.1.1 for parameters definition.

Tx AGC AT+WAGC=1,… 0, … Disabled Non volatile See 9.2.2 for parameters definition.

Tx FIR Filtering AT+WADF=… 0,7,… Disabled Non volatile Tx FIR and Tx IIR are mutually exclusive. See 9.4.2 for parameters definition.

Rx FIR Filtering AT+WADF=… 0,8,… Disabled Non volatile Rx FIR and Rx IIR are mutually exclusive. See 9.4.2 for parameters definition.

Rx Multi-stage IIR AT+WADF=… 0,9,… Disabled Non volatile Tx FIR and Tx IIR are mutually exclusive. See 9.4.1 for parameters definition.

Tx Multi-stage IIR AT+WADF=… 0,10,… Disabled Non volatile Rx FIR and Rx IIR are mutually exclusive. See 9.4.1 for parameters definition.

Echo Cancellation AT+ECHO 0,1,1 Disabled Permanent See 9.5.1 for parameters definition.

(1) Value after FW download, after AT&F (reset to factory default) or after AT+VIP=1 (reset audio to factory default). See document R6 - AT Commands Interface Guide for Firmware 7.53 for more details.

(2) Gain values are expressed in dB or in Index. This is configured through configuration command AT+WBHV=8,0 (dB, factory default mode) or AT+WBHV=8,1 (index)

(3) Volatile change requires AT&W for the new value to be persistent to reset, Non Volatile means the new value is persistent to reset.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 43

12.1 Gain Tables

12.1.1 AT+VGR

Index mode

dB mode

Real dB value

Index mode

dB mode

Real dB value

Index mode

dB mode

Real dB value

Index mode

dB mode

Real dB value

0 -5200 -52.00 17 -3500 -35.00 34 -1800 -18.00 51 -100 -1.00

1 -5100 -51.00 18 -3400 -34.00 35 -1700 -17.00 52 0 0.00

2 -5000 -50.00 19 -3300 -33.00 36 -1600 -16.00 53 100 1.00

3 -4900 -49.00 20 -3200 -32.00 37 -1500 -15.00 54 200 2.00

4 -4800 -48.00 21 -3100 -31.00 38 -1400 -14.00 55 300 3.00

5 -4700 -47.00 22 -3000 -30.00 39 -1300 -13.00 56 400 4.00

6 -4600 -46.00 23 -2900 -29.00 40 -1200 -12.00 57 500 5.00

7 -4500 -45.00 24 -2800 -28.00 41 -1100 -11.00 58 600 6.00

8 -4400 -44.00 25 -2700 -27.00 42 -1000 -10.00 59 700 7.00

9 -4300 -43.00 26 -2600 -26.00 43 -900 -9.00 60 800 8.00

10 -4200 -42.00 27 -2500 -25.00 44 -800 -8.00 61 900 9.00

11 -4100 -41.00 28 -2400 -24.00 45 -700 -7.00 62 1000 10.00

12 -4000 -40.00 29 -2300 -23.00 46 -600 -6.00 63 1100 11.00

13 -3900 -39.00 30 -2200 -22.00 47 -500 -5.00 64 1200 12.00

14 -3800 -38.00 31 -2100 -21.00 48 -400 -4.00

15 -3700 -37.00 32 -2000 -20.00 49 -300 -3.00

16 -3600 -36.00 33 -1900 -19.00 50 -200 -2.00

12.1.2 AT+VGT

Index mode

dB mode

Real dB value

Index mode

dB mode

Real dB value

Index mode

dB mode

Real dB value

0 -8428 -84.28 8 851 8.51 16 2843 28.43

1 -954 -9.54 9 954 9.54 17 3002 30.02

2 -352 -3.52 10 1045 10.45 18 3135 31.35

3 0 0 11 1128 11.28 19 3251 32.51

4 249 2.49 12 1446 14.46 20 3354 33.54

5 443 4.43 13 2048 20.48 21 3445 34.45

6 602 6.02 14 2400 24.00 22 3528 35.28

7 735 7.35 15 2649 26.49

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 44

12.1.3 AT+SIDET

Index mode

dB mode

Real dB value

Index mode

dB mode

Real dB value

Index mode

dB mode

Real dB value

Index mode

dB mode

Real dB value

0 -7826 -78.26 17 -1151 -11.51 34 -549 -5.49 51 -197 -1.97

1 -3605 -36.05 18 -1101 -11.01 35 -524 -5.24 52 -180 -1.80

2 -3006 -30.06 19 -1054 -10.54 36 -499 -4.99 53 -163 -1.63

3 -2655 -26.55 20 -1009 -10.09 37 -475 -4.75 54 -147 -1.47

4 -2406 -24.06 21 -967 -9.67 38 -452 -4.52 55 -131 -1.31

5 -2213 -22.13 22 -927 -9.27 39 -430 -4.30 56 -115 -1.15

6 -2054 -20.54 23 -888 -8.88 40 -408 -4.08 57 -100 -1.00

7 -1921 -19.21 24 -851 -8.51 41 -386 -3.86 58 -85 -0.85

8 -1805 -18.05 25 -816 -8.16 42 -365 -3.65 59 -70 -0.70

9 -1703 -17.03 26 -782 -7.82 43 -345 -3.45 60 -55 -0.55

10 -1611 -16.11 27 -749 -7.49 44 -325 -3.25 61 -41 -0.41

11 -1528 -15.28 28 -717 -7.17 45 -305 -3.05 62 -27 -0.27

12 -1453 -14.53 29 -687 -6.87 46 -286 -2.86 63 -13 -0.13

13 -1383 -13.83 30 -657 -6.57 47 -268 -2.68 64 0 0

14 -1319 -13.19 31 -629 -6.29 48 -249 -2.49

15 -1259 -12.59 32 -601 -6.01 49 -231 -2.31

16 -1203 -12.03 33 -575 -5.75 50 -214 -2.14

12.1.4 AT+CLVL, AT+WDGR

By default the Rx Volume table is:

Index mode

dB mode

Real dB value

Index mode

dB mode

Real dB value

0 -5000 -50 4 -0 0

1 -1600 -16 5 400 4

2 -1000 -10 6 800 8

3 -400 -4 7 1200 12

If required, Rx Volume table can be modified during customer factory process. If Rx Volume table is modified:

Only the Index mode must be used for AT+CLVL/AT+WDGR. The dB mode is only applicable with the Rx Volume default table values are used.Setting the Index mode is done through AT+WBHV=8,1. Index mode applies then to all audio gain commands (AT+CLVL, AT+WDGR, AT+VGR, AT+VGT, AT+SIDET).

The Rx Volume table will NOT be reset to the above default values through AT&F or AT+VIP=1.

For modifying Rx Volume table, AT!AVRXVOLDB command shall be used. This command must only be used during factory process, and Rx volume table must and remain unchanged afterwards

Syntax : AT!AVRXVOLDB=<profile>,<generator>,<level>,<value>

<profile> : 0 for Analog Audio interface and 7 for PCM interface.

<generator> :0

<level>: index from 0 to 7

<value> : hex ASCII: 0000 – 04b0, FFFF – EC78 ; RX Volume parameter (signed) - volume in dB = value/100

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 45

Example:

at!avrxvoldb=<profile>,0,0,EC78 ;# -50dB

at!avrxvoldb=<profile>,0,1,F8F8 ;# -18dB

at!avrxvoldb=<profile>,0,2,FAEC ;# -13dB

at!avrxvoldb=<profile>,0,3,FCE0 ;# -8dB

at!avrxvoldb=<profile>,0,4,FED4 ;# -3dB

at!avrxvoldb=<profile>,0,5,00C8 ;# 2dB

at!avrxvoldb=<profile>,0,6,02BC ;# 7dB

at!avrxvoldb=<profile>,0,7,04B0 ;# 12dB

12.1.5 +WDGT

Gain in Index

Gain in dB

Real dB value

Gain in Index

Gain in dB

Real dB value

Gain in Index

Gain in dB

Real dB value

Gain in Index

Gain in dB

Real dB value

0 -8428 -84.28 64 0 0.00 128 602 6.02 192 954 9.542

1 -3608 -36.08 65 13 0.13 129 608 6.08 193 958 9.58

2 -3008 -30.08 66 26 0.26 130 615 6.15 194 963 9.63

3 -2656 -26.56 67 39 0.39 131 622 6.22 195 967 9.67

4 -2407 -24.07 68 52 0.52 132 628 6.28 196 972 9.72

5 -2213 -22.13 69 65 0.65 133 635 6.35 197 976 9.76

6 -2055 -20.55 70 77 0.77 134 641 6.41 198 980 9.80

7 -1921 -19.21 71 90 0.90 135 648 6.48 199 985 9.853

8 -1805 -18.05 72 102 1.02 136 654 6.54 200 989 9.89

9 -1703 -17.03 73 114 1.14 137 661 6.61 201 994 9.94

10 -1612 -16.12 74 126 1.26 138 667 6.67 202 998 9.98

11 -1529 -15.29 75 137 1.37 139 673 6.73 203 1002 10.022

12 -1453 -14.53 76 149 1.49 140 679 6.79 204 1006 10.069

13 -1384 -13.84 77 160 1.60 141 686 6.86 205 1011 10.11

14 -1319 -13.19 78 171 1.71 142 692 6.92 206 1015 10.15

15 -1259 -12.59 79 182 1.82 143 698 6.98 207 1019 10.19

16 -1203 -12.03 80 193 1.93 144 704 7.04 208 1023 10.23

17 -1151 -11.51 81 204 2.04 145 710 7.10 209 1027 10.27

18 -1101 -11.01 82 215 2.15 146 716 7.16 210 1032 10.32

19 -1054 -10.54 83 225 2.25 147 722 7.22 211 1036 10.36

20 -1010 -10.10 84 236 2.36 148 728 7.28 212 1040 10.40

21 -967 -9.67 85 246 2.46 149 734 7.34 213 1044 10.44

22 -927 -9.27 86 256 2.56 150 739 7.39 214 1048 10.48

23 -888 -8.88 87 266 2.66 151 745 7.45 215 1052 10.52

24 -851 -8.517 88 276 2.76 152 751 7.51 216 1056 10.56

25 -816 -8.16 89 286 2.86 153 757 7.57 217 1060 10.60

26 -782 -7.822 90 296 2.96 154 762 7.62 218 1064 10.64

27 -749 -7.49 91 305 3.05 155 768 7.68 219 1068 10.68

28 -717 -7.17 92 315 3.15 156 773 7.73 220 1072 10.72

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 46

Gain in Index

Gain in dB

Real dB value

Gain in Index

Gain in dB

Real dB value

Gain in Index

Gain in dB

Real dB value

Gain in Index

Gain in dB

Real dB value

29 -687 -6.87 93 324 3.24 157 779 7.79 221 1076 10.76

30 -658 -6.58 94 333 3.33 158 784 7.84 222 1080 10.80

31 -629 -6.29 95 343 3.43 159 790 7.90 223 1084 10.84

32 -601 -6.01 96 352 3.52 160 795 7.95 224 1088 10.88

33 -575 -5.75 97 361 3.61 161 801 8.01 225 1092 10.92

34 -549 -5.49 98 370 3.70 162 806 8.06 226 1095 10.95

35 -524 -5.24 99 378 3.78 163 812 8.12 227 1099 10.99

36 -499 -4.99 100 387 3.87 164 817 8.17 228 1103 11.03

37 -475 -4.75 101 396 3.96 165 822 8.22 229 1107 11.07

38 -452 -4.52 102 404 4.04 166 827 8.27 230 1111 11.11

39 -430 -4.30 103 413 4.13 167 833 8.33 231 1114 11.14

40 -408 -4.08 104 421 4.21 168 838 8.38 232 1118 11.18

41 -386 -3.86 105 430 4.30 169 843 8.43 233 1122 11.22

42 -365 -3.65 106 438 4.38 170 848 8.48 234 1126 11.26

43 -345 -3.45 107 446 4.46 171 853 8.53 235 1129 11.29

44 -325 -3.25 108 454 4.54 172 858 8.58 236 1133 11.33

45 -305 -3.05 109 462 4.62 173 863 8.63 237 1137 11.37

46 -286 -2.86 110 470 4.70 174 868 8.68 238 1140 11.40

47 -268 -2.68 111 478 4.78 175 873 8.73 239 1144 11.44

48 -249 -2.49 112 486 4.86 176 878 8.78 240 1148 11.48

49 -231 -2.31 113 493 4.93 177 883 8.83 241 1151 11.51

50 -214 -2.14 114 501 5.01 178 888 8.88 242 1155 11.55

51 -197 -1.97 115 509 5.09 179 893 8.93 243 1158 11.58

52 -180 -1.80 116 516 5.16 180 898 8.98 244 1162 11.62

53 -163 -1.63 117 524 5.24 181 903 9.03 245 1165 11.65

54 -147 -1.47 118 531 5.31 182 907 9.07 246 1169 11.69

55 -131 -1.31 119 538 5.38 183 912 9.12 247 1173 11.73

56 -115 -1.15 120 546 5.46 184 917 9.17 248 1176 11.76

57 -100 -1.00 121 553 5.53 185 922 9.22 249 1180 11.80

58 -85 -0.85 122 560 5.60 186 926 9.26 250 1183 11.83

59 -70 -0.70 123 567 5.67 187 931 9.31 251 1187 11.87

60 -56 -0.56 124 574 5.74 188 935 9.35 252 1190 11.90

61 -41 -0.41 125 581 5.81 189 940 9.40 253 1193 11.93

62 -27 -0.27 126 588 5.88 190 945 9.45 254 1197 11.97

63 -13 -0.13 127 595 5.95 191 949 9.49 255 1200 12.00

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 47

13 Example of AT command for Audio Tuning

Below is an example of AT command sequence, allowing to set an audio parameter tuning optimized for car environment against P1100 specification.

AT+WBHV=8,0 ;Gains input in dB mode

AT+VGR=0 ;Tx codec gain = 0dB

AT+SIDET=0 ;Sidetone disabled

AT+VGT=0 ;Tx codec gain = 0dB

AT+WDGT=1,-816 ;Tx volume = -8.16dB

AT+WDGR=1,0 ;Rx Volume = 0dB

AT+WAVC=0,0,0 ;AVC disabled

AT+WAGC=0,0 ;AGC Rx disabled

AT+WAGC=1,0 ;AGC Tx disabled

AT+WADF=1,8,65407,64727,64564,64737,65037,65082,15878 ;Rx FIR set and enabled

AT+WADF=0,7 ;Tx FIR filter disabled

AT+ECHO=1,1,1,32767,2048,32767,6047,0,144,2048,8192,8192,256,140,2,400,32,32,14000,64,

16800,2048,99,20000,20000,64,16384,8704,0,80,224,7680,450,512,768,600,200,5193,768,130

00,4000 ;Echo canceller set and enabled

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 48

14 Migration table between AMSS only and OAT AT commands

This section is intended for people having already performed some tuning using AMSS commands on a similar solution.

It provides correspondence between the two command sets to obtain directly the new setup based on previous tuning.

14.1 AT commands comparison

The block diagram provides an high level comparison of the two AT command set.

The OAT command set do not support several profiles, except for AT+ECHO command.

For simplification, the mapping provided in next sub-sections is shown for AMSS commands on profile = 0.

Section “4713 Example of AT command for Audio Tuning” offers as well an example that can be used help the understanding of the command syntax and comparison.

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 49

14.2 Gain control commands

For gains commands,

AMSS command use 1/16384 linear values, coded as hexadecimal.

OAT commands can use gain values expressed in 2 modes (read section 12)

o In dB mode: 1/100dB gain values, coded as decimal. For range, check gain tables of section 12.

o In Index mode: use index of gain tables of section 12.

Function OAT AT command AMSS AT command

Rx Codec Gain AT+VGR=100x20.log(rxgain/16384) AT!AVCODECRXG=0, rxgain

Tx Codec Gain AT+VGT= 100x micgain_db

+ 100x20.log(txgain/16384)

AT!AVCODECTXG=0, txgain

AT!AVMICGAIN=0,<4|14> (4: micgain_db=0dB, 14: micgain_db=+24dB)

Sidetone Gain

If sidetonegain=0

AT+SIDET=0

If sidetonegain<>0

AT+SIDET=1,100x20.log(sidetonegain/16384)

AT!AVCODECSTG=0, sidetonegain

Rx Volume

If gain index mode

AT+CLVL=vol_index or

AT+WDGR=1,vol_index

If db mode

AT+CLVL= vol_db or

AT+WDGR=1,vol_db

with vol_db determined from default Rx volume table 12.1.4.

AT+CLVL=0,vol_index

or

AT!AVSETVOL=0,0,vol_index

Tx Volume AT+WDGT=1,100x20.log(txgain/16384) AT!AVCODECRXG=0,txgain

14.3 Audio processing control commands

Function OAT AT command AMSS AT command

Rx AVC

AT+WAVC=avcmode, avc1/256, avc2/256

with avcmode=1 to enable, 0 to disable and avcn in decimal

AT!AVRXAVCLIST=0,avc1,avc2 with avcn in hexadecimal

AT!AVRXAGC=0,AVCAGCmode

Rx AGC

AT+WAGC=0,agcrxmode,agcrx1,agcrx2,agcrx3,agcrx4,agcrx5,agcrx6

with agcrxmode=1 to enable, 0 to disable

and agcrxn in hexadecimal

AT!AVRXAGCLIST=0,agcrx1,agcrx2,agcrx3,agcrx4,agcrx5,agcrx6 with agcrxn in hexadecimal

AT!AVRXAGC=0,AVCAGCmode

Tx AGC

AT+WAGC=1,agctxmode,agctx1,agctx2,agctx3,agctx4,agctx5,agctx6

with agctxmode=1 to enable, 0 to disable

and agctxn in hexadecimal

AT!AVRXAGCLIST=0,agctx1,agctx2,agctx3,agctx4,agctx5,agctx6 with agctxn in hexadecimal

AT!AVRXAGC=0,AVCAGCmode

Tx FIR Filtering

AT+WADF=firtxmode,7,taptx0,tatx1,taptx2,taptx3,taptx4,taptx5,taptx6

with firtxmode=1 to enable, 0 to disable

and taptxn in decimal

AT!AVTXPCMFLTR=0,n,taptxn with taptxn in hexadecimal and n in 0..6 and Tx FIR is disabled if taptx6=0

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 50

Function OAT AT command AMSS AT command

Rx FIR Filtering

AT+WADF=firrxmode,8,taprx0,taprx1,taprx2,tarx3,taprx4,taprx5,taprx6

with firrxmode=1 to enable, 0 to disable

and taprxn in decimal

AT!AVTXPCMFLTR=0,n,taprxn with taprxn in hexadecimal and n in 0..6 and Rx FIR is disabled if taprx6=0

Echo Cancellation

AT+ECHO=ecmode,1,ecprofile[,param1,param2,…,param36,param37]

with ecmode =1 to enable EC, 0 to disable EC and ecprofile in 1..4 and paramn in decimal

AT!AVADVEC=ecprofile,n,ecparamn with ecparamn in hexadecimal and n in 0..37 and ecprofile in 0..4 (0= disable)

SL8x OAT Audio Tuning Guide

2174046-01.06

2174046 Rev 01.06 January 6, 2015 51

15 Support

For direct clients: contact your Sierra Wireless FAE

For distributor clients: contact your distributor FAE

For distributors: contact your Sierra Wireless FAE

16 Document History

Level Date History

01.00 April 23, 2014 Document creation

01.01 June 12, 2014 Block Diagram udpated

01.02 September 12, 2014 Added decimal values

01.03 December 12, 2014 RxVolume configuration, Main Block Diagram, Default values updated.

AT+ECHO description enhanced

01.04 December 19, 2014 Added sections: “12 Audio AT Commands Synthesis” and “14 Migration table between AMSS only and OAT AT commands”

01.05 December 23, 2014 AGC Rx/Tx: description updated, not recommended for P1100 testing.

01.06 January 6, 2015 +WADF syntax description added.

17 Legal Notice

Important Notice

Due to the nature of wireless communications, transmission and reception of data can never be guaranteed. Data may be delayed, corrupted (i.e., have errors) or be totally lost. Although significant delays or losses of data are rare when wireless devices such as the Sierra Wireless modem are used in a normal manner with a well-constructed network, the Sierra Wireless modem should not be used in situations where failure to transmit or receive data could result in damage of any kind to the user or any other party, including but not limited to personal injury, death, or loss of property. Sierra Wireless accepts no responsibility for damages of any kind resulting from delays or errors in data transmitted or received using the Sierra Wireless modem, or for failure of the Sierra Wireless modem to transmit or receive such data.

Safety and Hazards

Do not operate the Sierra Wireless modem in areas where cellular modems are not advised without proper device certifications. These areas include environments where cellular radio can interfere such as explosive atmospheres, medical equipment, or any other equipment which may be susceptible to any form of radio interference. The Sierra Wireless modem can transmit signals that could interfere with this equipment. Do not operate the Sierra Wireless modem in any aircraft, whether the aircraft is on the ground or in flight. In aircraft, the Sierra Wireless modem MUST BE POWERED OFF. When operating, the Sierra Wireless modem can transmit signals that could interfere with various onboard systems.

Note: Some airlines may permit the use of cellular phones while the aircraft is on the ground and the door is open. Sierra Wireless modems may be used at this time.

The driver or operator of any vehicle should not operate the Sierra Wireless modem while in control of a vehicle. Doing so will detract from the driver or operator’s control and operation of that vehicle. In some states and provinces, operating such communications devices while in control of a vehicle is an offence.

Limitations of Liability

This manual is provided “as is”. Sierra Wireless makes no warranties of any kind, either expressed or implied, including any implied warranties of merchantability, fitness for a particular purpose, or noninfringement. The recipient of the manual shall endorse all risks arising from its use. The information in this manual is subject to change without notice and does not represent a commitment on the part of Sierra Wireless. SIERRA WIRELESS AND ITS AFFILIATES SPECIFICALLY DISCLAIM LIABILITY FOR ANY AND ALL DIRECT, INDIRECT, SPECIAL, GENERAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES INCLUDING, BUT NOT LIMITED TO, LOSS OF PROFITS OR REVENUE OR ANTICIPATED PROFITS OR REVENUE ARISING OUT OF THE USE OR INABILITY TO USE ANY SIERRA WIRELESS PRODUCT, EVEN IF SIERRA WIRELESS AND/OR ITS AFFILIATES HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR THEY ARE FORESEEABLE OR FOR CLAIMS BY ANY THIRD PARTY. Notwithstanding the foregoing, in no event shall Sierra Wireless and/or its affiliates aggregate liability arising under or in connection with the Sierra Wireless product, regardless of the number of events, occurrences, or claims giving rise to liability, be in excess of the price paid by the purchaser for the Sierra Wireless product. Customer understands that Sierra Wireless is not providing cellular or GPS (including A-GPS) services. These services are provided by a third party and should be purchased directly by the Customer. SPECIFIC DISCLAIMERS OF LIABILITY: CUSTOMER RECOGNIZES AND ACKNOWLEDGES SIERRA WIRELESS IS NOT RESPONSIBLE FOR AND SHALL NOT BE HELD LIABLE FOR ANY DEFECT OR DEFICIENCY OF ANY KIND OF CELLULAR OR GPS (INCLUDING A-GPS) SERVICES.

Patents

This product may contain technology developed by or for Sierra Wireless Inc. This product includes technology licensed from QUALCOMM

®.

This product is manufactured or sold by Sierra Wireless Inc. or its affiliates under one or more patents licensed from InterDigital Group and MMP Portfolio Licensing.

Copyright

© 2014 Sierra Wireless. All rights reserved.

Trademarks

Sierra Wireless®, AirPrime

®, AirLink

®, AirVantage

®, WISMO

® and the Sierra Wireless and Open AT logos are registered trademarks of Sierra Wireless, Inc. or one of its subsidiaries.

Watcher® is a registered trademark of Netgear, Inc., used under license.

Windows® and Windows Vista

® are registered trademarks of Microsoft Corporation.

Macintosh® and Mac OS X

® are registered trademarks of Apple Inc., registered in the U.S. and other countries.

QUALCOMM® is a registered trademark of QUALCOMM Incorporated. Used under license.

Other trademarks are the property of their respective owners.