Page 20 of 28
© Cambridge Silicon Radio Limited 2014
CS-310152-UGP1
www.csr.com
BlueC
or
e
A
D
K
3
.0
Subw
oo
fer
U
s
er
G
uide
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
n
words 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.