Application Note: SoundWire Audio Testing with APx and

Application Note: SoundWire Audio Testing with APx and
Application Note 7: SoundWireSM Audio Testing with APx and LnK
Introduction
Testing semiconductor audio devices with a SoundWire interface using an Audio Precision APx audio analyzer is
conceptually straightforward; the test strategy and implementation is no different than with any other IC device.
The challenge is the connection to the SoundWire interface, and configuring the SoundWire device.
APx provides optional digital interfaces including PDM (pulse density modulation) and digital serial (providing
I2S), but has no direct interface to the SoundWire bus. We have partnered with LnK sprl, who have developed
the LnK SoundWire Protocol Analyzer/Traffic Generator, a tool that provides the bridge between the digital
interfaces of the APx and the SoundWire interface of the device under test (DUT).
Audio Precision together with LnK provide a complete test solution for SoundWire device audio testing that
supports both PDM and PCM (pulse code modulation, via I2S/TDM) digital formats.
What is SoundWire?
SoundWire is a digital audio bus standard developed for the mobile electronics industry by the MIPI Alliance (see
Resources at the end of this document). Members of the alliance have developed semiconductor devices that
implement the SoundWire specification for audio peripheral devices such as codecs, MEMS microphones, power
amplifiers, and wireless interfaces. These IC devices are typically used in smartphones, tablets, and wearable
devices.
SoundWire is a new technology that simplifies product design and cost by reducing the interconnections
between the host controller (application processor) and each audio device in the product. A basic SoundWire
system (Figure 1) provides two multi-drop bus lines (clock and data) to control and stream audio between many
slave devices and a master device (a host controller). Multiple channels of audio may be streamed in two
directions between devices at different data rates.
This technology replaces traditional digital audio transport buses, such as PCM over I2S , SPI, and PDM; and
replaces I2C buses for device function control. The SoundWire specification is available to MIPI Alliance members.
Figure 1 Basic SoundWire system (left) and multi-lane SoundWire system (right). Multi-lane systems extend bandwidth by adding data
lines.
The APx-LnK SoundWire Audio Test System
Figure 2 illustrates the interconnections between an APx555 audio analyzer, the LnK SoundWire Protocol
Analyzer, and a SoundWire codec evaluation board. In the figure below, analog audio signals are connected
between the codec evaluation board headphone jack and the APx555 unbalanced outputs and inputs.
Figure 2 APx-LnK SoundWire audio test system (top) and block diagram (bottom) for testing a SoundWire audio codec. The LnK SoundWire
analyzer provides a digital interface between the SoundWire port of the codec and the Audio Precision APx audio analyzer.
2
AppNote 7: SoundWire Audio Testing with APx and LnK
Both instruments are controlled via USB connections to a Windows PC running APx control software and LnK
SoundWire Tools software.
The LnK analyzer provides the SoundWire connection to the codec board.
The APx555 provides up to 8 channels of bi-directional I2S PCM formatted audio using an APx Digital Serial I/O
(DSIO) module. The DSIO transmitter/receiver connections are routed to a multi-pin GPI connector on the LnK
analyzer. The LnK analyzer provides a bit clock and receives or transmits the word clock and data depending on
the direction of audio data.
PDM formatted data is necessary for MEMS microphones and low-power class D amplifier ICs. The APx555 can
also transmit and receive two-channel PDM signals using an APx PDM module routed to the LnK analyzer GPI
connector. The LnK analyzer provides bit clocks to the APx PDM module, and either sinks or sources data.
The SoundWire Test Process
A series of steps are necessary in order to test a SoundWire device:
1. Enumerate and initialize the SoundWire interface.
2. Set up the SoundWire device control registers for desired functionality (for example: filters, gain, mute,
volume, etc.).
3. Route audio to or from the device through the LnK analyzer to the APx audio analyzer.
4. Perform audio tests with APx analyzer stimulus and acquisition.
Steps 1 and 2 require detailed knowledge of the SoundWire interface within the DUT, knowledge of the
functional control registers within the device accessed through the SoundWire interface, and familiarity with the
LnK SoundWire tools software.
Step 3 involves proper setup of the digital audio connections between the two instruments, and an LnK software
script running in the LnK analyzer that enables streaming of audio content between the two instruments and the
SoundWire device audio ports. The LnK analyzer becomes the bridge between the device under test and the APx
analyzer.
Step 4 involves an APx software project file that defines its signal path to the LnK analyzer, and a sequence of
automated audio measurements.
AppNote 7: SoundWire Audio Testing with APx and LnK
3
Hardware Integration
Test system hardware integration is straightforward. Connect the APx DSIO and PDM I/O ports to the LnK
SoundWire Protocol Analyzer GPI/PDM connector (Figure 3) with cables provided by LnK.
Figure 3 LnK SoundWire Protocol Analyzer and connectors. Upper right: Clocks, GPI, and SoundWire. Lower right: Power, USB, and Monitor
Signals.
LnK has developed connector cable accessories designed to connect the LnK GPI interface directly to the APx
PDM and DSIO modules (Figure 4 and Figure 5). Each connector accessory includes a user manual that illustrates
the correct APx DSIO or PDM interface settings required by the LnK SoundWire Protocol Analyzer.
Figure 4 The PCM adapter cable connects the SoundWire Protocol Analyzer GPI connector multi-channel signals to the APx DSIO
transmitter (shown here) or receiver.
4
AppNote 7: SoundWire Audio Testing with APx and LnK
Figure 5 The PDM adapter cable connects the LnK SoundWire Protocol Analyzer GPI connector to the APx PDM transmitter and receiver.
APx Cables
Audio Precision provides cables for its DSIO and PDM modules that may be connected directly to the GPI
connector pins in the event that the LnK connector cable accessories are not available.
PCM connections with APx DSIO cables
The CAB-DSIO cable kit provided with the DSIO option supplies a DB15M to square-pin socket (2 pin, signal and
ground) cable. The CAB-BPSI-2P-LCAP low-capacitance cable with DB15M to square-pin sockets may also be
used. Each color coded signal cable (pin pair) is identified with a label.
Figure 6 APx DSIO connector pin-out.
AppNote 7: SoundWire Audio Testing with APx and LnK
5
Figure 7 APx DSIO cable kits. CAB-DSIO left, CAB-BPSI-2P-LCAP right.
Use square-pin sockets to connect directly to the LnK SoundWire analyzer GPI connector pins. Connect the
shields to the bottom row (ground) pins 2 to 20 of the LnK analyzer GPI pin-pairs. Each DSIO clock or data line
cable will insert into the top and bottom rows of the GPI connector. The chart below shows the specific pins.
Connect DSIO data lines 1 - 4 to corresponding GPI pins 15, 13, 11, 9. Connect DSIO Bit Clock to GPI pin 5, Frame
Clock to GPI pin 7. A master clock is not required.
Figure 8 LnK SoundWire Analyzer GPI interface pin assignments for PCM mode.
6
AppNote 7: SoundWire Audio Testing with APx and LnK
DSIO Receiver Settings
For applications to receive SoundWire audio input, set the APx DSIO receiver input settings:
•
•
•
•
•
Multiple Data Lines
Set “Bit Depth” to “32” bits
Set “Bit and Frame Dir.” to “In”
Set “Bit Clock Edge Sync Ins:” to “Falling”
Set “Logic Level” to the level programmed in the SoundWire analyzer
The SoundWire analyzer script file must be configured for corresponding GPI output settings. Set Operation
Mode to “PCM – 8 Channel OUT”.
Figure 9 LnK SoundWire Script Editor settings for GPI PCM output.
DSIO Transmitter Settings
For applications to generate SoundWire audio output, set the APX DSIO transmitter output settings:
•
•
•
•
•
Multiple Data Lines
Set the “Bit Depth” according to the word length of the SoundWire channel of the device under test. If
the bit depth is larger than the word length, the LSbits of the sample will be truncated and the dithering
will not have any effect, but will cause distortion due to the truncation. If the bit depth is shorter than
the word length, the unused bits are zero padded and have no effect.
Set the “Bit & Frame Dir.” to “In”
Set “Bit Clock Edge Sync” Ins and Outs to “Falling”
Set the “Logic Level” to the level programmed in the SoundWire analyzer.
The SoundWire analyzer script file must be configured for corresponding GPI input settings. Set Operation Mode
to “PCM – 8 Channel IN”.
Figure 10 LnK SoundWire Script Editor settings for GPI PCM input.
AppNote 7: SoundWire Audio Testing with APx and LnK
7
PDM connections with APx CAB-PDM cables
The Audio Precision PDM interface utilizes the CAB-PDM cables to connect the two-pin signals to the LnK
SoundWire analyzer GPI inputs. The SoundWire analyzer is capable of supporting up to four stereo PDM signals
for input and output, or a combination of two stereo inputs and two stereo outputs. The APx PDM interface
supports one stereo channel pair for input and for output. You must decide which stereo channel pairs you wish
to connect to the APx PDM transmitter and receiver.
Figure 11 APx PDM interface and CAB-PDM cable kit.
Figure 12 LnK SoundWire analyzer GPI interface PDM function modes.
8
AppNote 7: SoundWire Audio Testing with APx and LnK
Figure 13 LnK SoundWire Script Editor settings for the GPI interface, corresponding to the GPI Function chart.
Figure 12 above shows the function modes of the LnK SoundWire analyzer GPI connector. Set the mode for the
required combination of PDM input and output and then connect the APx PDM I/O cables accordingly. Note that
the SoundWire analyzer script’s signal routing of SoundWire bus signals to GPI pins must be considered.
Connect the APX CAB-PDM cable shields to the bottom row (ground) pins 2 to 20 of the LnK analyzer GPI
connector.
Connect the APx PDM transmitter bit clock to GPI pin 5 (PDM_BCKI). Connect the APx PDM receiver bit clock to
GPI pin 7 (PDM_BCKO).
The APx PDM transmitter or receiver bit clock must always be a slave (Bit Clk Dir set to In) because the LnK
SoundWire analyzer always supplies the bit clock.
APx PDM Transmitter Settings
Set PDM Input Settings:
•
•
•
Set the “Bit Clk Dir:” to In
Set the “Decimation” to x64
Set the “Logic Level” to the level programmed in the SoundWire analyzer.
APx PDM Receiver Settings
Set PDM Output Settings:
•
•
Set the “Bit Clk Dir:” to In
Set the “Logic Level” to the level programmed in the SoundWire analyzer.
AppNote 7: SoundWire Audio Testing with APx and LnK
9
SoundWire Device Jitter Tolerance Testing
If you want to perform jitter testing at the SoundWire interface to the DUT, you can set up the LnK analyzer to
use the external input clock with internal PLL bypassed. Connect the LnK analyzer CLOCKS Input to the APx555
rear panel SYNC OUT and set up the APx to source the necessary clock frequency (typically twice the SoundWire
bus clock frequency).
(Note: Jitter tolerance testing requires an Advanced Master Clock (AMC) equipped APx analyzer. AMC is
standard in the APx555 and an option for APx52x or APx58x Series analyzers.)
Next, turn on the APx jitter generator (Clocks panel) and set the Jitter Generator “Apply To:” control to
“Reference/Sync” (Figure 14). This will enable a jittered APx rear panel SYNCH OUT signal. Set the APx jitter level,
waveform, and frequency in order to produce jittered SoundWire clock and data lines.
Figure 14 APx Sync Output and Jitter Generator setup for SoundWire jitter tolerance testing.
10
AppNote 7: SoundWire Audio Testing with APx and LnK
SoundWire Bus Event-Triggered Measurements
The APx audio analyzer FFT acquisition can be triggered with an external event generated by the LnK analyzer.
Connect the APx555 rear panel Trigger In BNC to the LnK analyzer TRIG OUT 1 or TRIG OUT 2 connectors using a
BNC to square-pin cable. Then design the LnK analyzer script to detect events of interest on the SoundWire bus
and issue a trigger pulse. The APx analyzer will acquire the audio waveform at the output of the DUT when the
pulse is received. This may capture audio transients and glitches when the SoundWire bus master initiates
changes to the DUT, such as startup or clock-stop.
Figure 15 APx audio measurements of the codec’s analog headphone output. The codec’s SoundWire interface was driven with a 1 kHz
digital test tone from the DSIO transmitter through the LnK SoundWire Protocol Analyzer to the SoundWire port on the codec.
APx Audio Measurement Software
The APx software simplifies development of automated test sequences that stream audio through the LnK
SoundWire Protocol Analyzer to the SoundWire device. APx measures the audio output and produces a
measurement report.
Figure 15 shows measurements of the headphone outputs of a SoundWire-interfaced codec, including Level,
THD+N distortion, Frequency, and spectrum with a full-scale digital audio stream applied to the LnK SoundWire
Protocol Analyzer GPI inputs.
Figure 16 shows an APx Continuous Sweep measurement of the stopband frequency behavior of a codec
headphone output driven with a −1 dBFS sine chirp from 1 kHz to 24 kHz applied to the SoundWire interface.
Measurements of this nature require real-time stimulus-response techniques available with APx and LnK.
AppNote 7: SoundWire Audio Testing with APx and LnK
11
Figure 16 Headphone Output Stopband measurement with SoundWire input.
LnK Tools Software
The LnK Tools software consists of the SoundWire Script-Builder (Figure 17) and the SoundWire Analyzer and
Traffic Generator (Figure 18). Use the ScriptBuilder software to develop script files for the Analyzer and Traffic
Generator software.
The user must have detailed knowledge of the SoundWire device under test in order to craft a good script file:
control registers, device-specific function registers, proper start-up protocol, data frame shape, timing, and
knowledge of how the device may deviate from the SoundWire specification.
The Analyzer and Traffic Generator software controls the LnK analyzer hardware to capture bus traffic or
generate bus traffic defined by a script file created with the Script Builder. SoundWire bus analysis may be
performed while the Traffic Generator is running in order to debug problems encountered.
12
AppNote 7: SoundWire Audio Testing with APx and LnK
Figure 17 LnK SoundWire ScriptBuilder Sequence display for a Cirrus Logic CS42L42 codec DAC test.
Figure 18 The LnK SoundWire Protocol Analyzer software interface. A script file has been loaded that streams audio from the APx DSIO
transmitter to a Cirrus Logic CS42L42 SoundWire input and then through the device to its analog headphone output.
AppNote 7: SoundWire Audio Testing with APx and LnK
13
Software Integration
Both Audio Precision and LnK products provide software libraries. Use these to implement your own software
applications that integrate the two instruments into a fully automated SoundWire audio test system. The
libraries can be used with .NET development tools, LabVIEW, and other software development systems.
Test System Information
The SoundWire audio test system components shown in Figure 2 must be ordered from Audio Precision and LnK
separately.
Audio Precision
Item
APx Audio
Analyzer
Options
Cable Kits
Description
Part
Number
Any modular APx audio analyzer
APx525
APx555
APx582
APx585
APx586
Digital serial option for APx
APX-DSIO
PDM option for APx
APX-PDM
Advanced Master Clock for APx
APX-AMC
APx DSIO
CAB-DSIO
CAB-BPSI-2P-LCAP
APx PDM
CAB-PDM
LnK
Item
Description
SoundWire Protocol Analyzer
Traffic Generator
Options
PDM Hardware Option
PCM Hardware Option
Multilane Option
Cable Kits
14
PDM Cable Kit (for APx-PDM)
PCM Cable Kit (for APx-DSIO)
AppNote 7: SoundWire Audio Testing with APx and LnK
Contacts
Audio Precision
5750 SW Arctic Drive
Beaverton, OR 97005
USA
LnK sprl
44 rue des Combattants
4624 Romsee
Belgium
+1 (800) 231-7350
sales@ap.com
www.ap.com
+32 473 75 75 82
info@lnk-tools.com
www.lnk-tools.com
Resources
MIPI Alliance
www.mipi.org
SoundWire Webinar
http://mipi.org/learning-center/webinars
MIPI® service marks and logo marks are owned by MIPI Alliance,
Inc. and any use of such marks by Audio Precision is under license.
Other service marks and trade names are those of their respective
owners.
AppNote 7: SoundWire Audio Testing with APx and LnK
© 2016 Audio Precision, Inc. All Rights Reserved. XVI1020140000
15
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising