
Philips Semiconductors
Audio Out
File: aout.fm5, modified 7/24/99
PRELIMINARY INFORMATION
9-7
9.9
AUDIO OUT OPERATION
tion of the control and status fields of the Audio Out unit.
To ensure compatibility with future devices, any unde-
fined or reserved MMIO bits should be ignored when
read, and written as zeroes
The Audio Out unit is reset by a TM1100 hardware reset,
or by writing 0x80000000 to the AO_CTL register. Upon
reset, transmission is disabled (TRANS_ENABLE = 0),
and buffer1 is the active buffer (BUF1_ACTIVE=1). After
a RESET, 5 AO_SCK clock cycles are required to stabi-
lize the internal circuitry and before enabling Audio Out.
This
can
be
accomplished
by
programming
the
AO_FREQ and AO_SERIAL registers, and then waiting
for the appropriate interval.
The DSPCPU initiates transmission by providing two full
equal size buffers and putting their base address and
size in the BASEn and SIZE registers. Once two valid
buffers are assigned, transmission can be enabled by
writing a one to TRANS_ENABLE. The Audio Out unit
hardware now proceeds to empty buffer 1 by transmis-
sion of output samples. Once buffer 1 empties,
BUF1_EMPTY is asserted, and transmission continues
without interruption from buffer 2. If BUF1_INTEN is en-
abled, a SOURCE 12 interrupt request is generated.
Note that the buffers must be 64-byte aligned, and buffer
sizes must be a multiple of 64 samples (the six LSBs of
AO_BASE1, AO_BASE2 and AO_SIZE are zero).
The DSPCPU is required to assign a new, full buffer to
BASE1 and perform an ACK1, before buffer 2 empties.
Transmission continues from buffer 2, until it is empty. At
that time, BUF2_EMPTY is asserted, and transmission
continues from the new buffer 1, etc. Upon receipt of an
ACK, the Audio Out hardware removes the interrupt re-
quest line assertion at the next DSPCPU clock edge. Re-
fer to the interrupt controller documentation for details on
interrupt handler programming. The Audio Out interrupt
(SOURCE 12) should always be operated in level sensi-
tive mode.
9.10
HIGHWAY LATENCY AND HBE
The Audio Out unit uses an internal 64-byte buffer as
well as a 32-bit output holding register. Under normal op-
eration, the internal buffer gets refreshed from SDRAM
fast enough to avoid any missing samples, while data is
meanwhile being emitted from the holding register. If the
highway arbiter is set up with an insufficient latency guar-
Table 9-7. Audio Out MMIO DMA control elds
Field Name
Description
LITTLE_ENDIAN
0
big endian memory format (RESET
default)
1
little endian
BASE1
Base Address of buffer1. Must be a 64-
byte aligned address in local SDRAM.
RESET default 0.
BASE2
Base Address of buffer2. Must be a 64-
byte aligned address in local SDRAM.
RESET default 0.
SIZE
Number of samples to be read from a
buffer before switching to other buffer. In
stereo modes, a left/right pair of eight or
16-bit data counts as a single sample.
RESET default 0.
TRANS_MODE
00
mono, eight bits/sample. (RESET
default). Left data and Right data
are the same.
01
stereo, two times eight bits/sample
10
mono, 16 bits/sample. Left data
and Right data are the same.
11
stereo, two times 16 bits/sample
SIGN_CONVERT
0
leave MSB unchanged (RESET
default)
1
invert MSB
(not applied to codec control elds)
Table 9-8. Audio Out DMA Status Fields (Read Only)
Field Name
Description
BUF1_ACTIVE
If 1, buffer 1 will be used for the next sam-
ple to be transmitted.
If 0, buffer 2 will contain the next sample
(set to 1 after RESET).
BUF1_EMPTY
If 1, buffer 1 is empty.
If BUF1_INTEN is also 1, an interrupt
request (source 12) is asserted.
BUF1_EMPTY is cleared by writing a ‘1’
to ACK1, at which point the Audio Out
hardware will assume that BASE1 and
SIZE describe a new full buffer.
0 after RESET.
BUF2_EMPTY
If 1, buffer 2 is empty.
If BUF2_INTEN is also 1, an interrupt
request (source 12) is asserted.
BUF2_EMPTY is cleared by writing a ‘1’
to ACK2, at which point the Audio Out
hardware will assume that BASE2 and
SIZE describe a new full buffer.
0 after RESET.
HBE
Highway Bandwidth Error.
0 after RESET.
Indicates that no data was transmitted
due to inability to read the local Audio Out
buffer from SDRAM in time. This indicates
an insufcient allocation of TM1100 High-
way bandwidth for the audio sampling
rate/mode.
UNDERRUN
An UNDERRUN error has occurred, i.e.
the CPU failed to provide a full buffer in
time, and no samples were transmitted,
although requested by the D/A converter.
If UDR_INTEN is also 1, an interrupt
request (source 12) is pending. The
UNDERRUN ag can ONLY be cleared by
writing a ‘1’ to ACK_UDR. 0 after RESET.
Table 9-7. Audio Out MMIO DMA control elds
Field Name
Description