CMI9738
CMI9738
AVss1
NC
NC
NC
NC
NC
LINE_OUT_R
Vrefout
1 24
2 SDATA_IN BIT_CLK 23
37
NC LINE_IN_R
24
3 SYNC SDATA_OUT 22
38 23
39 AVdd2 LINE_IN_L 22 4 RESET# XTL_OUT 21
40 REAR_OUT_L NC 21 5 AUX_IN_L XTL_IN 20
TEST0# MIC1
41
REAR_OUT_R
U2
CD_R
20
6 AUX_IN_R DVsdd 19
42 19
43 AVss2 CD_GND 18 7 CD_L Vss 18
44 NC CD_L 17 CD_GND TEST0#
45 NC NC 16
8 17
RESERVED NC 9 CD_R AVdd 16
46 CMI9738-LQFP-48 15
47 RESERVED AUX_IN_R 14 10 MIC1 LINE_OUT_R 15
48 NC AUX_IN_L 13 LINE_IN_L LINE_OUT_L
NC NC 11 14
SDATA_OUT
12 LINE_IN_R XADCHR 13
SDATA_IN
XTL_OUT
VREF_OUT XADCHL
BIT_CLK
RESET#
XTL_IN
DVdd1
DVdd2
DVss1
DVss2
SYNC
NC
10
11
12
1
2
3
4
5
6
7
8
9
1 24
2 23
3 22
4 21
5 20
6 19
7 18
8 17
9 16
10 15
11 14
12 13
The CMI9738 mixer is designed to the AC’97 specification to manage playback and record
of all digital and analog audio sources in the PC environment. These include
System audio digital PCM input and output for business, games, and multimedia
CD/DVD analog CD/DVD-ROM Redbook audio with internal connections to Codec mixer
Mono microphone choice of desktop or headset mic, with programmable boost and gain
Speakerphone use of system mic & speakers for telephony, DSVD, and video
conferencing
Stereo line in analog external line level source from consumer audio, video camera, etc
AUX/synth analog FM or wavetable synthesizer, or other internal source
4.1 AC-LINK
All digital audio streams, optional modem line Codec streams, and command/status information
are communicated over this AC-Link. A breakout of the signals connecting the two is shown in
Figure .
SYNC XTAL_IN
Digital BIT_CLK AC’97
DC’97 SDTA_OUT Codec
Controller SDATA_IN
XTAL_OUT
RESET#
4.2 CLOCKING
CMI9738 derives its clock internally from an externally connected 24.576 MHz crystal or an
oscillator through the XTAL_IN pin. Synchronization with the AC’97 controler is achieved
through the BIT_CLK pin at 12.288 MHz half of crystal frequency .
The beginning of all audio sample packets, or Audio Frames, transferred over AC-link is
synchronized to the rising edge of the “SYNC” signal. “SYNC” is driven by the AC ’97
Controller. Data is transitioned on AC-link on everyrising edge of BIT_CLK, and subsequently
sampled on the receiving side of AC-link on each immediately followingfalling edge of
BIT_CLK.
4.3 RESETTING
There are three types of reset as detailed under “Timing Characteristics”
1. a cold reset where all CMI9738 logic (registers included) is initialized to its default state
2. a warm reset where the contents of the CMI9738 register set are left unaltered
3. a register reset which only initializes the CMI9738 registers to their default states
After signaling a reset to the CMI9738, the AC’97 Controller should not attempt to play or
capture audio data until it has sampled a “Codec Ready” indication via register 26h from the
CMI9738.
Notice When the AC-link “Codec Ready” indicator bit (SDATA_IN slot 0, bit 15) is a 1 it
indicates that the AC-link and AC ‘97 control and status registers are in a fully
operational state.
C-MEDIA Electronics Inc.
6F, 100, Sec. 4, Civil Boulevard, Taipei, Taiwan, R.O.C. 106 Revision Date Apr./2002
TEL: 886-2-8773-1100 FAX: 886-2-8773-2211 E-mail:sales@cmedia.com.tw
Revision 1.1
CMI 9738
Integrated Multi-channel AC‘97
4.4 AC-LINK DIGITAL SERIAL INTERFACE PROTOCOL
The CMI9738 communicates to the AC'97 controller via a 5-pin digital serial AC-Link
interface,which is a bi-directional, fixed rate, serial PCM digital stream. All digital audio streams,
commandsand status information are communicated over this point-to-point serial interconnect.
The AC-Linkhandles multiple inputs, and output audio streams, as well as control register
accesses using a timedivision multiplexed (TDM) scheme. The AC'97 controller synchronizes all
AC-Link data transaction.The following data streams are available on the CMI9738
Synchronization of all AC-Link data transactions is handled by the AC'97 controller. The
CMI9738 drives the serial bit clock onto AC-Link. The AC'97 controller then qualifies with a
synchronization signal to construct audio frames.
SYNC, fixed at 48 kHz, is derived by dividing down the serial bit clock (BIT_CLK). BIT_CLK,
fixed at 12.288 MHz, provides the necessary clocking granularity to support 12, 20-bit outgoing
and incoming time slots. AC-Link serial data is transitioned on each rising edge of BIT_CLK. The
receiver of AC-Link data, CMI9738 for outgoing data and AC'97 controller for incoming data,
samples each serial bit on the falling edges of BIT_CLK.
The AC-Link protocol provides for a special 16-bit (13-bits defined, with 3 reserved trailing bit
positions) time slot (Slot 0) wherein each bit conveys a valid tag for its corresponding time slot
within the current audio frame. A “1” in a given bit position of slot 0 indicates that the
corresponding time slot within the current audio frame has been assigned to a data stream, and
contains valid data. If a slot is “tagged” invalid, it is the responsibility of the source of the data
(CMI9738 for the input stream, AC'97 controller for the output stream) to stuff all bit positions
with 0’s during that slot’sactive time.
Additionally, for power savings, all clock, sync, and data signals can be halted.
Within slot 0 the first bit is a global bit (SDATA_IN slot 0, bit 15) which flags whether CMI9738
is in the “CodecReady” state or not. If the “Codec Ready” bit is a 0, this indicates thatCMI9738 is
not ready for normal operation. This condition is normal following the deassertion of power on
reset for example, while CMI9738’s voltage references settle. When the AC-link “Codec Ready”
indicator bit is a 1 it indicates that the AC-link and CMI9738 control and status registers are in a
fully operational state. The AC ‘97 Controller must further probe the Powerdown Control/Status
Register (section 6.3) to determine exactly which subsections, if any, are ready.
Prior to any attempts at putting CMI9738 into operation the AC ’97 Controller should poll the
first bit in the audio input frame (SDATA_IN slot 0, bit 15) for an indication that CMI9738 has
gone “Codec Ready”. Once CMI9738 is sampled “Codec Ready”8 then the next 12 bit positions
sampled by the AC ’97 Controller indicate which of the corresponding 12 time slots are assigned
to input data streams, and that they contain valid data. The following diagram illustrates the time
slot-based AC-link protocol.
SDATA_IN's composite stream is MSB justified (MSB first) with all non-valid bit positions (for
assigned and/or unassigned time slots) stuffed with 0's by CMI9738. SDATA_IN data is sampled
on the falling edges of BIT_CLK.
Slot 1: Status Address Port
The status port is used to monitor status for CMI9738 functions including, but not limited to,
mixer settings and power management (refer to section 6.3 of this specification).
Audio input frame slot 1’s stream echoes the control register index, for historical reference, for the
data to be returned in slot 2. (Assuming that slots 1 and 2 had been tagged “valid” by CMI9738
during slot 0.)
Status Address Port bit assignments:
Bit 19 RESERVED (Stuffed with 0)
Bit 18 12 Control Register Index (Echo of register index for which data is being returned)
Bit 11 0 RESERVED (Stuffed with 0’s)
The first bit (MSB) generated by CMI9738 is always stuffed with a 0. The following 7 bit
positions communicate the associated control register address, and the trailing 12 bit positions are
stuffed with 0's by CMI9738.
Slot 2: Status Data Port
The status data port delivers 16-bit control register read data.
Bit 19 4 Control Register Read Data (Stuffed with 0’s if tagged “invalid”)
Bit 3 0 RESERVED (Stuffed with 0’s)
If Slot 2 is tagged invalid by CMI9738, then the entire slot will be stuffed with 0’s.
Slot 3: PCM Record Left Channel
Audio input frame slot 3 is the left channel output of CMI9738 input MUX, post-ADC.
CMI9738 ADCs are implemented to support 18-bit resolution.
CMI9738 outputs its ADC data (MSB first), and stuffs any trailing non-valid bit positions
with 0's to fill out its 20-bit time slot.
Slot 4: PCM Record Right Channel
Audio input frame slot 4 is the right channel output of CMI9738 input MUX, post-ADC.
CMI9738 outputs its ADC data (MSB first), and stuffs any trailing non-valid bit positions
with 0's to fill out its 20-bit time slot.
Slot 5: Optional Modem Line 1 ADC
Audio input frame slots 5-12 are not used by the CMI9738 and are always stuffed with 0's.
Within slot 0, the first bit is a global bit (SDATA_OUT slot 0, bit 15) which flags the validity for
the entire audio frame. If the “Valid Frame” bit is a 1, this indicates that the current audio frame
contains at least one slot time of valid data. The next 12 bit positions sampled by the CMI9738
indicate which of the corresponding 12 times slots contain valid data. In this way data streams of
differing sample rates can be transmitted across AC-Link at its fixed 48kHz audio frame rate. The
following diagram illustrates the time slot based AC-Link protocol.
SDATA_OUT’s composite stream is MSB justified (MSB first) with all non-valid slots’ bit
positions AC'97 controller. When mono audio sample streams are sent from the AC'97 controller
it is necessary that BOTH left and right sample stream time slots be filled with the same data.
Slot 1: Command Address Port
The command port is used to control features, and monitor status (see Audio Input Frame Slots 1
and 2) of the CMI9738 functions including, but not limited to, mixer settings, and power
management (refer to the control register section of this specification).
The control interface architecture supports up to 64 16-bit read/write registers, addressable on
even byte boundaries. Only the even registers (00h, 02h, etc.) are valid.
Audio output frame slot 1 communicates control register address, and write/read command
information to the CMI9738.
Command Address Port bit assignments
Bit 19 4 Control Register Write Data (Stuffed with 0's if current operation is a read)
Bit 3 0 Reserved (Stuffed with 0's)
If the current command port operation is a read then the entire slot time must be stuffed with 0's
by the AC'97 controller.
Slot 3: PCM Playback Left Channel
Games Compatible" PC this slot is composed of standard PCM (.wav) output samples digitally
mixed (by the AC'97 controller or host processor) with music synthesis output samples. If a
sample stream of resolution less than 20-bits is transferred, the AC'97 controller must stuff all
trailing non-valid bit positions within this time slot with 0's.
Slot 4: PCM Playback Right Channel
Audio output frame slot 4 is the composite digital audio right playback stream. In a typical
Games Compatible" PC this slot is composed of standard PCM (.wav) output samples digitally
mixed (by the AC'97 controller or host processor) with music synthesis output samples. If a
sample stream of resolution less than 20-bits is transferred, the AC'97 controller must stuff all
trailing non-valid bit positions within this time slot with 0's.
Slot 5: Reserved
Audio output frame slot 5 is reserved for modem operation and is not used by the CMI9738.
Slot 6: PCM Center Channel
Audio output frame slot 6 is not used by the CMI9738.
Slot 7: PCM Left Surround Channel
Slot 7 carries PCM left surround data in 4 channel wave output.
Slot 8: PCM Right Surround Channel
Slot 8 carries PCM right surround data in 4 channel wave output.
Slot 9: PCM Low Frequency Channel
Audio output frame slot 9 is not used by the CMI9738.
Slot 10: PCM Alternate Left
Audio output frame slot 10 is not used by the CMI9738.
Slot 11: PCM Alternate Right
Audio output frame slot 11 is not used by the CMI9738.
Slot 12: Reserved
C-MEDIA Electronics Inc.
6F, 100, Sec. 4, Civil Boulevard, Taipei, Taiwan, R.O.C. 106 Revision Date Apr./2002
TEL: 886-2-8773-1100 FAX: 886-2-8773-2211 E-mail:sales@cmedia.com.tw
Revision 1.1
CMI 9738
Integrated Multi-channel AC‘97
Audio output frame slot 12 is reserved for modem operations and is not used by the CMI9738.
BIT_CLK and SDATA_IN are transitioned low immediately (within the maximum specified time)
following the decode of the write to the Powerdown Register (26h) with PR4. When the AC'97
controller driver is at the point where it is ready to program the AC-Link into its low power mode,
slots (1 and 2) are assumed to be the only valid stream in the audio output frame (all sources of
audio input have been neutralized).
The AC'97 controller should also drive SYNC and SDATA_OUT low after programming the
CMI9738 to this low power mode.
Once the CMI9738 has halted BIT_CLK, there are only two ways to “wake up” the AC-Link.
Both methods must be activated by the AC'97 controller. The AC-Link protocol provides for a
“Cold AC'97 Reset”, and a “Warm AC'97 Reset”. The current power down state would ultimately
dictate which form of reset is appropriate. Unless a “cold” or “register” reset (a write to the Reset
register) is performed, wherein the AC'97 registers are initialized to their default values, registers
are required to keep state during all power down modes. Once powered down, re-activation of the
AC-Link via re- assertion of the SYNC signal must not occur for a minimum of 4 audio frame
times following the frame in which the power down was triggered. When AC-Link powers up it
indicates readiness via the Codec Ready bit (input slot 0, bit 15).
Cold AC ‘97 Reset Î a cold reset is achieved by asserting RESET# for the minimum specified
time. By driving RESET# low, BIT_CLK, and SDATA_IN will be
activated, or re-activated as the case may be, and all CMI9738 control
registers will be initialized to their default power on reset values.
Note: RESET# is an asynchronous input. # denotes active low
Warm AC’97 Reset Îa warm reset will re-activate the AC-Link without altering the current
CMI9738 register values. A warm reset is signaled by driving SYNC high
for a minimum of 1us in the absence of BIT_CLK.
Note: Within normal audio frames, SYNC is a synchronous input. However, in the absence of
BIT_CLK, SYNC is treated as an asynchronous input used in the generation of a warm reset
to the CMI9738.
System audio digital PCM input and output for business, games, and multimedia
CD/DVD analog CD/DVD-ROM Redbook audio with internal connections to Codec mixer
Mono microphone choice of desktop or headset mic, with programmable boost and gain
Speakerphone use of system mic & speakers for telephony, DSVD, and video conferencing
Stereo line in analog external line level source from consumer audio, video camera, etc
02h Master Volume Mute X X ML4 ML3 ML2 ML1 ML0 X X X MR4 MR3 MR2 MR1 MR0 0000h
Surround Mixer
04h Mute X X ML4 ML3 ML2 ML1 ML0 X X X MR4 MR3 MR2 MR1 MR0 8000h
Volume
0Eh Mic Volume Mute X X X X X X X X 20dB X X GN3 GN2 GN1 GN0 8008h
10h LineIn Volume Mute X X X GL3 GL2 GL1 GL0 X X X X GR3 GR2 GR1 GR0 8808h
12h CD Volume Mute X X X GL3 GL2 GL1 GL0 X X X X GR3 GR2 GR1 GR0 8808h
16h Aux Volume Mute X X X GL3 GL2 GL1 GL0 X X X X GR3 GR2 GR1 GR0 8808h
18h PCM Out Vol Mute X X X GL3 GL2 GL1 GL0 X X X X GR3 GR2 GR1 GR0 8808h
1Ah Record Select X X X X X SL2 SL1 SL0 X X X X X SR2 SR1 SR0 0000h
1Ch Record Gain Mute X X X GL3 GL2 GL1 GL0 X X X X GR3 GR2 GR1 GR0 8000h
Powerdown
26h X PR6 PR5 PR4 PR3 PR2 PR1 PR0 X X X X REF ANL DAC ADC 000Xh
Ctrl/Stat
Extended Audio SDA
28h ID1 ID0 X X X X X X X X X X X X X 0080h
ID C
Ext’d audio SDA
2Ah X X X PRJ X X X X X X X X X X X 1000h
Stat/Ctrl C
4CH Vol:L,R Surr RSR RSR RSR RSR RSR
38h Mute X X LSR4 LSR3 LSR2 LSR1 LSR0 Mute X X 8080h
4 3 2 1 0
Vendor defined S2LN
5Ah X X F2R X X X X X X X X X X X X 0000h
Control I
7Eh Vendor ID2 T7 T6 T5 T4 T3 T2 T1 T0 REV7 REV6 REV5 REV4 REV3 REV2 REV1 REV0 4941h
00h Reset X SE4 SE3 SE2 SE1 SE0 ID9 ID8 ID7 ID6 ID5 ID4 ID3 ID2 ID1 ID0 0000h
Mut ML ML ML ML ML MR MR MR MR MR
02h Master Volume X X X X X 0000h
e 4 3 2 1 0 4 3 2 1 0
Surround Mut
04h X X X X X X X X X X X X X X1 X 8000h
Mixer Volume e
Each step corresponds to 1.5 dB. The MSB of the register is the mute bit. When this bit is set to 1
the level for that channel is set at ∞ dB.
Support for the MSB of the level is optional. If the MSB is not supported then AC ‘97 needs to
detect when that bit is set and set all four LSBs to 1s. Example: If AC ‘97 only supports 5 bits of
resolution in its mixer and the driver writes a 1xxxxx AC ‘97 must interpret that as x11111. It will
also respond when read with x11111 rather
then 1xxxxx, the value writen to it. The driver can use this feature to detect if support for the 6th
bit is there or not. The 02h default value is 0000h (0000 0000 0000 0000) , which corresponds to
+12 dB gain with mute off.
Mute Mx5...Mx0 Function
0 000000 +12 dB gain
0 001000 0 dB Attenuation
0 011110 33.0dB Attenuation
0 011111 46.5dB Attenuation
0 111111 46.5dB Attenuation
1 xxxxxx ∞ dB Attenuation
0Eh Mic Volume Mute X X X RM3 RM2 RM1 RM0 X 20dB X X GN3 GN2 GN1 GN0 8008h
LineIn
10h Mute X X X GL3 GL2 GL1 GL0 X X X X GR3 GR2 GR1 GR0 8808h
Volume
12h CD Volume Mute X X X GL3 GL2 GL1 GL0 X X X X GR3 GR2 GR1 GR0 8808h
16h Aux Volume Mute X X X GL3 GL2 GL1 GL0 X X X X GR3 GR2 GR1 GR0 8808h
PCM Out
18h Mute X X X GL3 GL2 GL1 GL0 X X X X GR3 GR2 GR1 GR0 8808h
Vol
The MSB of the register is the mute bit. When this bit is set to 1 the level for that channel is set at
∞ dB.
Register 0Eh (Mic Volume Register) has an extra bit that is for a 20 dB boost. When bit 6 is set to 1
the 20 dB boost is on. The default value is 8008, which corresponds to 0 dB gain with mute on.
Mute Mx3...Mx0 Function
0 0000 0 dB Attenuation
1Ah Record Select X X X X X SL2 SL1 SL0 X X X X X SR2 SR1 SR0 0000h
The default value is 0000h, which corresponds to Mic in.
SR2...SR0 Right Record Source SL2...SL0 Left Record Source
0 Mic 0 Mic
1 CD In (R) 1 CD In (L)
2 N/A 2 N/A
3 Aux In (R) 3 Aux In (L)
4 Line In (R) 4 Line In (L)
5 Stereo Mix (R) 5 Stereo Mix (L)
7 N/A 7 N/A
1Ch Record Gain Mute X X X GL3 GL2 GL1 GL0 X X X X GR3 GR2 GR1 GR0 8000h
Each step corresponds to 1.5 dB. 22.5dB corresponds to 0F0Fh and 000Fh respectively. The MSB
of the register is the mute bit. When this bit is set to 1 the level for that channel(s) is set at ∞ dB.
Bit Function
LPBK ADC/DAC loopback mode
This read/write register is used to program powerdown states and monitor subsystem readiness.
The lower half of this register is read only status, a 1 indicating that the subsection is “ready”.
Ready is defined as the subsection able to perform in its nominal state. When this register is written
the bit values that come in on AC-link will have no effect on read only bits 0-7.
When the AC-link “Codec Ready” indicator bit (SDATA_IN slot 0, bit 15) is a 1 it indicates that the
AC-link and AC ‘97 control and status registers are in a fully operational state. The AC ‘97
Controller must further probe this Powerdown Control/Status Register to determine exactly which
subsections, if any, are ready.
Bit Function
X Reserved
REF Vref’s up to nominal level
ANL Analog mixers, etc. ready
DAC DAC section ready to accept data
ADC ADC section ready to transmit data
These bits are pseudo. Default are ready and controlled by PRX.
Bit Function
PR0 PCM in ADC’s & Input Mux Powerdown
PR1 PCM out DACs Powerdown
PR2 Analog Mixer powerdown (Vref still on)
SDAC=1 indicates optional PCM Surround DAC is supported D15,D14:ID1,ID0 is always “00”.
These read/write registers control the output volume of the optional four PCM channels, and values
written to the fields behave the same as the Play Master Volume Register (Index 02h), which offers
attenuation but no gain. There is an independent mute (1=on) for each channel.
The default value after cold or warm register reset for this register (8080h) corresponds to 0 dB
attenuation with mute on.
When 2/4 CH, these registers are still visible and controllable.
The all bits of the reg38h are pseudo.
1 24
2 23
3 22
4 21
5 20
6 19
7 18
8 17
9 16
10 15
11 14
12 13
Table 9. Clocks
Parameter Symbol Min Typ Max Units
BIT_CLK frequency - 12.288 - MHz
BIT_CLK period Tclk_period - 81.4 - ns
BIT_CLK output jitter - - 750 ps
BLT_CLK high pulsewidth (note 1) Tclk_high 36 40.7 45 ns
BIT_CLK low pulse width (note 1) Tclk_low 36 40.7 45 ns
SYNC frequency - 48.0 - kHz
SYNC period Tsync_period - 20.8 - us
SYNC high pulse width Tsync_high - 1.3 - us
SYNC low_pulse width Tsync_low - 19.5 - us
Notes: 1) Worst case duty cycle restricted to 45/55.
Notes