Synaptics AudioSmart User manual

Synaptics AudioSmart 4-Mic Development Kit for Amazon AVS 511-000838-01 Rev A
2November 7, 2017 8:17 pm Synaptics Incorporated. All Rights Reserved
Synaptics Confidential. Internal Use Only.
Synaptics Confidential. Disclosed Only Under NDA - Limited Distribution.
S ti C fid ti l Di l d O l U d NDA
Revision History
Document No. Release Date Change Description
511-000838-01 Rev A 11/07/17 Conversion to Synaptics template
005UGR01 09/19/17 Updated:
Step 2 in “Writing Raspian OS to microSD Card” on page 6.
005UGR00 05/03/17 Initial release
Downloaded from Arrow.com.Downloaded from Arrow.com.

CX20924 User Guide Table of Contents
Synaptics Confidential
11/07/17 511-000838-01 3
Table of Contents
Revision History ...........................................................................................................................................................2
Scope.............................................................................................................................................................................1
Target Audience ............................................................................................................................................................1
References ....................................................................................................................................................................1
Definitions, Acronyms, and Abbreviations.................................................................................................................1
Overview........................................................................................................................................................................2
CX20924 EVK ................................................................................................................................................................3
Microphone/LED Module..............................................................................................................................................4
Step-by-Step Setup Summary .....................................................................................................................................5
Writing Raspbian OS to the microSD Card ................................................................................................................6
Connecting the EVK and Microphone/LED Module to the RPi 2..............................................................................7
AVS Setup....................................................................................................................................................................10
Building and Installing the Linux Kernel ..................................................................................................................14
Running LED Server, Node.js Service, Sample App, Wake Word Engine, and Recording Agent.......................18
Terminal Window 1 ............................................................................................................................................................ 19
Terminal Window 2 ............................................................................................................................................................ 19
Terminal Window 3 ............................................................................................................................................................ 19
Terminal Window 4 ............................................................................................................................................................ 19
Terminal Window 5 ............................................................................................................................................................ 20
AVS Setup: Amazon Account Login ................................................................................................................................ 20
Verifying the Setup .....................................................................................................................................................23
Installing the Cypress Siena USB-to-I2C Device Driver..........................................................................................24
Flashing New Firmware..............................................................................................................................................26
Trademarks..................................................................................................................................................................28
Notice...........................................................................................................................................................................28
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

