Philips Semiconductors
Audio Out
PRELIMINARY SPECIFICATION
9-7
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
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-9
only
be
done
after
9.8
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-10
. Suc-
cessive samples are always read from increasing mem-
ory
address
locations.
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.9,
“
Audio Out Operation,
”
for details on hard-
ware/software synchronization.
If SIGN_CONVERT is set to one, the MSB of the memory
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.
The
setting
of
the
Table 9-10. Operating modes and memory formats
NR_CHAN
MODE
destination of successive samples
00
00
01
01
10
10
mono
stereo
mono
stereo
mono
SD1.left
SD1.left, SD1.right
SD1.left, SD2.left
SD1.left, SD1.right, SD2.left, SD2.right
SD1.left, SD2.left, SD3.left
SD1.left, SD1.right, SD2.left, SD2.right,
SD3.left, SD3.right
SD1.left, SD2.left, SD3.left, SD4.left
SD1.left, SD1.right, SD2.left, SD2.right,
SD3.left, SD3.right, SD4.left, SD4.right.
stereo
11
11
mono
stereo
Figure 9-4. Example codec frame layout for a Crystal Semi, CS4218.
1
63
62
48
47
32
31
3
2
1
0
0
left data
n+1
(16)
left channel data
n
(16)
right channel data
n
(16)
15
CC1(16)
16
lsb
lsb
lsb
CC2(16)
lsb
AO_SCK
AO_WS
AO_SDx
Figure 9-5. AO memory DMA formats.
adr
SD1.left
n
adr+2
SD1.right
n
adr+4
SD1.left
n+1
adr+6
SD1.right
n+1
adr+8
SD1.left
n+2
adr+10
SD1.right
n+2
adr+12
SD1.left
n+3
adr+14
SD1.right
n+3
16-bit, stereo,
NR_CHAN=00
32-bit, stereo,
NR_CHAN=00
SD1.left
n
adr
SD1.right
n
adr+4
SD1.left
n+1
adr+8
SD1.right
n+1
adr+12
adr
SD1.left
n
adr+2
SD1.right
n
adr+4
SD2.left
n
adr+6
SD2.right
n
adr+8
SD3.left
n
adr+10
SD3.right
n
adr+12
SD1.left
n+1
adr+14
SD1.right
n+1
16-bit, stereo,
NR_CHAN=10