CSR BlueCore ADK 3.0 User manual

Page 1 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
ADK 3.0 Subwoofer
User Guide
Issue 1
BlueCore®

Page 2 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
Document History
Revision
Date
History
1
26 FEB 14
Original publication of this document.
Contacts
General information www.csr.com
Customer support for this product www.csrsupport.com
Trademarks, Patents and Licences
Unless otherwise stated, words and logos marked with ™ or ® are trademarks registered or owned by CSR plc
and/or its affiliates.
Bluetooth® and the Bluetooth logos are trademarks owned by Bluetooth SIG, Inc. and licensed to CSR.
Other products, services and names used in this document may have been trademarked by their respective owners.
The publication of this information does not imply that any licence is granted under any patent or other rights owned
by CSR plc or its affiliates.
CSR reserves the right to make technical changes to its products as part of its development programme.
While every care has been taken to ensure the accuracy of the contents of this document, CSR cannot accept
responsibility for any errors.
Life Support Policy and Use in Safety-critical Compliance
CSR’s products are not authorised for use in life-support or safety-critical applications. Use in such applications is
done at the sole discretion of the customer. CSR will not warrant the use of its devices in such applications.
Performance and Conformance
Refer to www.csrsupport.com for compliance and conformance to standards information.

Page 3 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
Contents
Document History .........................................................................................................................................................2
Contacts........................................................................................................................................................................2
Trademarks, Patents and Licences ..............................................................................................................................2
Life Support Policy and Use in Safety-critical Compliance............................................................................................2
Performance and Conformance....................................................................................................................................2
Contents .......................................................................................................................................................................3
Tables, Figures and Equations.....................................................................................................................................3
1. Introduction ........................................................................................................................................................5
2. Hardware ...........................................................................................................................................................6
3. Getting Started...................................................................................................................................................7
3.1. Supported Development Platforms.................................................................................................................7
3.2. Building and Flashing the Subwoofer Application...........................................................................................7
3.3. Enabling Debug Output..................................................................................................................................8
3.4. Connecting to another Device via Bluetooth...................................................................................................8
3.5. Building a Soundbar with Subwoofer Support ................................................................................................9
4. Configuration....................................................................................................................................................10
4.1. Application Features (PSKEY_USR0)..........................................................................................................11
4.2. Device ID Configuration (PSKEY_USR1).....................................................................................................13
4.3. Remote Device ID Configuration (PSKEY_USR2) .......................................................................................13
4.4. LED Configuration (PSKEY_USR3) .............................................................................................................14
4.5. Button Configuration (PSKEY_USR4)..........................................................................................................17
4.6. I²S Initialisation Configuration (PSKEY_USR6)............................................................................................18
4.7. I²S Data Configuration (PSKEY_USR7).......................................................................................................20
4.8. SWAT SDP Configuration (PSKEY_USR8)..................................................................................................20
5. The ADK 3.0 Subwoofer Application................................................................................................................21
5.1. Libraries Used ..............................................................................................................................................21
5.2. Application States.........................................................................................................................................22
5.3. Pairing with a Remote Device.......................................................................................................................22
5.4. Connecting with the Paired Device...............................................................................................................23
5.5. Wired Mode..................................................................................................................................................24
5.6. Buttons .........................................................................................................................................................25
5.7. Amplifier Control...........................................................................................................................................25
Document References................................................................................................................................................28
Terms and Definitions.................................................................................................................................................28
Tables, Figures and Equations
Table 3.1: Subwoofer Project Configurations................................................................................................................7
Table 4.1: PS Keys Used by ADK 3.0 Subwoofer Application....................................................................................10
Table 4.2: Application Features PS Key Configuration...............................................................................................12
Table 4.3: Device ID PS Key Configuration................................................................................................................13
Table 4.4: Remote Device ID PS Key Configuration...................................................................................................13
Table 4.5: LED Pattern Data Structure .......................................................................................................................14
Table 4.6: Plot Point Values for the Red LED of the Example Pattern........................................................................15
Table 4.7: Plot Point Values for the Blue LED of the Example Pattern.......................................................................16
Table 4.8: Description of the Example LED Pattern with Populated Values ...............................................................16
Table 4.9: Order LED Patterns Must be Stored to the LED Configuration Data..........................................................17
Table 4.10: Structure Used for the Button Configuration Data....................................................................................17