CX20924 User Guide List of Figures
Synaptics Confidential
11/07/17 511-000838-01 4
List of Figures
Figure 1: Development Kit Components...........................................................................................................................................2
Figure 2: CX20924 EVK: Connections, Interfaces, and Devices......................................................................................................3
Figure 3: Microphone/LED Module: Four Digital Microphone Locations........................................................................................... 4
Figure 4: Connecting Cable Assembly to RPi GPIO Pins.................................................................................................................7
Figure 5: Connecting Output of 4-Mic Processed Signal.................................................................................................................. 8
Figure 6: Connecting Powered Speakers to the LINEOUT Port....................................................................................................... 8
Figure 7: Connecting 5V Power Supply to J1 Connector on the EVK .............................................................................................. 9
Figure 8: DS20924 Mounted on Speaker ......................................................................................................................................... 9
Figure 9: Alexa Voice Service User Interface ................................................................................................................................. 20
Figure 10: Example FCP Folder ..................................................................................................................................................... 26
Figure 11: Build Folder Contents .................................................................................................................................................... 27
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide Scope
Synaptics Confidential
11/07/17 511-000838-01 1
Scope
This documentation provides step-by-step instructions on setting up the Synaptics AudioSmart™ 4-Mic
Development Kit for Amazon AVS. The document covers how to make the necessary hardware
connections, install the driver, flash the firmware (only when needed), configure the Raspberry Pi2 (RPi 2),
and set up the Amazon Alexa Voice Service (AVS).
Note: Only use the RPi 2 with this configuration. Do not use the Raspberry Pi 3 (RPi 3).
Target Audience
This document is intended for manufacturers and developers for creating Smart Home device prototypes
that utilize the Synaptics AudioSmart 4-Mic Development Kit and the RPi 2 (not provided with the kit)
to offer an ideal Voice Control experience via Amazon's Alexa Voice Service.
References
Definitions, Acronyms, and Abbreviations
Subject Description Location
I2CI
2C Specification http://www.nxp.com/documents/user_manual/UM10204.pdf
ACPI Advanced Configuration and
Power Interface
http://www.acpi.info/DOWNLOADS/ACPIspec50.pdf
RPi 2 An open source code single-
board computer
https://www.raspberrypi.org/products/raspberry-pi-2-model-b/
ALSA The Advanced Linux Sound
Architecture (ALSA) provides
audio and MIDI functionality
to the Linux operating
system.
http://www.alsa-project.org/main/index.php/Main_Page
ASoC ALSA system on Chip for I2S
codecs
http://www.alsa-project.org/main/index.php/ASoC
RPi 2 Kernel building https://www.raspberrypi.org/documentation/linux/kernel/
building.md
Name of Document Description
AVS Alexa Voice Service
DSDT Differentiated System Description Table
GPIO General-Purpose Input/Output
I2CInter-Integrated Circuit
RPi 2 Raspberry Pi 2
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide Overview
Synaptics Confidential
11/07/17 511-000838-01 2
Overview
The Synaptics AudioSmart 4-Mic Development Kit for Amazon AVS contains the following:
•CX20924 EVK
•Microphone/LED module (positioned on top of the CX20924 when shipped)
•USB cable
•Cable assembly (colored wires)
•+5V power supply
Note:
•Micro SD card of at least 16GB is required.
•Powered speakers, RPi 2, and micro SD card are all mandatory for the set up but are NOT
included in the Synaptics AudioSmart 4-Mic Development Kit for Amazon AVS.
Proper speaker selection will enhance overall performance. Download External Loudspeaker Guidelines
and Recommendation for Smart Speaker Applications (008DGR0x) document for additional info.
Figure 1: Development Kit Components
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide CX20924 EVK
Synaptics Confidential
11/07/17 511-000838-01 3
CX20924 EVK
Figure 2: CX20924 EVK: Connections, Interfaces, and Devices
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide Microphone/LED Module
Synaptics Confidential
11/07/17 511-000838-01 4
Microphone/LED Module
Figure 3: Microphone/LED Module: Four Digital Microphone Locations
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide Step-by-Step Setup Summary
Synaptics Confidential
11/07/17 511-000838-01 5
Step-by-Step Setup Summary
1. Write a Raspbian Image to the micro SD. Load the current Raspbian OS using Linux kernel version
4.4. See "Writing Raspbian OS to the microSD Card" on page 6.
2. Connections between the CX20924 EVK and the Microphone / LED module are already established.
To set up the hardware connection between these two boards and the RPi 2 (not provided with the kit)
refer to "Connecting the EVK and Microphone/LED Module to the RPi 2" on page 7.
3. Set up the AVS. See "AVS Setup" on page 10.
4. Build and install the Linux kernel. See "Building and Installing the Linux Kernel" on page 14.
5. Once the hardware and software setup is complete, refer to the following to run the 4-mic setup:
"Running LED Server, Node.js Service, Sample App, Wake Word Engine, and Recording Agent" on
page 18.
6. Refer to the following to connect to an Amazon account: "AVS Setup: Amazon Account Login" on page
20.
7. Verify the setup. See "Verifying the Setup" on page 23.
8. Conduct Cypress Siena USB-to-I2C device driver installation if required. This step is optional. See:
"Installing the Cypress Siena USB-to-I2C Device Driver" on page 24.
9. Flashing New Firmware. This step is optional. Upgrade the firmware for the CX20924 device. Note that
the CX20924 evaluation board is pre-flashed with the firmware required so this step is only necessary
if an updated CX20924 firmware is provided. See "Flashing New Firmware" on page 26.
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide Writing Raspbian OS to the microSD Card
Synaptics Confidential
11/07/17 511-000838-01 6
Writing Raspbian OS to the microSD Card
1. Format the SD card. This can be done by going to the 'Computer' folder and right clicking on the SD
card. Click Format… to display the format options. When reformatting, confirm that the File system is
FAT32 or FAT, as shown below.
2. Download the Raspbian Jessie OS. The zip file is located at the following link:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2017-07-05/
3. Unzip and write the downloaded image to the SD card using Win32DiskImager. This tool can be found
at the following link: https://sourceforge.net/projects/win32diskimager/
4. Run the Win32DiskImager to write the image to the SD card.
–Browse to the subdirectory icon and select the image file.
–Select the device drive in the Device drop down menu to write the Raspbian OS.
–Click Write to write the image to the SD card.
5. After the image has finished writing, insert the microSD card into the RPi 2.
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide Connecting the EVK and Microphone/LED Module to the RPi 2
Synaptics Confidential
11/07/17 511-000838-01 7
Connecting the EVK and Microphone/LED Module to the RPi 2
Make the following hardware connections between the CX20924 EVK, the Microphone/LED module, and
the RPi 2 (connections between the CX20924 EVK, Microphone/LED module and cable assembly are
already established). Make sure the microSD card with the Raspbian image and AVS sample app is
inserted into the RPi microSD card slot.
1. Connect the cable assembly to the GPIO pins on the RPi 2. Align the sticker labeled '1' with physical
pin 1 on the RPi.
Figure 4: Connecting Cable Assembly to RPi GPIO Pins
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide Connecting the EVK and Microphone/LED Module to the RPi 2
Synaptics Confidential
11/07/17 511-000838-01 8
2. Connect the output of the 4-mic processed signal.
a. Use the USB cable to connect J4 on the CX20924 EVK to a USB port on the RPi.
Figure 5: Connecting Output of 4-Mic Processed Signal
3. Connect the powered speakers to the LINEOUT port.
a. Connect the 3.5mm jack from the powered speakers to J8 (labeled LINEOUT) on the CX20924
EVK.
Figure 6: Connecting Powered Speakers to the LINEOUT Port
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide Connecting the EVK and Microphone/LED Module to the RPi 2
Synaptics Confidential
11/07/17 511-000838-01 9
4. Using the HDMI and USB ports on the RPi, connect the RPi to the monitor, keyboard, and mouse.
5. Connect the 5V supply to the J1 connector on the CX20924 EVK. Use the +5V power supply included
with the kit to power the CX20924 EVK, Microphone/LED module, and the RPi 2.
Note: Power to the RPi 2 is provided from the CX20924 EVK and the Micro-USB power on the RPi 2
is not used.
Figure 7: Connecting 5V Power Supply to J1 Connector on the EVK
The unit should be mounted on top of the speakers, separated by a cushioned material such as putty or
foam, to minimize vibrations from the speaker.
Figure 8: DS20924 Mounted on Speaker
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide AVS Setup
Synaptics Confidential
11/07/17 511-000838-01 10
AVS Setup
Prior to completing the steps described in this section, the following tasks should be completed:
–Raspbian OS loaded onto the microSD card
–HDMI monitor, keyboard, and mouse are connected
–LAN or WiFi connection has been established
–Hardware setup complete
1. Send the following command to clone the repository from the Conexant GitHub:
$ git clone https://github.com/conexant/alexa-avs-sample-app.git
2. Refer to the following instructions to create a developer account with Amazon:
https://github.com/alexa/alexa-avs-sample-app/wiki/Create-Security-Profile
Before starting AVS installation, the automated_install.sh will require several parameters to be
changed. The following credentials will need to be copied from the developer account
(developer.amazon.com)
Note: These parameters can be found under Alexa -> Alexa Voice Service -> Edit, on the
developer.amazon.com site. The Device Type ID can be found in the Device Type Info and the Client
ID and Client Secret can be found in the Security Profile tab. A representative example is shown
below.
3. Save the file. Then give the necessary file permissions and run the process with the following
command:
cd alexa-avs-sample-app
chmod +x automated_install.sh
. automated_install.sh
After the installer is started, several screens will display. Follow the screen instructions shown below to
download the AVS sample app.
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide AVS Setup
Synaptics Confidential
11/07/17 511-000838-01 11
This requires agreeing to the terms and conditions as shown in the following screen:
4. Type yand press Enter. The following screen enables you to validate your Amazon developer status.
5. Type yand press Enter. The following screen enables you to set up your RPi 2 credentials, enter your
ProductID, ClientID, and ClientSecret.
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide AVS Setup
Synaptics Confidential
11/07/17 511-000838-01 12
6. Type yand press Enter. The following screen enables you to set up your locale based on language
and country. For example, en (English)-US (USA), en (English)-GB (Great Britain). Locales are a
framework to switch between multiple languages and allow users to use their language, country,
characters, collation order, etc.
7. Type 1, 2, or 3depending on your language and locale, and press Enter. The following screen enables
you to select the method of audio output you are using.
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide AVS Setup
Synaptics Confidential
11/07/17 511-000838-01 13
8. For audio output, select option 1. By default, the I2S interface is used. Thus, the HDMI audio output
selection has no impact.
9. Type yand press Enter. The following screen enables you to enable Alexa Wake Word Detection.
This starts the installation process. The installer should take approximately one hour to complete.
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide Building and Installing the Linux Kernel
Synaptics Confidential
11/07/17 511-000838-01 14
Building and Installing the Linux Kernel
Prior to completing the steps described in this section, the following tasks should be completed:
–Before installing the kernel, the microSD card should have completed the AVS setup.
Steps 1-9 must be completed on the host machine (which is running the Ubuntu environment and which
the kernel will be built on). Steps 10 and 11 will be completed on the RPi 2.
1. Build and install the Linux kernel for the RPi 2. The following instructions refer to cross compiling the
driver on an Ubuntu environment.
–Prior to building the Linux driver, the following packages must be installed: Git, bc, libncurses5-
dev, libncursesw5-dev, and gcc-arm-linux-gnueabihf.
–All these packages can be installed with the following command:
$ sudo apt-get install git bc libncurses5-dev libncursesw5-dev gcc-arm-linux-
gnueabihf
2. The following instructions create a 4.4.50 kernel running on the RPi 2. If you don't have the toolchain
installed, use the following command to install the toolchain:
$ git clone https://github.com/raspberrypi/tools
Note: For convenience, the sub-directory, "bin", can be added to $PATH
$ PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
3. Clone the following RPI kernel tree:
$ git clone --depth 10 -n --branch cnxt-rpi-4.4.y --single-branch https://
github.com/conexant/rpi-linux.git
$ KERNEL=kernel7
$ cd rpi-linux
$ git checkout
4. Build sources
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig
5. Enable the driver options
$ make ARCH=arm menuconfig
6. In the Linux/arm 4.4.50 Kernel Configuration menu, go to: [Device Drivers] => [Sound card support] =>
[Advanced Linux Sound Architecture] => [ALSA for SoC audio support]. Check the following two
boxes:
–[Support for Smart Speaker Pi add on soundcard (USB)]
–[Support for Smart Speaker Pi add on soundcard (I2S)]
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide Building and Installing the Linux Kernel
Synaptics Confidential
11/07/17 511-000838-01 15
The following screens provide references:
:
:
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

