Philips Semiconductors
Audio In
File: ain.fm5, modified 7/24/99
PRELIMINARY INFORMATION
8-7
In normal operation, the DSPCPU and Audio In hard-
ware continuously exchange buffers without ever loosing
a sample. If the DSPCPU fails to provide a new buffer in
time, the OVERRUN error flag is raised. This flag is
not
affected by ACK1 or ACK2; it can only be cleared by an
explicit ACK_OVR.
8.9
HIGHWAY LATENCY AND HBE
Audio In uses internal buffering before writing data to
SDRAM. The internal buffer consists of a 1 stereo sam-
ple input holding register and 64 bytes of internal buffer
memory. Under normal operation, the 64-byte buffer gets
written to SDRAM while the input register is capable of
receiving one more sample. This normal operation is
guaranteed to be maintained as long as the highway ar-
biter is set to guarantee a latency for Audio In that match-
es the sampling interval. Given a sample rate
fs, and an
associated sample interval T (in nSec), the arbiter should
be set to have a latency of at most T-20 nSec. Refer to
ming. If the requested latency is not adequate, the HBE
(Highway Bandwidth Error) condition may result. This er-
ror flag gets set when the input register is full, the 64-byte
buffer has not yet been written to memory, and a new
sample arrives.
Table 8-7 shows the required arbiter latency settings for
a number of common operating modes. The rightmost
column in the table illustrates the nature of the resulting
64 byte highway requests. Is not required to compute ar-
biter settings, but may be used to compute bus availabil-
ity in a given interval.
8.10
ERROR BEHAVIOR
If either an OVERRUN or HBE error occurs, input sam-
pling is temporarily halted, and samples will be lost. In
case of OVERRUN, sampling resumes as soon as the
DSPCPU makes one or more new buffers available
through an ACK1 or ACK2 operation. In the case of HBE,
sampling will resume as soon as the internal buffer can
be written to SDRAM.
HBE and OVERRUN are ‘sticky’ error flags. They will re-
main set until an explicit ACK_HBE or ACK_OVR.
Table 8-7. Audio In Highway Arbiter Latency
Requirement examples
CapMode
fs
(kHz)
T
(nS)
max
arbiter
latency
(nSec)
access
pattern
stereo
16 bit/sample
44.1
22,676
22,656
1 request
every
362,812 nS
stereo
16 bit/sample
48.0
20,833
20,813
1 request
every
333,333 nS
stereo
16 bit/sample
96.0
10,417
10,397
1 request
every
166,667 nS
Table 8-8. Audio In MMIO Status Fields (Read Only)
Field Name
Description
BUF1_ACTIVE
If 1, buffer 1 is the buffer that will be used
for the next incoming sample. If 0, buffer 2
will receive the next sample.
1 after RESET.
BUF1_FULL
If 1, buffer 1 is full. If BUF1_INTEN is also
1, an interrupt request (source 11) is pend-
ing. BUF1_FUL is cleared by writing a ‘1’ to
ACK1, at which point the Audio In hard-
ware will assume that BASE1 and SIZE
describe a new empty buffer.
0 after RESET.
BUF2_FULL
If 1, buffer 2 is full. If BUF2_INTEN is also
1, an interrupt request (source 11) is pend-
ing. BUF2_FUL is cleared by writing a ‘1’ to
ACK2, at which point the Audio In hard-
ware will assume that BASE2 and SIZE
describe a new empty buffer.
0 after RESET.
HBE
Highway Bandwidth Error. This error condi-
tion is raised when the 64-byte internal
Audio In buffer is not yet written to SDRAM
when a new input sample arrives. This indi-
cates an insufcient allocation of TM1100
Highway bandwidth for the audio sampling
0 after RESET.
OVERRUN
An OVERRUN error has occurred, i.e. the
CPU failed to provide an empty buffer in
time, and 1 or more samples have been
lost. If OVR_INTEN is also 1, an interrupt
request (source 11) is pending. The
OVERRUN ag can ONLY be cleared by
writing a ‘1’ to ACK_OVR.
0 after RESET.
Table 8-9. Audio In MMIO Control Fields
Field Name
Description
RESET
The Audio In logic is reset by writing a
0x80000000 to AI_CTL. This bit always
DIAGMODE
0
normal operation (RESET default)
1
SLEEPLESS
0
participate in global power down
(RESET default)
1
refrain from participating in power down
CAP_ENABLE
Capture Enable ag. If 1, Audio In captures
samples and acts as DMA master to write
samples to local SDRAM. If 0 (RESET
default), Audio In is inactive.
BUF1_INTEN
Buffer 1 full Interrupt Enable. Default 0.
0
no interrupt
1
interrupt (SOURCE 11) if buffer 1 full
BUF2_INTEN
Buffer 2 full interrupt enable. Default 0
0
no interrupt
1
interrupt (SOURCE 11) if buffer 2 full