Sie sind auf Seite 1von 34

Alango

Voice Communication Package (VCP)


DSP library for Qualcomm (CSR)
BC05MM, 8670 and 8675 platform

Presentation revision 2.7, July 2017 (VCP v7.99, rev3419+)


1
This presentation covers the following topics:

General information about Alango VCP library and its DSP processing blocks
VCP configuration
Software aspects of VCP integration
Hardware aspects of VCP integration
Acoustic tuning procedures

2
Alango Technologies Ltd.
General information about
VCP on Qualcomm (CSR) BC05MM, 8670,
8675 platforms

3
Alango Technologies Ltd.
General VCP info audio processing

Standard Alango VCP library for Qualcomm


(CSR) BC05MM, 8670, 8675 contains the
following audio processing blocks:

Tx (microphone) channel:
Adaptive Dual Microphone (ADM) with
Wind noise reduction (WNR)
Acoustic Echo Canceller (AEC)
Residual Echo Suppressor (ES) with
Harmonics Generator (HG)
Noise Suppressor (NS) in 128 bands
Frequency equalizer (EQ) in 32 bands
Noise Gate (NG)
Dynamic Range Compressor (DRC)
Automatic Gain Control (AGC)
Rx (loudspeaker) channel:
Frequency equalizer (EQ) in 32 bands Alango VCP is a general purpose DSP package
Noise Suppressor (NS) and Noise Gate (NG) suitable for different types of voice terminals:
Dynamic Range Compressor (DRC) Embedded, portable and installable hands-free car kits
Automatic Gain Control (AGC) mono and stereo headsets
Signal Clipper (booster) office speakerphones
Double Talk Gain Control (DTGC) Bluetooth-enabled car stereo
Noise Dependant Volume Control (NDVC) etc.
EasyListen
And also: capturing digital input/output signals on PC 1/2/3/4/6-mic devices are supported.
directly from inside Kalimba DSP using only 1 GPIO pin
in real-time (refer to slide 32)
4
Alango Technologies Ltd.
General VCP info types of VCP library

Two types of VCP library are available:


VCP for headsets (VCP HS) MIPS/mA optimized version of VCP for Bluetooth headsets
VCP for hands-free (VCP HF) VCP for hands-free devices

In addition, VCP can be:


1mic VCP for standard 1 microphone devices
2mic VCP for dual-mic enabled devices, for extended duplex and noise reduction
performance
3-, 4-mic and 6-mic VCP for multi-microphone voice terminals

Supported speech codecs / modes:


standard 8 KHz CVSD narrow band speech VCP
wide-band speech (WBS) 16 KHz VCP
super wide-band 24 KHz VCP (optional)
line-in and USB audio are supported

Any combinations of the above VCP versions are available:


VCP-HF-1mic, VCP-HS-2mic, VCP-HF-WBS-1mic, etc.

If the standard VCP library does not meet customers requirements Alango can easily modify the
library (remove or add DSP blocks) to meet the requirements. This is done thanks to the modular
structure of the DSP code and algorithms allowing easy modifications.
5
Alango Technologies Ltd.
General VCP info place of VCP inside BC05MM

VCP is a DSP library that runs on Qualcomm


(CSR) BC05MM, 8670, 8675 Kalimba DSP.

VCP library:
runs in Kalimba DSP
is controlled by BC05MM MCU (Virtual
Machine, VM) by means of messages
reads its parameters directly from PSKEY
(PSTORE)
Indirectly controls ADC/DAC gains via VM
messages (if not overridden by VM)

6
Alango Technologies Ltd.
General VCP info VCP library info and integration

VCP library is provided as compiled image for DSP (.KAP-file) ready for linking
VCP.KAP comes as a full replacement of CSR CVC library no integration is needed, just replace
CVC.KAP with VCP.KAP.

VCP.KAP is compatible with all CSR SDKs: ADK 4.2, 4.1, 4.0, 3.x, 2.x, 1.x, mono/stereo SDK 2010,
2009 R1/R2, 2008 R1/R2, 2007, BlueLab 3.6.*, BlueLab 3.5.*, RoadTunes
VCP is fully compatible with CSR CVC in terms of API (same messages, same CVC plug-in is used)
VCP supports additional DSP functionality such as rotary (upon request)
VCP comes with VCP Configurator a user-friendly PC GUI (MS Windows) utility for convenient
VCP configuration.

7
Alango Technologies Ltd.
General VCP info VCP Configurator

VCP Configurator - is a
GUI (MS Windows)
application providing
easy and intuitive way
to configure and
manage VCP
parameters.