User Guide Building and Installing the Linux Kernel
Synaptics Confidential
11/07/17 511-000838-01 16
:
7. When this process is complete, exit back to the terminal.
8. Send the following commands to build the kernel:
Note: The compilation can be sped up by using the '-j n' option, with n equal to the number of
processors * 1.5. This will reduce the compilation time significantly.
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs
9. Once the kernel has finished building, power down the 4-mic development kit, remove the SD card
(with the AVS already loaded), and use an SD card adapter to connect the card to the host. Identify the
FAT partition (boot) and the ext4 partition (root). This will be necessary to install the kernel to the SD
card. See the section Install Directly onto the SD card at the following link for details:
https://www.raspberrypi.org/documentation/linux/kernel/building.md
10. After the installation of the kernel is complete, edit the /boot/config.txt file. On the RPi 2, send the
following command to edit the file:
$ sudo pico /boot/config.txt
In the text editor, add the following options:
dtoverlay=rpi-cxsmartspk-usb
dtoverlay=i2s-mmap
dtparam=i2c_arm=on
program_usb_boot_mode=1
11. To ensure audio playback is through the driver just built/installed, the default audio device should be
disabled. Make the following change to the /boot/config.txt file.
dtparam=audio=off
Save the file and exit.
Now the hardware connections should be established and the RPi 2 should be correctly configured.
Refer to "Running LED Server, Node.js Service, Sample App, Wake Word Engine, and Recording
Agent" on page 18 for running the 4-mic setup.
12. To verify that the driver is installed, open a terminal on the RPi 2 and send the following command:
$ aplay -l
The following device should display:
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.
Other manuals for AudioSmart
1
Table of contents
Other Synaptics Microcontroller manuals