Specifications

ESS Technology, Inc. SAM0025A-062397 49
ES1879 DATA SHEET
PROGRAMMING THE ES1879
PRELIMINARY
For 16-bit data, the ES1879 expects DMA transfers to be
a multiple of 4, with repeating groups in the order:
1. Left low byte
2. Left high byte
3. Right low byte
4. Right high byte
ES1879 Data Formats (Extended Mode and Audio 2)
There are eight formats available from the combination of
the following three options:

Mono or stereo

8-bit or 16-bit

Signed or unsigned
For stereo data, the data stream always alternates
channels in successive samples: first left, then right. For
16-bit data, the low byte always precedes the high byte.
Sending Commands During DMA Operations
It is useful to understand the detailed operation of sending
a command during DMA.
The ES1879 uses the Audio 1 FIFO for DMA transfers to
and from the CODEC. When the FIFO is full (in the case
of DAC) or empty (in the case of ADC), DMA requests are
temporarily suspended and the Busy flag (bit 7 of port
Audio_Base+Ch) is cleared. This opens a window of
opportunity to send a command to the ES1879.
Commands such as D1h and D3h, which control the Audio
1 DAC mixer input enable/disable status, and command
D0h, which suspends or pauses DMA, are acceptable to
send during this window.
The ES1879 chip sets the Busy flag when the command
window is no longer open. Application software must send
a command within 13 microseconds after the Busy flag
goes high or the command will be confused with DMA
data. Sending a command within the command window is
easy if polling is done with interrupts disabled.
As an example of sending a command during DMA,
consider the case where the application wants to send
command D0h in the middle of a DMA transfer. The
application disables interrupts and polls the Busy flag.
Because of the FIFO and the rules used for determining
the command window, it is possible for the current DMA
transfer to complete while waiting for the Busy flag to clear.
In this event, the D0h command has no function, and a
pending interrupt request from the DMA completion is
generated.
The interrupt request can be cleared by reading port
Audio_Base+Eh before enabling interrupts or by having a
way of signaling the interrupt handler that DMA is inactive
so that it does not try to start a new DMA transfer.
Figure 17 shows timing considerations for sending a
command.
Figure 17 Command Transfer Timing
Busy Flag
Poll Busy
Write Command OK
Write Command NOT OK
13
µ
sec