Has two GUI modes:


Simple View
Expert View

VCP Configurator:
Schematically
represents all DSP blocks and allows changing their parameters. Allows to control and configure:
all VCP signal processing blocks (ADM, AEC, NS, AGC, EQ, )
DAC/ADC gains (with standard VM support) and VCP internal TX/RX digital gains
Special audio debugging features like audio channel bypass, test beeps, saturation beeps,
VCP license data
Generates VCP configuration string and allows storing it directly inside PSKEY via SPI. VCP reads its
parameters from PSKEY during init
Allows applying changed parameters on-the-fly
Allows loading/saving VCP parameter profiles (with text notes)
8
Alango Technologies Ltd.
General VCP info VCP Configurator

VCP Configurator has two Simple View


GUI modes:
Simple View
Expert View

Expert View
Simple view is developed especially for those users who are not well familiar with VCP parameters but want to
achieve acceptable tuning results quickly. Simple View appears in VCP Configurator by default and shows several
simple knobs allowing to easily control the most important DSP blocks of VCP: Acoustic Echo Canceller, Noise
Reduction, Gain Control, EQ, and Double Talk Gain Control. The user can switch to Expert View at any time to review
actual VCP parameter settings. Parameters that were set in Simple View appear protected (not editable) in the
Expert View. To enable editing, the user should press Enable Editing button.
9
Alango Technologies Ltd.
General VCP info tuning requirements
CSR PSTool utility allows browsing and
editing BC5MM / 867x Persistent Store
To allow VCP tuning, one of the following HW options manually
must be available:
direct access to PSKEYs using SPI cable (better, simpler,
more reliable)
indirect access to PSKEYs using SW means (requires
special treatment)
If none of these options are
available there is no way to
change VCP parameters and
thus to tune VCP.

SW tuning requirement: device


software (DFU) must allow
pairing/connecting to PC
Bluetooth dongle (to
Car stereo with SPI cable
stream/record audio on PC).

/ Connecting to PC BT dongle is
generally not a problem. However,
some HF car kits may have issues
connecting to BT dongles due to BT
profiles incompatibility. /
Bluetooth device with SPI cable
connected to CSR LPT-debugger (1309)
10
Alango Technologies Ltd.
General VCP info on-the-fly parameters change

If SPI is available, new VCP parameters can


be applied on-the-fly (during active voice
call, no need to reconnect audio) directly
from VCP Configurator. VCP Configurator
stores new parameters directly inside PSKEY.

VCP running in DSP detects and applies new


parameters within 5 seconds.

VCP produces beeps on the


downlink channel (RX) as a
confirmation that the new
parameters has been applied.

11
Alango Technologies Ltd.
Integration of VCP into
Qualcomm (CSR) BC05MM, 8670, 8675
application

12
Alango Technologies Ltd.
VCP integration does it run?

After integrating VCP library (replacing CVC.KAP by VCP.KAP), make sure that VCP is indeed
integrated and running
in VCP Configurator check TX RX beeps debug mode and apply parameters
initiate voice call (pair/connect to phone or PC and call)
if VCP is inside - you should hear short frequent beeps via RX and TX
then turn off TX RX beeps feature, apply, and make sure that the beeps disappeared
if you hear long periodical long beeps in the both cases, it probably means that VM points VCP
on wrong PSKEY, or PSKEY data is incorrect/wrong version, or VCP.KAP is not integrated at all.

13
Alango Technologies Ltd.
VCP integration operating with downlink volume
Standard CSR SDK/application
For optimal AEC performance, VCP should be notified about volume
changes. This is especially important in devices with problematic
acoustics compact devices with strong and/or distorted echo.

In standard SDK applications in which amplifier/loudspeaker are


connected to BC05MM / 867x DAC directly, and volume control
is performed internally in VM by standard SDK means, VCP is
automatically notified about volume changes by VM using
standard messages mechanism.
In applications where BC05MM is
connected to external codec and
external MCU, integrator should care Application with external codec and MCU
about proper notification of VCP.
Namely, VM should receive
notifications about volume changes
and send appropriate messages to VCP.

there are applications in which the


current volume is not known (e.g.
devices with external analog volume
knob)

VCP Configurator has a special RX


volume beeps mode allowing to
check/debug volume control easily. more details on the next two slides ==> 14
Alango Technologies Ltd.
VCP integration operating with downlink volume (cont.)
Standard CSR SDK/application
In a standard CSR SDK application the
amplifier/loudspeaker are connected to
BC05MM / 867x DAC directly. In such case the
volume control is performed by VM by setting
the corresponding DAC gain as follows:

1. User presses VOL+ or VOL- button

2. VM sends message to DSP (VCP) with


numerical value of the new volume
(from 0 to 15)

3. DSP (VCP) verifies that the new volume


value is within the limits (parameters set by
VCP Configurator). If it is, VCP replies VM with
a message containing the same value
(confirmation). Otherwise, it replies with the
value that is the lowest or largest possible

4. VM receives the reply message from VCP


and applies the obtained volume on DAC
Note 1: VCP does not (has no means to) apply the volume on DAC directly, VM does this!
Note 2: The above process is valid only for standard CSR SDK. In modified applications, VM may ignore DSP
messages and/or set its own volume irrespective to DSP (VCP) replies.
15
Alango Technologies Ltd.
VCP integration operating with downlink volume (cont.)

In applications where BC05MM / Application with external codec and MCU


867x is connected to external codec
and external MCU, integrator
should care about proper
notification of VCP. Namely, VM
should receive notifications about
volume changes and send
appropriate messages to VCP.

Here is an example of correct


process in this case:

1. User presses VOL+ or VOL-


button

2. External MCU:
sends notification to VM about the new volume setting
applies the new volume on external codec

3. VM sends standard message to DSP (VCP) containing the new volume setting (from 0 to 15)

NOTE: a proper correspondence should be achieved between external codec volume steps and VCP
volume steps. VCP volume is a number from 0 to 15, 1 step is equal to 3 dB (15 = 0 dB, 14 = -3 dB, 13 = -
6 dB, etc.)
16
Alango Technologies Ltd.
VCP integration acoustic modes

One device may have several acoustic modes


(example: car kit with internal loudspeaker and
FM-transmitter). In such devices, separate acoustic
VCP configurations are required to support
different acoustic modes.

Acoustic profiles should be stored in different


PSKEYs and VM should initialize VCP with an
appropriate PSKEY depending on the active
acoustic mode. This requires modifying standard
CSR application / CVC plug-in.

17
Alango Technologies Ltd.
VCP integration license data

VCP is a commercial DSP software product requiring activation with a license key.

Each license key corresponds to a specific Bluetooth MAC-addresses range.


Examples:
VCP license data: 1234 5678 ABCD EF12 0123 4567 89AB CDEF

MACs from: 0011 22 000100 to: 0011 22 000FFF

VCP license data: 0987 6543 21FE DCBA 1234 5678 ABCD EF01

MACs from: 0011 22 005000 to: 0011 22 005FFF


One license supports only one gapless range of Bluetooth MAC-addresses.

License key should be stored in PSKEY. The PSKEY with license must be properly pointed by
VCP parameters PSKEY data.

With a valid license key that corresponds to the MAC-address of the device running VCP, VCP operates
in a fully functional mode.
With a special demo license, VCP works in demonstration mode allowing 7 (seven) minutes of normal
operation without interruptions; after this period of time RX channel is fully muted.
If no license is found, or license data is incorrect, VCP produces constant beep via RX channel
immediately after the start.
18
Alango Technologies Ltd.
VCP acoustic tuning general explanation

19
Alango Technologies Ltd.
VCP acoustic tuning acoustic profiles

There are no any general acoustic VCP profiles each device must be tuned individually because acoustic
characteristics of different devices differ significantly:
different sizes, different materials, different shapes
different components (loudspeakers, mics) having different characteristics, positions and casing
==> different distortions, echo, signal levels ==> different gains, EQ and VCP parameters
Different acoustic designs

spk echo path mic

Generally, compact devices are more problematic as they have smaller dimensions and components, worse acoustic separation, high
loudness requirements and limited power ==> higher distortions and louder echo as a result.
VCP can deal with almost any acoustic design, but duplex can be affected by strong and/or distorted echo.
For installable device using car speakers, the car environment is typical and is generally easy (car speakers are of a good quality,
amplifiers have no power limitation ==> linear echo).

20
Alango Technologies Ltd.
VCP acoustic tuning what can be tuned and what cannot

Final (or pre-final) tuning can be done with pre-production samples, near-final components
and circuitry casing, plastic, locations, PCB, isolation, etc

Any change in components affecting acoustics may require retuning

BAD: PCB is outside, not final casing Good! Pre-final sample, finalized body
and components. Even preliminary and PCB.
tuning is useless.
21
Alango Technologies Ltd.
VCP acoustic tuning prerequisites