Page 4 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
Table 5.1: Application States Supported by the ADK 3.0 Application .........................................................................22
Figure 1.1: Example System Block Diagram.................................................................................................................5
Figure 4.1: Example LED Plot for a Pattern Using Two LEDs ....................................................................................15
Figure 5.1: ADK 3.0 Subwoofer Device Connection Establishment Procedure ..........................................................23
Figure 5.2: DAC, AMP & MUTE On/Off Control Mechanism.......................................................................................27

Page 5 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
1. Introduction
The ADK 3.0 Subwoofer application is a single-chip Subwoofer Audio Transfer (SWAT) sink device that enables a
high-quality, robust wireless audio link from a CSR SWAT source capable device.
Configuration of the application is held in PS Keys and simplified for developers by using the ADK Configuration Tool
which allows customisation of the device to meet specific requirements, e.g to:
Assign PIO functionality
Associate device control with different button presses
Configure User and Speaker EQ setting
Configure volume control
Define unique LED patterns for user actions, system states and events
This document describes how the device can be configured and used.
Figure 1.1 shows a possible user case for a multi-channel audio Soundbar (based on a CSR device with an 8670 IC
wireless subwoofer speaker).
Figure 1.1: Example System Block Diagram

Page 6 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
2. Hardware
This document describes the Subwoofer application in ADK 3.0. The Subwoofer application is suitable for use on
CSR8670 or BlueCore5-Multimedia devices.
These use either the CSR Bluetooth example CNS10001v4 (CSR8670) or DEV-PC-1645 (BlueCore5-Multimedia)
design boards.
Notes:
A DEV-PC-1309 interface board and suitable SPI interface, such as a CSR 132 USB-SPI converter, is required
to program and debug both BlueCore5-Multimedia and CSR8670 devices.
2.1.1. Backing Up the Development Board
Before flashing the application to the hardware CSR recommends clearing all the PS Keys from the development
board. This places the board in to a known good state.
All tools are available in the [ADK]\tools\bin sub directory. Alternatively, tools with a GUI, e.g. PSTool and BlueFlash,
can be accessed from the Windows Start menu under ADK\Tools.
Note:
Read the values in the following PS Keys using PSTool and record the values so that they can be restored later:
PSKEY_BD_ADDR
PSKEY_ANA_FTRIM (BlueCore5-Multimedia)
PSKEY_ANA_FTRIM_OFFSET (CSR8670)
PSKEY_CHARGER_CURRENT
PSKEY_CHARGER_TRIM
To clear the board’s PS Keys using BlueFlash:
1. Click Stop Processor and select Flash Erase
2. Check the Erase Persistent Store box and then select OK.
3. Exit BlueFlash.
The application is then ready to be flashed from the xIDE development environment onto the development board.

