
TM1100 Preliminary Data Book
Philips Semiconductors
9-4
PRELIMINARY INFORMATION
File: aout.fm5, modified 7/24/99
For the sake of example, if only eight bits were desired to
be transmitted, use the settings of
Table 9-5 with SSPOS
set to 8. This results in LEFT[15:8] being transmitted in
data bits 0..7. RIGHT[15:8] is transmitted in data bits
32..39. All other bits in the serial frame are sent as zero.
9.7
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 Audio Out can be set to contain 1 or 2 con-
trol 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 Audio
Out 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 Audio Out logic
is ready to accept a new codec control pair.
Software always needs to ensure that the CC_BUSY sta-
tus is negated before writing a new CC1, CC2 pair. By
busy waiting on CC_BUSY, the DSPCPU can emit a se-
quence of individual audio frames with distinct control
field values reliably. This can for example be used during
codec initialization. No provision is made for interrupt
driven operation of such a sequence of control values - it
is assumed that the value of control fields is rarely
changing and can be held constant during the DMA buff-
er emission of audio.
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 ze-
ro.
Figure 9-4 shows a 64-bit frame suitable for use with the
CS4218 codec. It is obtained by setting POLARITY=1,
LEFTPOS=0,
RIGHTPOS=32,
DATAMODE=0,
SS-
POS=0, CLOCK_EDGE=1, WS_PULSE=1, CC1_POS =
16, CC1_EN=1, CC2_POS=48, CC2_EN=1.
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 bit) of a hypothetical 18-bit precision I2S D/A converter.
AO_SCK
AO_WS
AO_SD
Table 9-5. Example Setup For I2S
Field
Value
Explanation
POLARITY
0
Frame starts with negedge
AO_WS.
LEFTPOS
0
LEFT[15] will go to serial frame
position 0.
RIGHTPOS
32
RIGHT[15] will go to serial frame
position 32.
DATAMODE
0
MSB rst.
SSPOS
0
Stop with LEFT/RIGHT[0], send 0’s
after.
CLOCK_EDGE
0
AO_SD change on negedge
AO_SCK
WSDIV
63
Serial frame length = 64. Only rele-
vant if SER_MASTER=1.
WS_PULSE
0
emit 50% duty cycle AO_WS. Only
relevant if SER_MASTER=1.
Figure 9-4. Example codec frame layout for a Crystal Semi CS4218.
1
63
62
48
47
32
31
3
2
1
0
left datan+1(16)
left channel datan(16)
right channel datan(16)
15
CC1(16)
16
lsb
CC2(16)
lsb
AO_SCK
AO_WS
AO_SD