Following is the typical equipment used during tuning works:


Device sample (2 or more is better)
Mouth simulator to simulate end-user voice
External loudspeakers to simulate ambient noises and special
test signals
External microphone to record downlink (loudspeaker) signal
SPL meter
PC with Bluetooth dongle (IVT BlueSoleil) to reproduce and
record signals via Bluetooth link in controllable conditions
Audio recording/analysis software (Adobe Audition, Syntrillium
CoolEdit)
Set of speech and noise recordings (test vectors)
Set of mobile phones for
real voice tests
At least two cars of
different types with car
speakers (for field tests
with hands-free devices)

22
Alango Technologies Ltd.
VCP acoustic tuning tuning stages

Typical tuning work flow looks as follows:


1. In-lab:
2. In-lab: 3. In-lab:
Preliminary
Preliminary Testing with 4. Field tests
tests and
tuning phones
measurements

How long:
1-3 days with problems-free devices

Requirement:
The device must be connectable to PC Bluetooth dongle to allow audio streaming to/from PC.

Work flow in details:


1. In-lab: preliminary tests characterizing/checking device acoustics and audio paths
by streaming/recording/analyzing test signals on PC via Bluetooth dongle

2. In-lab: preliminary tuning with PC via Bluetooth connection


by streaming/recording/analyzing speech and noise recordings

3. In-lab: checking with phone calls, further parameters adjustment


by making calls in the lab using different phones

4. Field-tests, fine-tuning, finalizing

23
Alango Technologies Ltd.
VCP acoustic tuning in details

24
Alango Technologies Ltd.
VCP acoustic tuning tests in bypass mode

At the very first tuning stage, VCP Car stereo with external microphone under lab test:
laptop, BT dongle, SPI connection, external loudspeaker
bypass mode is used to analyze and
characterize audio channels.

1. Pair/connect the device to PC


using Bluetooth dongle

2. Switch VCP into bypass mode


to allow signals pass-through without
any processing

3. Perform test recordings


- stream test signals from PC to the
device via Bluetooth (RX) and record
them on PC using external microphone
- reproduce test signals using PC and
external loudspeakers, and record
corresponding microphone signals (TX)
on PC
4. Analyze obtained recordings
characterize RX and TX channels (and components) quality, noises, dynamic range, signal corruptions, frequency response,
resonances, amount of echo, etc.

5. Conclude
about allowed gains range, echo characteristics, distortions; decide about allowed gains settings (e.g. providing no-clipping
echo capturing and good end-users voice resolution), channels EQ corrections, preliminary AEC and NS parameters, etc.

25
Alango Technologies Ltd.
VCP acoustic tuning configuring RX

Its important to define RX gain and EQ parameters prior to AEC tuning. RX settings impact on echo
characteristics and therefore on AEC parameters.
Optimize RX
Optimize
Adjust RX EQ gain control
Noise Gate
(AGC/DRC)
Adjust RX EQ
attenuate resonant frequencies (if any) to decrease vibrations and distortions
attenuate non-reproducible low frequencies to allow higher volume (relevant for
compact devices)
compensate for loudspeaker and enclosure peculiarities and to provide good voice
quality
This can make echo problem less problematic. 32 band EQ in VCP Configurator

Optimize RX gain control functions (RXout, AGC and DRC)


Check loudness
AGC compensates for varying levels of network signal (may vary with phone and
network)
compact devices with limited dynamic range may require signal compression (DRC)
to be applied on RX to allow higher loudness (DRC is applied after AGC Example of speech with normalized level
compensation). RX level limitation maybe necessary to reduce distortions
Optimize RX Noise Gate (expander) parameters
VCP allows to suppress idle and low-level noises and signals on RX by applying dynamic range expander. This improves RX quality
and AEC performance in compact devices.

The above steps define level of echo captured by the microphone and are critical for optimal AEC
performance.
26
Alango Technologies Ltd.
VCP acoustic tuning defining TX (mic) gain

Microphone (ADC) gain should be defined carefully:


It should not be high to avoid clipping of echo (that may affect duplex performance)
It should not be too low to allow enough amplitude resolution (=SNR) for users voice
==> sometimes its not easy task and theres often a trade-off!

1. Set VCP to TX bypass mode and analyze level of captured echo and level of typical voice
2. Chose ADC gain accordingly

Users voice level is too low

Echo level is too high Users voice level is too high

