
Philips Semiconductors
Audio Out
PRODUCT SPECIFICATION
9-5
9.7.2
I2S Serial Framing Example
Refer to Figure 9-3 and Table 9-7 to see how the AO unit
MMIO registers should be set to transmit 16 or 32 bits of
stereo data via an I2S serial standard to an 18-bit D/A
converter with a 64-bit serial frame.
9.8
CODEC CONTROL
In addition to the left and right data fields that are gener-
ated based on autonomous DMA action, a serial frame
generated by the AO unit can be set to contain 1 or 2
control fields up to 16 bits in length. Each control field can
be independently enabled/disabled by the CC1_EN,
CC2_EN bits in AO_CTL. The content shifted into the
frame is taken from the CC1 and CC2 field in the AO_CC
register. The CC1_POS and CC2_POS fields in the
AO_CFC register determine the first bit position in the
frame where the control field is emitted. The field is emit-
ted observing the setting of DATAMODE, i.e. LSB or
MSB first.
The CC_BUSY bit in AO_STATUS indicates if the AO
unit is ready to receive another CC1, CC2 value pair.
Writing a new value pair to AO_CC writes the value into
a buffer register, and raises the CC_BUSY status. As
soon as both CC1 and CC2 values have been copied to
a shadow register in preparation for transmission,
CC_BUSY is negated, indicating that the AO logic is
ready to accept a new codec control pair. The old CC1/
CC2 data keeps being transmitted - i.e. software is not
required to provide new CC1 and CC2 data.
Software always needs to ensure that the CC_BUSY sta-
tus is negated before writing a new CC1, CC2 pair. By
polling CC_BUSY, the DSPCPU can emit a sequence of
individual audio frames with distinct control field values
reliably. This can, for example, be used during codec ini-
tialization. No provision is made for interrupt driven
operation of such a sequence of control values; it is as-
sumed that after initialization, the value of control fields
determine slow, asynchronous changing parameters
such as volume.
It is legal to program the control field positions within the
frame such that CC1 and CC2 overlap each other and/or
left/right data fields. If two fields are defined to start at the
same bit position, the priority is left (highest), right, CC1
then CC2. The field with the highest priority will be emit-
ted starting at the conflicting bit position. If a field
f2 is de-
fined to start at a bit position
i that falls within a field f1
starting at a lower bit position,
f2 will be emitted starting
from
i and the rest of f1 will be lost. Any bit positions not
belonging to a data or control field will be emitted as ‘0’.
Table 9-7. Example setup for 64-bit I2S framing
Field
Value
Explanation
POLARITY
0
Frame starts with negedge AO_WS.
LEFTPOS
0
LEFT[msb] will go to serial frame
position 0.
RIGHTPOS
32
RIGHT[msb] will go to serial frame
position 32.
DATAMODE
0
MSB rst.
SSPOS
0
Stop with LEFT/RIGHT[0], send 0’s
after.
(for 32 bits/sample mode, this eld
could be set to 14 to ensure zeroes
in all unused bit positions)
CLOCK_EDGE
0
AO_SDx change on negedge
AO_SCK
WSDIV
63
Serial frame length = 64.
WS_PULSE
0
emit 50% duty cycle AO_WS.
1
63
62
52
51
50
33
32
31
30
18
17
3
2
1
0
left channel datan+1(18)
left channel datan(18)
right channel datan(18)
49
Figure 9-3. Serial frame (64 bits) of a 18-bit precision I2S D/A converter.
AO_SCK
AO_WS
AO_SDx
Table 9-8. AO MMIO codec control/status elds
Field Name
Description
CC1 (16)
The 16-bit value of CC1 is shifted into each
emitted serial frame starting at bit position
CC1_POS, as long as CC1_EN is asserted.
CC1_POS
Denes the bit position within a serial frame
where the rst data bit of CC1 is placed.
RESET Default 0.
CC1_EN
0
CC1 emission disabled (RESET default)
1
CC1 emission enabled.
CC2(16)
The 16-bit value of CC2 is shifted into each
emitted serial frame starting at bit position
CC2_POS, as long as CC2_EN is asserted.
CC2_POS
Denes the bit position within a serial frame
where the rst data bit of CC2 is placed.
Default 0.
CC2_EN
0
CC2 emission disabled (RESET default)
1
CC2 emission enabled.
CC_BUSY
0
AO is ready to receive a CC1, CC2 pair
(RESET default).
1
AO is not ready to receive a CC1, CC2
pair. Try again in a few SCK clock inter-
vals.