
TM1300 Data Book
Philips Semiconductors
9-6
PRODUCT SPECIFICATION
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.
Note that frames are generated (externally or internally)
even when TRANS_ENABLE is de-asserted. Writes to
CC1
and
CC2
should
only
be
done
after
TRANS_ENABLE is asserted. The ‘first’ CC values will
then go out on the next frame. For a summary of codec
control fields see Table 9-8
9.9
MEMORY DATA FORMATS
The AO unit autonomously reads samples from memory
in 16 or 32 bit-per-sample memory formats, as shown in
Figure 9-5 for some example modes. Memory samples
are retrieved and used as described in Table 9-9. Suc-
cessive samples are always read from increasing mem-
ory
address
locations.
The
setting
of
the
LITTLE_ENDIAN bit in the AO_CTL register determines
the byte order of retrieved 16 or 32-bit samples. Refer to
Appendix C, “Endian-ness,”
for details on byte ordering con-
ventions.
AO hardware implements a double buffering scheme to
ensure that there are always samples available to trans-
mit, even if the DSPCPU is highly loaded and slow to re-
spond to interrupts. The DSPCPU software assigns 2
equal size buffers by writing a base address and size to
the MMIO control fields described in Figure 9-6. Refer to
Section 9.10, “Audio Out Operation,” for details on hard-
ware/software synchronization.
If SIGN_CONVERT is set to one, the MSB of the memo-
ry data is inverted, which is equivalent to translating from
offset binary representation to two’s complement. This
allows the use of an external two’s complement 16-bit D/
A converter to generate audio from 16-bit unsigned sam-
ples. This MSB inversion also applies to the ‘0’ values
transmitted to non-active output channels.
Note that the AO hardware does
not support A-law or
-
law eight-bit data formats. If such formats are desired,
the DSPCPU should be used to convert from A-law or
-
law data to 16-bit linear data.
Table 9-9. Operating modes and memory formats
NR_CHAN MODE
destination of successive samples
00
mono
SD1.left
00
stereo
SD1.left, SD1.right
01
mono
SD1.left, SD2.left
01
stereo
SD1.left, SD1.right, SD2.left, SD2.right
10
mono
SD1.left, SD2.left, SD3.left
10
stereo
SD1.left, SD1.right, SD2.left, SD2.right,
SD3.left, SD3.right
11
mono
SD1.left, SD2.left, SD3.left, SD4.left
11
stereo
SD1.left, SD1.right, SD2.left, SD2.right,
SD3.left, SD3.right, SD4.left, SD4.right.
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_SDx
Figure 9-5. AO memory DMA formats.
adr
SD1.leftn
adr+2
SD1.rightn
adr+4
SD1.leftn+1
adr+6
SD1.rightn+1
adr+8
SD1.leftn+2
adr+10
SD1.rightn+2
adr+12
SD1.leftn+3
adr+14
SD1.rightn+3
16-bit, stereo,
NR_CHAN=00
32-bit, stereo,
NR_CHAN=00
SD1.leftn
adr
SD1.rightn
adr+4
SD1.leftn+1
adr+8
SD1.rightn+1
adr+12
adr
SD1.leftn
adr+2
SD1.rightn
adr+4
SD2.leftn
adr+6
SD2.rightn
adr+8
SD3.leftn
adr+10
SD3.rightn
adr+12
SD1.leftn+1
adr+14
SD1.rightn+1
16-bit, stereo,
NR_CHAN=10