Important! Never compensate for low TX output level by increasing microphone gain! Use TX AGC and
DRC instead!
VCP Configurator has a special TX saturation mode forcing VCP to produce beeps when saturation of
the microphone (input) signal occurs.
27
Alango Technologies Ltd.
VCP acoustic tuning AEC tuning

AEC tuning comprises in finding optimal parameters for adaptive Unprocessed echo
filters and non-linear processor (residual echo suppressor ES)
taking into account amount of non-linear distortions and their
characteristics measured on previous steps.
Filtered
1. Determine and define optimal filter length
Mostly depends on target environment and device form-
factor
Compact device => relatively low volume => short echo => short
filters (60 ms) Filtered, better result
Office speakerphone => high volume, reverberant room => long
echo => long filters (> 120 ms)
Car environment => relatively short echo => relatively short filters
(80 ms)
(NB: Echo tail can be easily determined in the bypass mode by Filtered, better result
analyzing the echo recording)

2. Find optimal ES parameters


Mostly depend on device acoustic design and
Filtered, no improvement
characteristics
The idea comprises in finding ES parameters allowing absolutely
echo-free output, and then their gradual relaxation ensuring optimal
duplex performance. Non-linear distortions of echo (determined
earlier) are taken into account using special ES mechanisms.

Most of AEC tuning works are performed by visually analyzing spectrograms of TX output recordings (on PC).
28
Alango Technologies Ltd.
VCP acoustic tuning NS tuning

VCP introduces two different approaches (two modes) to noise reduction:

Static noise reduction


in this mode NS attenuates noise by a constant factor (parameter), irrespective to the measured ambient noise level

Typical settings:
-6 -9 dB noise reduction

Before processing After NS processing

Ambient noise level dependant noise reduction


in this mode noise reduction factor depends on ambient noise level. The idea is to increase noise reduction factor when the noise
increases, and to have almost no noise reduction when the noise is low.

Typical settings:
-4 dB in not noisy conditions

-12 dB in a very noisy conditions

Before processing After NS processing

This mode is generally preferable as it does not apply noise reduction when there is no need to. As a
result more natural voice.

VCP also provides Noise Gate (expander) functionality on TX allowing to suppress idle and low-level noises
and signals.
29
Alango Technologies Ltd.
VCP acoustic tuning TX gain control

Unprocessed signal
Gain control functionality on TX consists of DRC
and AGC:
DRC is used to compensate for typical
distance between end-users mouth and
microphone, and to compensate for
After DRC
possible low microphone gain settings
AGC is used to compensate for varying
distance between the user and microphone,
and for different voice levels
After DRC and AGC
In contrast to RX, DRC precedes AGC on TX
because their purpose on TX is different from
the one on RX channel.

30
Alango Technologies Ltd.
VCP acoustic tuning finalizing

On the very last stage, the following optimizations are done:

DTGC is enabled to allow better duplex performance.


DTGC (Double Talk Gain Control) - is a special signal processing block which controls the loudspeaker
volume and EQ in double talk. The idea behind this block is to reduce loudspeaker volume and change EQ
when the near speech is detected on the microphone channel.
RX signal after DTGC

TX signal
DTGC settings are mostly typical and no special tuning is required.

TX equalization (if necessary) to improve voice quality and intelligibility.

31
Alango Technologies Ltd.
VCP acoustic tuning Live signals monitoring

1 PIO pin Alango


logger USB
(user defined)

Rx-in, TX-in,
RX-out, TX-out

Alango has developed an unique capability to capture all VCP input and output (coming to/from Kalimba DSP) in
real-time directly on PC. The hardware interface utilizes just one user defined BC05MM / 867x PIO line to transfer
the audio input and output streams to PC for further analysis. This feature allows to know exactly what is going
on inside Kalimba DSP. All hardware and software problems are immediately revealed.
Remote acoustic tuning by Alango experts becomes possible.
No need to travel or send us the device. Send us signal files recorded with your product in target operating
conditions and we will send you with the parameter configuration file providing the best possible acoustic
performance.
Live video demonstration of the VCP logging capabilities is available at:
http://alango.com/videos/alango_bc05mm_vcp_logging_demo.avi

32
Alango Technologies Ltd.
VCP acoustic tuning Live signals monitoring

Alango Logger in action:

The Logger allows live signals monitoring (including waveform and spectrogram), recording into wave files, live
listening to any available channel (including TX output channel which is normally unavailable for on the near-
end) via sound card, bulk system delay analysis, internal library parameters information, etc.

33
Alango Technologies Ltd.
Thanks for your attention

34
Alango Technologies Ltd.

Das könnte Ihnen auch gefallen