Page 7 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
3. Getting Started
3.1. Supported Development Platforms
The Subwoofer application is designed so that it runs using default settings on either CSR8670 or BlueCore5-
Multimedia hardware.
There are four project configuration settings to choose from, depending on the hardware and debug requirements,,
the default configuration is to run on the CSR8670 hardware with debug disabled, see Table 3.1.
Table 3.1 lists the available project configurations.
Configuration
Description
Subwoofer-8670-Debug
Select this configuration when using the CSR8670 hardware and debug
output is desired
Subwoofer-8670-Release
Select this configuration when using the CSR8670 hardware and debug
output is not required
Subwoofer-BC5MM-Debug
Select this configuration when using the BlueCore5-Multimedia hardware
and debug output is desired
Subwoofer-BC5MM-Release
Select this configuration when using the BlueCore5-Multimedia hardware
and debug output is not required
Table 3.1: Subwoofer Project Configurations
Note:
When running on BlueCore5-Multimedia Hardware, the Execution mode needs to be set to Native mode, as
Assisted Native mode is not available with this platform.
Assisted Native mode should be selected when using the CSR8670.
3.2. Building and Flashing the Subwoofer Application
To download the Subwoofer application to a suitable device:
1. Connect the interface board to the development board and attach the SPI interface and USB charger.
2. Attach suitable headphones and microphone to the sockets on the development board.
3. Open the xIDE development environment from ADK 3.0.
4. Select Open Workspace from the Project menu and select the subwoofer application from the apps sub-
directory.
5. By default the application is setup to run on CSR8670 hardware, to change hardware or audio mode,
see section 4.
6. Make sure the Transport is set correctly to do this choose Debug > Transport and select the required
Debug Transport.
7. Use PSTool to merge the relevant PS Keys onto the device, for basic operation:
If using a CSR8670 device (CNS10001v4 development board), merge the
subwoofer_configuration_8670.psr file.
If using a BlueCore5-Multimedia device (DEV-PC-1645B development board), merge the
subwoofer_configuration_1645.psr file.
8. Select Build Active Project (F7) from the Build menu.
9. Select Run (F5) from the Debug menu.
10. The application is now running on the hardware.

Page 8 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
Note:
The Subwoofer can also be run independently of the xIDE environment by selecting Stop from the Debug menu
when the application is running then resetting the hardware (as long as debug has not been enabled, see
below).
3.3. Enabling Debug Output
To enable debug output add DEBUG_PRINT_ENABLED to the Project Properties.
Note:
Debug functionality for particular files can be enabled and disabled by editing the relevant #define(s) in
subwoofer_debug.h.
When debug is enabled in the subwoofer application, the application does not run if a debugger, such as xIDE, is not
attached.
3.4. Connecting to another Device via Bluetooth
3.4.1. Pairing and Connecting the Subwoofer to a Soundbar Device
To pair the Subwoofer application to a Soundbar device:
1. Turn on the Subwoofer application by connecting the power cable to the development board:
1.1. For a non-empty paired device list:
1.1.1. The Subwoofer automatically enters connectable mode and begins making
connection requests to paired device(s).
1.1.2. To manually put the Subwoofer into pairing mode, press and hold the Multi-Function
button for 5 seconds.
1.2. With an empty paired device list:
1.2.1. The Subwoofer automatically enters pairing mode and waits for a remote device to
discover and pair to it.
With the Subwoofer in pairing mode, a Soundbar device can discover and pair to the Subwoofer, see section 3.4.2.
3.4.2. Discovering the Subwoofer Device from a Soundbar Device
When the Soundbar discovers the Subwoofer application, it automatically initiates pairing, when pairing completes,
the Subwoofer and Soundbar are connected.
3.4.3. Paired Device List Management
The Subwoofer application is designed to store one paired device.
If the Subwoofer application needs to be paired with a different host, the Subwoofer application needs to be put back
into pairing mode and an inquiry search performed.
Any new pairing procedure overwrites existing pairing information and connections.
The Subwoofer application does not support any method of clearing its paired device list.

Page 9 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
3.5. Building a Soundbar with Subwoofer Support
To build a Soundbar device from a freshly installed ADK, open the sink project included with the ADK and select
Soundbar-8670-Release from the Build menu.
This sets all relevant build properties. However, if modifications to the sink project have been made for previous
builds, check that the following VM build options are included in the Project Properties:
SOUNDBAR
Subwoofer Link
If the Kalimba -'sbc_decoder' project has been modified in the past, check that SUB_ENABLE is included in the Project
Properties.
Note:
SUB_ENABLE and RELAY_ENABLE cannot be used at the same time. If RELAY_ENABLE is defined it needs to be
undefine when defining SUB_ENABLE.

