
BlueLab ™ v3.2 Combined AV Headset
User Guide
May 2005

Churchill House Cambridge Business Park
Cowley Road Cambridge CB4 0WZ
United Kingdom
Registered in England 3665875
Tel: +44 (0)1223 692000 Fax: +44 (0)1223 692001
www.csr.com
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement.


This document provides information on the Combined AV Headset application that accompanies BlueLab™ v3.2. This document describes how to compile, download and run the application.
The application demonstrates to product developers the features of _äìÉ`çêÉ»PJjìäíáãÉÇá~. The application is a starting point for product development programs. It is envisaged that product developers may define their own Man Machine Interface (MMI) and add such features as battery monitoring to create a finished end-product.
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 3 of 24
Introduction

The target audience for this document is hardware and software developers using the Combined AV Headset application that accompanies BlueLab v3.2 as a basis for their own product developments.
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 4 of 24
Target Audience

The target hardware is CSR’s BlueCore3-Multimedia Development Board (DEV-PC-1307 Rev C). The user will also need a suitable AV source capable of providing a Bluetooth® wireless technology-compliant SBC encoded audio stream.
application. The microphone input circuit does not work on this revision of the board.
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 5 of 24
Target Hardware

This chapter provides guidance on the installation of xIDE as supplied on the BlueLab CD-ROM.
BlueLab xIDE should be installed on a PC running Windows 2000 or Windows XP.
CSR recommend that 150Mbytes of free disk space is available.
10Mbytes of additional space.
A minimum of Windows Power User privileges is required to install the software correctly.
New BlueLab installations can coexist with previous releases provided they are installed in different directories. The use of a convention such as C:\BlueLabversion (eg C:\Bluelab3_2) to create the program folder will avoid conflict between versions.
directory which itself has spaces in its name or is contained within a folder that has spaces in its name eg xIDE cannot be successfully installed in the Program Files directory.
CSR recommend that any applications running on the PC are closed before installing the BlueLab software.
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 6 of 24
BlueLab Installation

The Digital Signal Processor (DSP) libraries required to build the MP3 decoder must be obtained and installed separately (please contact the support channel for details).
They contain MP3 technology which incorporates intellectual property owned by Thomson and/or Fraunhofer Gesellschaft.
Supply of this product does not convey a license under the relevant intellectual property of Thomson and/or Fraunhofer Gesellschaft nor imply any right to use this product in any finished end user or ready-to-use final product. An independent license for such use is required. For details, please visit http://www.mp3licensing.com
The Combined AV application shipped with BlueLab v3.2 includes support for the Wolfson (WM8731) CODEC.
To enable support for the Wolfson CODEC simply add WOLFSON_CODEC to the list of Define symbols in the Project Properties (as shown below) before building the application.

blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 7 of 24
BlueLab Installation

When BlueLab v3.2 has been successfully installed, the Combined AV Headset application can be built and executed using the application source code, shipped with BlueLab v3.2.
This section guides you step-by-step through the process of building and executing this application.
The application implements the following profiles:
! Advanced Audio Distribution Profile
! Audio/Video Remote Control Profile
This enables stereo music to be streamed to the headset with the ability to accept and make telephone calls via a Bluetooth-enabled mobile phone.

OFF
ON
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 8 of 24
! Headset Profile · ! Handsfree Profile

Double-click on the xIDE icon on your desktop or from the Start / Programs menu.

If previous application development work has been carried out on the BlueCore3-Multimedia Development Board, CSR recommends that you restore the factory setting of the BlueCore chip.
A .psr file has been added to BlueLab v3.2 to simplify this process, for further information see section 5.3.
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 9 of 24

Select Project / Open Workspace, navigate to \BlueLab\apps\av_headset_hfp and select sbc_decoder.xiw.

Three options are defined in the code to control the latency/robustness of the DSP buffer operation. By default this is set to maximum robustness (STREAMING_MAX_RANGE_AND_ROBUSTNESS).
If this option is acceptable proceed to step 5.
However, if a reduction in latency is required, two other options are available as defined by STREAMING_STANDARD_LATENCY and STREAMING_LOW_LATENCY.
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 10 of 24

To implement one of these options add the required definition to the Define symbols field in the Project Properties dialogue:
4.1. Select Project \ Properties The Properties dialogue appears:

4.2. Delete the existing definition.
4.3. Enter the required definition to the Define symbols field
Select Build / Build or press F7 to build the sbc_decoder DSP application.
mp3_decoder.xiw has not been built, see section 4.2.1. If the MP3 add-on has not been installed proceed as described in step 5.
Select Project / Open Workspace, navigate to \BlueLab\apps\av_headset_hfp and select av_headset_hfp.xiw.
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 11 of 24

Select Build / Build menu or press F7 to build the av_headset_hfp VM application.

Select Run from the Debug menu or press F5 to download and execute the application. The application image (including the DSP code built in Step 3) will be downloaded to the BlueCore3-Multimedia development board connected to your PC.
The DSP libraries required to build the MP3 decoder must be obtained and installed separately (please contact the support channel for details).They contain MP3 technology which incorporates intellectual property owned by Thomson and/or Fraunhofer Gesellschaft.
just the sbc_decoder.xiw as long as the MP3 add on executable has not been run.
Supply of this product does not convey a license under the relevant intellectual property of Thomson and/or Fraunhofer Gesellschaft nor imply any right to use this product in any finished end user or ready-to-use final product. An independent license for such use is required. For details, please visit http://www.mp3licensing.com
mp3_decoder.xiw having been built.
Having installed BlueLab v3.2, install BlueLab_3.2-release-mp3.exe (available via your usual support channel).
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 12 of 24

Build the MP3 decoder application by opening the mp3_decode workspace and selecting build in xIDE. The mp3_decode workspace can be built in exactly the same way as the sbc_decode workspace in section 5.1 Step 4.
Once the mp3_decode application has been built go back to section 5.1 step 3 and continue with building the av_headset_hfp application.
To include CVC (Clear Voice Capture) echo cancellation and noise reduction simply add the define symbol INCLUDE_CVC to the Project Properties / Define symbols field before building the av_headset_hfp.xiw project.
processing data for five minutes.
The ParamMgr Utility can be used to fine tune the CVC code to optimise the performance based on the acoustic characteristics of your product. Please see the ParamMgr User guide (CSR reference blab-ug-007Pa).
The factory settings can be restored using the PSTool application supplied with BlueLab v3.2.
To restore the factory default settings using PSTool:

blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 13 of 24

The PSTool application dialog appears:


An ‘Open Persistent Store File’ dialog appears:

blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 14 of 24

blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 15 of 24

The Combined AV Headset Application is now running on the BlueCore3-Multimedia Demonstration Board. To stream audio and connect a mobile telephone to the headset, it needs to be paired.
Stop the application by pressing Shift-F5. This stops the application debugger and halts operation.
To make the headset discoverable for 60 seconds, hold down VOL- and VOL+ and press the Reset button. The blue LED will begin flashing more rapidly indicating the device is discoverable. In this state the headset can be discovered by AV sources or a Bluetooth-enabled handset that supports the Headset or Handsfree profile.
With the Combined AV Headset in discoverable mode, pair the handset with the headset. The Pin Code is 8888. Refer to the Instruction Manual supplied by the Handset manufacturer for further information on pairing.
The USB Multimedia dongle is supplied as part of the BlueLab3-Multimedia Development Kit. Plug this dongle into the USB port of your PC and start the avcontrol.exe application located in the following folder:
With the Combined AV Headset in discoverable mode, click on the Discover New Headphones button. The Multimedia dongle will locate the headset, pair and connect to the headset.
dongles shipping with previous versions of BlueLab have a PIN of 4444. If the devices fail to connect it is probable because the PINs are not matched. The way to resolve this conflict is to change the entry in the av_headset_hfp.psr file that sets the PSKEY_FIXED_PIN. Change &035b = 0038 to &035b = 0034. When the application is run in xIDE the PIN will then be set to 4444.
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 16 of 24
Pairing · \BlueLab\tools\bin\

The actions performed by the buttons change dynamically, depending on the current mode of operation.
These modes of operation are active when there is no media stream active or whenever an HSP/HFP operation is performed while a media stream is active. These operations suspend the audio stream until the operation is complete. At this point, the media stream continues to play.
When initiating a Service Level Connection (SLC), the application will tries to connect using the HFP profile. If the handset does not support HFP, it tries HSP and, if that fails, the attempt to connect is aborted.
When the handset is connecting to the headset it accepts the connection for whatever profile the handset chooses.
It should be noted the CVC (Acoustic Echo Canceller and Noise Reduction) DSP algorithm can be compiled for inclusion into the av_headset_hfp reference application. Refer to section 5.3 for compile instructions (default is CVC disabled).
This mode of operation is active whenever a media stream is active.
To power the headset on, hold down the Play/Pause (F1) button for at least two seconds.
To power the headset off, hold down the Stop (F2) button for at least four seconds. The headset will only completely power down from that point when all current connections are closed, or a further timeout of five seconds occurs.
Table 7.1, Table 7.2 and Table 7.3 define the button functionality while the headset is in the different operation modes.
! Long press - Button held for more than two seconds
! Short press - Button held for less than two seconds
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 17 of 24
Operation

Table 7.1 shows how the buttons operate while the headset is in AV Mode. Long presses have no effect, except for the Volume buttons.
VOL+ Pressed Vol Up
VOL+ Held (Acted on every 1s) Vol Up
VOL- Held (Acted on every 1s) Vol Down
PLAY/PAUSE Pressed Play/Pause music
STOP Pressed Stop music
FORWARD Pressed Skip track forwards
BACKWARD Pressed Skip track backwards
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 18 of 24
Operation · Button AV Mode · VOL- Pressed Vol Down

Table 7.2 shows how the buttons operate while the headset is in HFP Mode. It shows how the buttons operate depending on the state of the headset.
Table entries in italic describe the button functionality assuming an active AV stream.

If there is no AV source connected replace avrcp calls with the non-italic calls
CVC Mode* If CVC is compiled in the application, with each short button press the software toggles between HF, NR and PSTHRGH modes. This button is only operational if a connection exists and the device is not muted. When operational and the Backward button is pressed, the next mode will be selected and a tone will be played to the loudspeaker. The tone will identify the currently operating mode. The following indicates the tone mapping.
1 Beep, HF mode: Hands-Free is the combination of an AEC (Acoustic Echo Canceller with microphone Noise Reduction). Default mode for CVC.
2 Beeps, NR mode: Noise Reduction to the microphone send-out signal.
3 Beeps, PSTHRGH mode: Pass through mode where the audio is routed through the Kalimba, disabling Hands-free, effectively bypassing any audio processing.
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 19 of 24
Operation

Table 7.3 shows how the buttons operate while the headset is in HSP Mode. It shows how the buttons operate depending upon the state of the headset.
Table entries in italic describe the button functionality assuming an active AV stream.

If there is no AV source connected replace avrcp calls with the non-italic calls
STOP Long Press X
CVC Mode* If CVC is compiled in the application, with each short button press the software toggles between HF, NR and PSTHRGH modes. This button is only operational if a connection exists and the device is not muted. When operational and the Backward button is pressed, the next mode will be selected and a tone will be played to the loudspeaker. The tone will identify the currently operating mode. The following indicates the tone mapping.
1 Beep, HF mode: Hands-Free is the combination of an AEC (Acoustic Echo Canceller with microphone Noise Reduction). Default mode for CVC.
2 Beeps, NR mode: Noise Reduction to the microphone send-out signal.
3 Beeps, PSTHRGH mode: Pass through mode where the audio is routed through the Kalimba, disabling Hands-free, effectively bypassing any audio processing.
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 20 of 24
Operation

The codec library contains a range of settings that control the decoding behaviour of the DSP.
The values defined for the variable $decoder_codec_stream_struc control the user experience, especially when the device is at the extreme limits of Bluetooth range.
The parameters themselves are defined in the $decoder_codec_stream_struc source code found in C:\BlueLab\apps\av_headset_hfp\codec_decoder.asm. The numerical values can be simply manipulated in the source code to optimise the required.
See the xIDE on-line help (DSP Reference guide/File List/codec/stream_decode) for further explanation.
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 21 of 24
Decoder behaviour settings

BlueLab v3.2 Combined AV Headset Release Note blab-srn-002Pa
BlueLab v3.2 Release Note blab-srn-001Pa
BlueLab v3.2 ParamMgr User Guide (for CVC only) Blab-ug-007Pa
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 22 of 24
Document References · Document Reference

BlueCore™ Group term for CSR’s range of Bluetooth wireless technology chips
BlueLab™ CSR’s development toolset for building applications to run in the firmware’s VM
Bluetooth® Set of technologies providing audio and data transfer over short-range radio connections
CSR Cambridge Silicon Radio
CVC™ Clear Voice Capture DSP audio processing performing AEC and NR
DSP Digital Signal Processor
MMI Man Machine Interface
SLC Service Level Connection
SPI Serial Peripheral Interface
USB Universal Serial Bus
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 23 of 24

Revision Date Reason for Change
a 28 MAY 05 Original publication of this document (CSR reference blab-ug-005Pa)
Combined AV Headset User Guide
blab-ug-005Pa
May 2005
Unless otherwise stated, words and logos marked with ™ or ® are trademarks registered or owned by Cambridge Silicon Radio Limited 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 license is granted under any patent or other rights owned by Cambridge Silicon Radio Limited.
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.
CSR’s products are not authorised for use in life-support or safety-critical applications.
blab-ug-005Pa © Cambridge Silicon Radio Limited 2005 This material is subject to CSR’s non-disclosure agreement. Page 24 of 24
Document References
Pages referenced in this manual — manufacturer, support and downloads.
Owners and our team usually reply within a day — and your question helps the next person too.
Be the first to ask — other owners or our team will answer.