Beruflich Dokumente
Kultur Dokumente
BlueCore
Page 1 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
Document History
Revision Date History
Contacts
General information www.csr.com
Information on this product sales@csr.com
Customer support for this product www.csrsupport.com
More detail on compliance and standards product.compliance@csr.com
Help with this document comments@csr.com
Page 2 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
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 ..................................................................................................................................... 4
1. Introduction ............................................................................................................................................................ 5
1.1. Hardware ........................................................................................................................................................ 5
2. Getting Started....................................................................................................................................................... 6
2.1. To Flash the Audio Sink Application onto Suitable Hardware ......................................................................... 6
Page 3 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
11. Infra-red Input Monitor...................................................................................................................................... 28
11.1. Feature Overview ...................................................................................................................................... 28
11.2. Infra-red User Events ................................................................................................................................ 28
11.3. Infra-red System Events ........................................................................................................................... 28
11.4. Supported Infra-red Consumer Protocols.................................................................................................. 28
11.5. Infra-red Transmissions ............................................................................................................................ 28
11.6. Infra-red Learning Mode ........................................................................................................................... 29
11.7. Configuring the Infra-red Input Monitor ..................................................................................................... 29
12. Audio Sink Application States .......................................................................................................................... 30
Document References ................................................................................................................................................ 31
Terms and Definitions ................................................................................................................................................. 31
Page 4 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
1. Introduction
This document describes how to use the Audio Sink application included in this ADK. The Audio Sink application
provides a basis for developing Bluetooth enabled:
Headsets
Soundbars
Speakers
The application runs as a Bluetooth Audio Sink that supports the following profiles:
HSP v1.1
HFP v1.6
A2DP v1.3
1.1. Hardware
The document describes the Audio Sink application in this ADK running on the CSR Bluetooth example design
boards CNS10001v4 (CSR8670) and H13179 with a H13374 module (CSR8675).
PSKEY_BDADDR
PSKEY_ANA_FTRIM_OFFSET
PSKEY_CHARGER_CURRENT
Page 5 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
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 ready to be flashed from the xIDE development environment onto the development board.
2. Getting Started
2.1. To Flash the Audio Sink Application onto Suitable Hardware
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.
Page 6 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
2.2. Making a Bluetooth Connection with another Device
2.2.1. To Pair and Connect the Audio Sink Application to an AG Device
1. Turn on the Audio Sink application by pressing and holding the VREG button, if the Audio Sink
application has not been paired before it will automatically enter pairing mode and be connectable and
discoverable.
2. Discover the Audio Sink application with the AG an initiate pairing. If a pin code is requested enter
0000.
3. The Audio Sink application is now paired with the AG.
Page 7 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
3. To Set Up the xIDE Project Environment
Audio Sink application project configurations are provided for Headset and Soundbar use cases on CSR8670 and
CSR8675, these can be selected from the drop down box in the xIDE tool bar.
Compile time options can then be selected from the Audio Sink application project properties and Enabled or
Disabled as required.
Note:
Including project options that are unsupported by the hardware you are using may produce the error:
Application uses trapsets which firmware doesn't support.
Execution Mode should be left on the setting Hardware Default or set to Assisted Native mode. This is the only
mode available on CSR8670 and CSR8675 platforms.
bdaddr bdaddr -
region region -
service service -
Page 8 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
Library Available Variants Notes
csr_voice_prompts csr_voice_prompts_plugin, -
_plugin csr_voice_prompts_plugin_file_only,
csr_a2dp_decoder_common_plugin_stereo_debug,
csr_a2dp_decoder_common_plugin _stereo_bidir,
csr_a2dp_decoder_common_plugin
_stereo_bidir_debug,
csr_a2dp_decoder_common_plugin
_stereo_bidir_wbs,
csr_a2dp_decoder_common_plugin_stereo_bidir_wb
s_debug,
csr_common_exampl csr_common_example_plugin -
e_plugin
sdp_parse sdp_parse -
md5 md5 -
usb_device_class usb_device_class, -
usb_device_class_no_mass_storage,
usb_device_class
Page 9 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
Library Available Variants Notes
audio_plugin_comm audio_plugin_common -
on
csr_speech_recogn csr_speech_recognition_plugin, -
ition_plugin csr_speech_recognition_plugin_debug
Page 10 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
4. Peer Device Support
The ADK has a feature that allows two ADK based devices to connect to each other and relay A2DP based audio.
The two connected ADK devices are known as Peer devices and connect in a Peer session, see the ADK Peer
Device Support User Guide.
Page 11 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
5. DSPSoundbar Configuration
The Sink application has configuration aimed at Soundbars using CSR8670 or CSR8675. In addition to the usual
features of the Sink application this enables manual selection of audio sources (see events in ADK Sink
Configuration) and optional use of a wireless Subwoofer device, see ADK Subwoofer User Guide.
To configure this, load the Sink application as described in section 2.1 but merge the .psr file
sink_config_10001v4_soundbar.psr or sink_config_H13179v2_H13374v1_soundbar.psr
depending on the development board in use, then select the Soundbar project configuration type from the xIDE
menu bar.
Page 12 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
6. AUDIO Configuration
6.1. Input Sources
The Sink application accepts audio input from a variety of different sources including:
Analogue wired input
USB wired input
S/PDIF wired input
Bluetooth audio inputs as well as FM receive
The default PSR configuration files for the Headset build configures the application to accept the following input
sources:
Bluetooth SCO and A2DP
Page 13 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
6.2. S/PDIF Input
The S/PDIF wire digital audio input supports all the features that are available to the analogue input types including:
Music enhancement
User EQ
Configurable volume control
High quality voice prompts
Audio routing
Subwoofer connections;
Note:
TrueWireless is not available for S/PDIF input.
There are hardware reference designs for both coaxial (phono) and optical (TOSLINK) S/PDIF connections.
The sample rate is automatically detected and any transient is smooth and glitch-free. It also supports detection of
compressed digital audio defined by the IEC 61937 standard. CSR’s ADK 3.5 supports the Dolby Digital AC-3 format
which can be used to connect the output of DVD players or game consoles. Contact CSR to get the Dolby-certified
AC-3 decoder and instructions on how to enable Dolby Digital in ADK 3.5.
Page 14 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
6.2.1. S/PDIF-specific Configuration
Table 6.1 lists the configuration parameters which can be set using the Sink Configuration tool.
Page 15 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
6.3. Output Sources
Both the Headset and Soundbar applications can output audio using DAC, I2S or S/PDIF. The default configuration
.psr files for both the Headset and Soundbar are configured to use the DAC output using the digital volume control
scheme, see section 8.2.
Page 16 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
7. Audio Routing – Music Applications
Both the Headset and Soundbar applications have a PS Key that configures the audio routing capabilities of the
device, PSKEY_USR_37, this key can be configured with the Sink Configuration Tool and allows control of both the
input and output routing options as well as other optional settings.
Page 17 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
8. Volume Control
Both the Headset and Soundbar support three types of volume control:
1. DAC Volume Control
2. Digital Volume Control
3. Hybrid Volume Control
The Sink Configuration Tool is used to configure the three different types of volume control using the Volume
Configuration tab.
Page 18 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
8.3. Hybrid Volume Control
To give the best signal to noise ratio volume control it is necessary to use the Hybrid Volume Control mechanism,
this is a combination of DAC and DSP volume control.
The configuration is the same as for the digital volume control with the exception of setting the volume control type to
hybrid.
Hybrid volume control works by using the DAC control to give steps of 3 dB in combination with the digital DSP
control to give increased resolution of 0 to 3 dB.
As with the digital volume control the resolution can be whatever is required for the product but attention should be
paid to the step size to smooth operation with USB and AVRCP volume level changes.
Page 19 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
9. Input Manager
9.1. Feature Overview
The Input Manager for the Soundbar application is responsible for managing events received from all Input Monitor
Tasks. There are two parts to the Input Monitor:
1. Bluetooth Smart Input Monitor
2. Infra-red Input Monitor
The Input Manager decides which input events are used to generate user events that the Soundbar application then
processes.it gives a clear layered structure to managing input events of various types.
Figure 8.1 shows a block diagram outlining the design for the Input Manager:
Page 20 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
InputEventLongRelease:
The input(s) have been released after the long timer has fired, but before the very long timer
has fired.
InputEventVLongTimer:
The very long timer fires while the input(s) are still pressed down.
InputEventVLongRelease
The input(s) have been released after the very long timer has fired, but before the very very
long timer has fired.
InputEventVVLongTimer:
The very very long timer fires while the input(s) are still pressed down.
InputEventVVLongRelease:
The input(s) have been released after the very very long timer has fired.
InputEventRepeatTimer:
9.3. Timers
The Input Manager is the only place where timers used by input monitors are configured, each input monitor must
inherit the configured timers from the input manager so all inputs are based on the same user interaction.
For ADK 3.5, the buttons are not controlled by the Input Manager; they are managed by the Button Manager.
Page 21 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
10. Bluetooth Smart Input Monitor
10.1. HID Over GATT Profile
10.2. Overview
The HID Over GATT Profile (HOGP) defines the procedures and features to be used by Bluetooth Smart HID
Devices using GATT and Bluetooth HID Hosts using GATT.
This profile is an adaptation of the USB HID specification to operate over a Bluetooth low energy wireless link. This
profile only operates over an Low Energy transport.
10.4. Roles
The profile defines three roles:
1. HID Device: The HID Device shall be a GATT server.
2. Boot Host: The Boot Host shall be a GATT client.
3. Report Host: The Report Host shall be a GATT client.
HID Host refers to both roles: Boot Host and Report Host.
A Report Host: Required to support a HID Parser and be able to handle arbitrary formats for data
transfers (known as Reports).
A Boot Host: Not required to support a HID Parser as all data transfers (Reports) for Boot Protocol
Mode are of predefined length and format.
Page 22 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
Multiple service instances of the following may be supported, but are not considered a part of this
profile:
Any Service other than HID Service, Device Information Service, or Scan Parameters Service.
Page 23 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
10.8. System Events
The following list describes each of the system events that are supported by the BLE Input Monitor:
EventSysBleRemotePairingTimeout:
This event is used to indicate when the Bluetooth Smart Pairing Timeout timer fires.
EventSysBleRemotePairingSuccess:
This event is used to indicate when a Bluetooth Smart HID Device has successfully paired
with the Soundbar device.
EventSysBleRemotePairingFailed
This event is used to indicate when a Bluetooth Smart HID Device has unsuccessfully paired
with the Soundbar device.
EventSysBleRemoteConnected
This event is used to indicate when a Bluetooth Smart HID Device has connected with the
Page 24 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
10.9.2.3. Connections with Paired Devices While Bluetooth Smart Pairing Mode is Enabled
While the Bluetooth Smart Pairing Mode is enabled, paired HID Devices are still able to connect with the Soundbar.
If a paired device connects while Pairing Mode is active, the pairing mode is only automatically disabled if the
number of connections is equal to the maximum supported, see the ADK Sink Configuration User Guide for further
details on configuring this option.
Page 25 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
10.10.4. Descriptor Discovery
When all the characteristics for each service have been discovered, the Soundbar must discover all descriptors for
each characteristic that the HID Device has setup.
The Descriptors are used to describe each characteristic. Ssome characteristics may have multiple descriptors to
describe what features are or are not supported.
Page 26 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
While the button is pressed and held, the Bluetooth Smart Input Monitor task continues to send input event
messages to the input monitor (depending on the timer configuration), informing the input manager of the duration of
the button press, when the button is released, the Bluetooth Smart Input Monitor sends an event to the input
manager to inform the button has been released.
It is the responsibility of the input manager to listen to these input events from the Bluetooth Smart Input Monitor and
generate user events the Soundbar application can process.
Page 27 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
11. Infra-red Input Monitor
11.1. Feature Overview
The Infra-Red Input Monitor for the Soundbar application is responsible for managing events received from Infra-red
remote controllers. Infra-red events are converted to input events and sent to the Input Manager so they can be
processed. This section describes how to use the Infra-red Input Monitor task.
Note:
The Infra-red Input Monitor does not support Multiple Infra-red buttons being pressed.
Page 28 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
When the Soundbar application is notified of an Infra-red transmission, the address and code must match an entry in
either the default configuration lookup table or a special lookup table containing learnt Infra-red codes.
Page 29 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
12. Audio Sink Application States
The Audio Sink application defines the application states in the source file sink_states.h. Each Bluetooth profile
has its own state machine. Table 12.1 describes the main states used by the application.
State Description
deviceLimbo The Audio Sink application is logically off but physically on – limbo.
deviceConnDiscoverable The Audio Sink application is connectable and discoverable - page and
inquiry scanning.
deviceActiveCallSCO The connected AG has an active call in progress and the audio is in the
Audio Sink application.
deviceThreeWayCallWaiting The connected AG has an active call and a second incoming call.
deviceThreeWayCallOnHold The connected AG has an active call and a second call on hold.
deviceActiveCallNoSCO The connected AG has an active call and the audio is in the handset.
deviceLowBattery Low battery state, does not actually change to this state but will be used
for independent low battery LED warning.
Page 30 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
Document References
Document Reference
AG Audio Gateway
BlueCore® Group term for CSR’s range of Bluetooth wireless technology chips
Bluetooth® Set of technologies providing audio and data transfer over short-range radio connections
IC Integrated Circuit
ID Identifier
PC Personal Computer
Page 31 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com
PIO Programmable Input/Output
Page 32 of 32
© Cambridge Silicon Radio Limited 2014 CS-236868-UGP7
www.csr.com