Page 10 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
4. Configuration
The ADK 3.0 Subwoofer application supports a number of configuration options allowing unique setups,
This section describes the configuration options available, how the subwoofer application interprets each
configuration and how to setup a valid configuration.
Table 4.1 lists the PS Keys used by the subwoofer application:
PS Key ID
Description
PSKEY_USR0
Application features configuration
PSKEY_USR1
Device ID configuration
PSKEY_USR2
Remote device ID configuration
PSKEY_USR3
LED configuration
PSKEY_USR4
Button configuration
PSKEY_USR5
Reserved
PSKEY_USR6
I²S initialisation configuration
PSKEY_USR7
I²S initialisation data
PSKEY_USR8
SWAT SDP record
PSKEY_USR9
Reserved
Table 4.1: PS Keys Used by ADK 3.0 Subwoofer Application

Page 11 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
4.1. Application Features (PSKEY_USR0)
The ADK 3.0 Subwoofer application has a set of application features that can be used to enable/disable functions
and modify configuration data within the application. These features are configured in PSKEY_USR0.
Table 4.2 describes PSKEY_USR0.
Word(s)
Bit(s)
Description
1
[0:15]
DAC Power On Timer: Time it takes the DAC to fully power on
Default = 10 ms
2
[0:15]
Amplifier Power On Timer: Time it takes the amplifier to fully power on.
default = 200 ms)
3
[0:15]
Amplifier UNMUTE Timer: Time it takes for the amplifier to UNMUTE the audio.
Default = 5 ms
Note:
If MUTE I/O lines are not supported, CSR recommends the using a setting of 10 ms to
allow time for digital mute to be applied.
4
[0:15]
Amplifier MUTE Timer: Time it takes for the amplifier to MUTE the audio.
Default = 5 ms
Note:
If MUTE I/O lines are not supported, CSR recommends the using a setting of 10 ms to
allow time for digital mute to be applied.
5
[0:15]
Amplifier Power Off Timer: Time it takes for the amplifier to fully power off
Default = 200 ms
6
[0:15]
DAC Power Off Timer: Time it takes for the DAC to fully power off
Default = 10 ms
7
[0:7]
External Amplifier Power Control PIO
Default = PIO4
[8:15]
External Amplifier Mute Control PIO
Default = PIO9
8
[0]
Enable/Disable Wired Mode:
0 = Disable (default)
1 = Enabled
[1]
Audio Output Type:
0 = SUBWOOFER_OUTPUT_DAC (default),
1=SUBWOOFER_OUTPUT_I²S
[2]
Flag indicating whether or not the external amplifier supports Mute Control I/O.
0 = not supported (default)
1=supported
[3]
Flag to enable use of the external amplifier Power Control I/O line.
0 = Disabled
1 = Enabled (default))

Page 12 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
Word(s)
Bit(s)
Description
8 (cont.)
[4]
External Amplifier Mute Control I/O Type:
0 = Active high (default)
1 = Active low
Note:
This bit is ignored if the amp does not support Mute Control I/O.
[5]
External Amplifier Power Control I/O Type
0 = Active high (default)
1 = Active low)
Note:
This bit is ignored if amp Power Control I/O is disabled.
[6:8]
Restriction Level for Remote Devices:
0 = Disabled (default)
1 = Vendor
2 = Vendor/product
3 = Vendor/product/min-version
4 = Vendor/product/exact-version)
[9]
Use Link Encryption
0 = Disabled
1 = Enabled (default)
[0:15]
Reserved
9
[0:7]
Time to Connect ADC Audio After A Link Loss Occurrs
Default = 30 seconds
Max = 255 seconds)
[8:15]
Reserved
10
[0:15]
Re-connection attempt delay in seconds:
Default = 10 seconds
11
0-15
Refresh encryption key interval in seconds:
Default = 15 minutes (900 seconds)
Table 4.2: Application Features PS Key Configuration

Page 13 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
4.2. Device ID Configuration (PSKEY_USR1)
The device ID configuration is used to set the Device ID used by the application. See the Bluetooth Device
Identification Profile Specification for full details on the device ID parameters and their use.
If PSKEY_USR1 (Device ID configuration) is empty, the application does not advertise the Device ID EIR data or the
Device ID SDP record.
Table 4.3 lists the structure for PSKEY_USR1:
Word(s)
Bit(s)
Description
1
[0:15]
VendorIDSource
2
[0:15]
VendorID
3
[0:15]
ProductID
4
[0:15]
Version
Table 4.3: Device ID PS Key Configuration
4.3. Remote Device ID Configuration (PSKEY_USR2)
The remote device ID configuration is used to restrict pairing requests from remote devices based on their Device ID
SDP record. The level of restriction depends on the configured value of application Restriction Level feature.
Table 4.4 lists the structure for PSKEY_USR2:
Word(s)
Bit(s)
Description
1
0-15
VendorIDSource
2
0-15
VendorID
3
0-15
ProductID
4
0-15
Version
5
0-15
Alternate VendorIDSource
6
0-15
Alternate VendorID
Table 4.4: Remote Device ID PS Key Configuration
The Alternate VendorIDSource and Alternate VendorID are used when a specific vendor could have registered with
both the Bluetooth Special Interest Group and the USB Implementers Forum. For example, CSR have different
VendorIDs registered with both VendorIDSources:
CSR Bluetooth Special Interests Group VendorID = 0x000A
CSR USB Implementers Forum VendorID = 0x0A12
This allows a remote device requesting pairing to be authenticated regardless of the VendorID, it is using (so long as
it matches).
If no Alternate VendorID is required (for example, if a Vendor has only registered with either the Bluetooth Special
Interests Group or the USB Implementers Forum, both words (Alternate VendorIDSource and Alternate VendorID)
must be set to zero and they are ignored by the application when the configuration key is read; CSR recommends
that they are not left blank as the application then ignores this feature.

Page 14 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
4.4. LED Configuration (PSKEY_USR3)
This section describes how to create an LED pattern. Every application state must have an associated LED pattern
defined, this pattern could be blank (if required), but must still be defined.
Note:
LED patterns are continuously looped while the application state is valid for the configured pattern.
The subwoofer LED patterns have been implemented to follow configured plots, there must be three plots (one for
each supported LED) for each LED pattern. Each plot is time plotted against LED intensity.
Table 4.1 lists the data structure for each LED pattern.
ID
Mandatory
Description
TIME_MULTIPLIER
M
Measured in milliseconds, this is a multiplier used by the plot (to save on data
footprint)
NUM_POINTS_A
M
The number of plotted points for LED_A
NUM_POINTS_B
M
The number of plotted points for LED_B
NUM_POINTS_C
M
The number of plotted points for LED_C
POINTS A
C.1
The first plot point for LED_A
D.1
Intermediate plot point(s) for LED_B
C.1
The Last plot point for LED_A
POINTS B
C.2
The first plot point for LED_B
D.2
Intermediate plot point(s) for LED_B
C.2
The last plot point for LED_B
POINTS C
C.3
The first plot point for LED_C
D.3
Intermediate plot point(s) for LED_C
C.3
The last plot point for LED_C
Notes:
If NUM_POINTS_A is not zero, C.1 is mandatory
If NUM_POINTS_B is not zero, C.2 is mandatory
If NUM_POINTS_C is not zero, C.3 is mandatory
D.1: If NUM_POINTS_A is greater than 2, the required number of intermediate plot points is defined such that
the sum of the first plot point, all intermediate plot points and the last plot point is equal to the number of plot
points defined by NUM_POINTS_A
D.2: If NUM_POINTS_B is greater than 2, the required number of intermediate plot points is defined such that
the sum of the first plot point, all intermediate plot points and the last plot point is equal to the number of plot
points defined by NUM_POINTS_B
D.1:If NUM_POINTS_C is greater than 2, the required number of intermediate plot points is defined such that
the sum of the first plot point, all intermediate plot points and the last plot point is equal to the number of plot
points defined by NUM_POINTS_C
Table 4.5: LED Pattern Data Structure

Page 15 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
Rules for defining an LED pattern:
Each pattern must have a multiplier, a number of LED_A, LED_B and LED_C points followed by a
number curve points (the number of curve points depends on the value set by NUM_POINTS for the
pattern), with the exception being for a blank LED pattern (No LEDs to be turned on)
Each pattern must have at least two curve points defined for any LED that is required by the pattern
The intensity range is from 0x0 through to 0xff, where 0xff is full brightness and 0x0 is fully off
4.4.1. Example LED Pattern
LED patterns are simply plots of points for each LED that is required for that pattern. The number of points for each
pattern is undefined but must be at least two for any LED that is used by the pattern.
To create an empty pattern, set TIME_MULTIPLIER, NUM_POINTS_A, NUM_POINTS_B and NUM_POINTS_C to
zero. No curve points must be defined for the pattern.
To create an example pattern where the red LED is flashed, followed by the Blue LED flashed, two plots are
required; one plot for the red LED to follow and one plot for the blue LED to follow.
Figure 4.1 shows an example LED plot for a pattern using two LEDs.
Figure 4.1: Example LED Plot for a Pattern Using Two LEDs
Table 4.6 and Table 4.7 list the values of the plot points required for this example LED pattern:
Plot Point
Time (ms)
Intensity (0x0 <> 0xff)
P1
0
0xff
P2
500
0xff
P3
500
0x0
P4
2000
0x0
Table 4.6: Plot Point Values for the Red LED of the Example Pattern

Page 16 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
Plot Point
Time (ms)
Intensity (0x0 <> 0xFF)
P1
0
0x0
P2
500
0x0
P3
500
0xFF
P4
1000
0xFF
P5
1000
0x0
P6
2000
0x0
Table 4.7: Plot Point Values for the Blue LED of the Example Pattern
To setup this pattern, the number of points for each LED is now known, 4 for the red LED, 6 for the blue LED and 0
for the green LED. The values for each plot point are also known so the pattern configuration data can be created,
see Table 4.8.
ID
Value
Description
TIME_MULTIPLIER
0x64
Multiply the time value for each point by this value (100 ms)
NUM_POINTS_A
0x00
Green LED not required for this pattern
NUM_POINTS_B
0x04
There are 4 red LED plot points for this pattern
NUM_POINTS_C
0x06
There are 6 blue LED plot points for this pattern
POINTS_B
P1
0x00ff
0x00 (time = 0ms) 0xff (intensity = 0xff)
P2
0x05ff
0x05 (time = 500ms) 0xff (intensity = 0xff)
P3
0x0500
0x05 (time = 500ms) 0x00 (intensity = 0x00)
P4
0x1400
0x14 (time = 2000ms) 0x00 (intensity = 0x00)
POINTS_C
P1
0x0000
0x00 (time = 0ms) 0x00 (intensity = 0x00)
P2
0x0500
0x05 (time = 500ms) 0x00 (intensity = 0x00)
P3
0x05ff
0x05 (time = 500ms) 0x00 (intensity = 0xff)
P4
0x0aff
0x0A (time = 1000ms) 0x00 (intensity = 0xff)
P5
0x0a00
0x0A (time = 1000ms) 0x00 (intensity = 0x00)
P6
0x1400
0x14 (time = 2000ms) 0x00 (intensity = 0x00)
Table 4.8: Description of the Example LED Pattern with Populated Values

Page 17 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
4.4.2. Required LED Patterns
For the ADK 3.0 Subwoofer application, an LED pattern must exist for each state that has been implemented; this
allows the state manager to display a different LED pattern for each state (if required). Table 5.1 lists each
application state.
Each LED pattern must immediately follow the previous. The application parses the LED pattern configuration data
during the initialisation state.
The order the LED patterns are entered into the configuration data is very important, it must follow the state.
Table 4.9 lists the order LED patterns must appear for each application state:
State
Pattern Index
Description
subwoofer_init
0
LED Pattern for subwoofer_init
subwoofer_discoverable
1
LED Pattern for subwoofer_discoverable
subwoofer_connecting
2
LED Pattern for subwoofer_connecting
subwoofer_connected
3
LED Pattern for subwoofer_connected
subwoofer_open
4
LED Pattern for subwoofer_open
subwoofer_streaming
5
LED Pattern for subwoofer_streaming
Table 4.9: Order LED Patterns Must be Stored to the LED Configuration Data
4.5. Button Configuration (PSKEY_USR4)
The button configuration can be used to modify the buttons supported by the ADK 3.0 Subwoofer application,
4 buttons can be configured for the application.
Table 4.10 lists the data structure required to configure the buttons supported by the ADK 3.0 Subwoofer application.
Word(s)
Bit(s)
Description
1
[0:15]
Long press timer
2
[0:15]
Enter DUT mode timer
3
[0:7]
PIO for EQ select button
[8:15]
PIO for Start discoverable mode button
4
[0:7]
PIO for Volume down button
[8:15]
PIO for Volume up button
5
[0:7]
Single PIO when held high to enter continuous TX DUT mode
[8:15]
Single PIO when held high to enter DUT mode
6-7
[0:31]
PIO bitmask for entering continuous DUT mode
8-9
[0:31]
PIO bitmask for entering DUT mode
Table 4.10: Structure Used for the Button Configuration Data

Page 18 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
4.6. I²S Initialisation Configuration (PSKEY_USR6)
The application can be configured to drive an external I²S input amplifier. The external amplifier is configured using the I²C bus and relevant commands, these commands can be
configured using a PS Key along with I²S interface settings.
Words 1 to 4
Label
Plug-in
Type
Master or Slave
Operation
Left or Right
Justified I²S
Justified Data
Delay by 1 Bit
Bits per
Sample
USR Data
Key Length
No of init I²C
Commands
No of I²C
Volume
Commands
Volume
Commands
Offset
Type
Uint8
Uint8
Uint4
Uint4
Uint8
Uint8
uint8
Uint8
uint8
Range
0-2
0-1
0-1
0-1
0-255
0- 255
0-255
0- 255
0-255
Default Value
1
1
0
1
16
0
0
0
0
Words 5 to 11
Label
No of I²C
Shutdown
Commands
Shutdown
Commands
Offset
Volume
No of Bits
Volume
Range
Max
Volume
Range
Min
Music
Resampling
Frequency
Voice
Resampling
Frequency
Master Clock Scaling
Factor
Type
uint8
uint8
Uint16
Uint16
Uint16
Uint16
Uint16
Uint16
Range
0-255
0-255
0-65535
0-65535
0-65535
0-65535
0-65535
0-65536
Default Value
0
0
16
15
0
48000
48000
256

Page 19 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
For example
0001 0010 2806 021e 0000 0008 0000 00ff bb80 bb80 0100
Where:
Plug-in Type: Specifies which I²S plug-in to use, currently available options are:
0 = User defined using PSKEY_USR 36 and PSKEY_USR37
1 = SSM_2518 CSR I²S development board
2 = Customer developed plug-in
Master or Slave Operation: Specifies master or slave operation:
0 = slave
1 = master
Left or right Justified I²S: Choose between left justified and I²S data:
0 = left justified data format
1 = right justified data format
Justified Data Delay by 1 Bit: The I²S data can be delayed by 1bit:
0 = no delay of I²S data output
1 = 1 bit delay of I²Sdata output
Bits Per Sample: Specifies the number of bits in each audio sample, defaults to 16.
USR Data Key Length: Specifies the length of raw data commands PSKEY_USR37 in words.
No of init I²C Commands: Specifies how many I²C initialisation commands are specified in
PSKEY_USR37.
No of I²C Volume Commands: Specifies the number of individual I²C volume commands that will be
sent to the I²S capable device every time a volume change is made.
Volume Commands Offset: Specifies the offset in words of the first I²C volume command in the
PSKEY_USR37.
No of I²C Shutdown Commands: Specifies the number of individual I²C commands that will be sent to
the I²S capable device every time the device is hut down, i.e. close of SCO or A2DP media stream.
Shutdown Commands Offset: Specifies the offset in words of the first I²C volume command in the
PSKEY_USR37.
Volume No of Bits: Specifies the number of bits of the volume setting in the I²C command, default is
8bits.
Volume Range Max: Specifies the maximum volume value that will be sent to the I²S device to indicate
maximum output level.
Volume Range Min: Specifies the minimum volume value that will be sent to the I²S device to indicate
minimum output level.
Music Resampling Frequency: Specifies whether the music (A2DP codecs, USB, wired audio) output
rate needs to be resampled to a fixed rate, a value of 0 indicates no resampling is performed, otherwise
specify the required output frequency, e.g. 48000.
Voice Resampling Frequency: Sspecifies whether the voice (CVC, tones, voice prompts) output rate
needs to be resampled to a fixed rate, a value of 0 indicates no resampling is performed, otherwise
specify the required output frequency, e.g. 48000.
Master Clock Scaling Factor: Specifies the scaling factor for the I²S master clock.

Page 20 of 28
© Cambridge Silicon Radio Limited 2014 CS-310152-UGP1
www.csr.com
BlueCore ADK 3.0 Subwoofer User Guide
4.7. I²S Data Configuration (PSKEY_USR7)
Label
Packet
length
Volume
Level
Offset in
Packet
Packet Data
Packet
Length
Volume
Level Offset
in Packet
Packet Data
etc
Type
Uint16
Uint16
Uint16[packet
length]
Uint8
Uint8
Uint8[packet
length]
....
Range
0-255
0 –255
0-255
0-255
0 –255
0-255
....
Default Value
0
0
0
0
0
0
....
The raw data is an array of I²C data packets, the I²C initialisation command packets must be first in the array
followed by the I²C volume command packets, where:
Packet Length: The length of the packet in words, data bytes are actually packed as words.
For example, for an I²C initialisation command packet of:
0x68, 0x00, 0x81
The raw data would be:
0068 0000 0081
having a packet length of 3.
Volume Level Offset in Packet: This word is only applicable to data packets that set the volume/audio
level output of the left and right channels, its value is ignored for non-volume related packets.
For example, for an I²C volume packet of:
I²C ID, set vol command, volume level
0x68, 0x05, 0x??
The volume level offset value would be 1, since the first byte is always the I²C device ID, the first data
byte [0] is the 0x05 (set volume command), and the second data byte [1] is the actual volume level.
The volume level is not necessarily 8bits only, its size is configured in the initialisation PS Key, if the
volume level size is larger than 1 byte then the volume level offset indicates the start of the data to be
replaced with the current sink or subwoofer volume level.
Packet Data: An array of I²C command bytes whose length is specified by the Packet_length value.
For example, for an I²C initialisation command of:
I²C ID, set sample rate, automatic sample rate control
0x68, 0x01, 0x01
The complete packet and header information would comprise of five bytes and would look like:
Packet length, volume offset, I²C ID, I²C data
0x03, 0x00, 0x68, 0x01, 0x01
4.8. SWAT SDP Configuration (PSKEY_USR8)
The SDP record advertised by the SWAT (Subwoofer Audio Transfer Protocol) can be modified using
PSKEY_USR8, the first word of this configuration data is used to set the length of the SDP record (in the number of
bytes), where the following nwords contain the SDP data.
No validation checks other than reading the correct length are done on this data, it is up to the implementation to get
this data correct based on the Bluetooth SDP advertising requirements.
Table of contents