46
1 PC Peripherals PC Peripherals for Technicians for Technicians Chapter 4 Chapter 4 Digital Audio Digital Audio Systems Manufacturing Systems Manufacturing Training and Employee Training and Employee Development Development Copyright © 1998 Intel Copyright © 1998 Intel Corp. Corp.

1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

  • View
    222

  • Download
    2

Embed Size (px)

Citation preview

Page 1: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

1

PC PeripheralsPC Peripherals for for TechniciansTechnicians

Chapter 4Chapter 4Digital AudioDigital Audio

Systems Manufacturing Training Systems Manufacturing Training and Employee Developmentand Employee Development

Copyright © 1998 Intel Corp.Copyright © 1998 Intel Corp.

Page 2: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

2

Digital AudioDigital Audio

OBJECTIVES: At the end of this section, the student will be able to do the following:

Describe the fundamental components of a Digital Audio subsystem and PC Audio standards.

Discuss A/D, D/A, & sampling parameters. Explain the basic functions of an Audio Adapter.

CODECs, MIDI, FM synthesis & Wavetables, and the game port.

Describe an example Audio Sub-system block diagram and the Audio specific external signals.

Discuss audio testing and troubleshooting.

Page 3: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

3

Trademark notice Many of the designations used by manufactures and

sellers to distinguish their products are claimed as trademarks.The following are trademarks of their respective

companies.» IBM, IBM PC, PC/XT, PC/AT - IBM

» MS-DOS and Windows Sound System - Microsoft

» Sound Blaster - Creative Labs

» MPU-401 - Roland Corporation

» OPL - Yamaha

All other product names not listed here but mentioned in this material may be trademarks and/or registered trademarks of their respective companies.

Page 4: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

4

Audio Subsystem OverviewAudio Subsystem Overview The frequency span of the human ear response is

traditionally assigned from 20 Hz to 20 KHzThe human ear is the most sensitive around 1 KHz.

Before digital computers can process audio, the analog signal must be converted into a digital signal.By stringing together a series of bytes that each

represent a different voltage level, the waveform of a sound is emulated.

Both Analog to Digital and Digital to Analog converters are used to change the signals to and from a format that can be manipulated.

» A device containing both Analog to Digital and Digital to Analog converters is known as a CODEC.

Page 5: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

5

Audio Subsystem OverviewAudio Subsystem Overview Most Audio Adapters contain the following:

The “Digital Audio” section (CODEC) to play & record sounds (often stored in WAVE files on the PC).

The FM Synthesis and Wavetable section to electronically generate sounds.

A Musical Instrument Digital Interface port to play scores on a synthesizer and to provide for external MIDI in/out.

A game port for reading the status of the joystick buttons and the position of the joystick axis.

An analog mixer to mix signals from different sources and provide software volume control.

An analog Power Amplifier to drive headphones/speaker.A CD Interface that is typically not used in PCs.

Page 6: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

6

Audio Subsystem OverviewAudio Subsystem Overview*JOYSTICK

PORT

*CODEC,A/D, D/A

CDINTERFACE

POWERAMP

BUSINTERFACE

CHIP

RECORD & PLAYBACK

MIXERCHIP

ISABUS

SPKR

CD-ROM DRIVE

*MIDI PORT

*FMSYNTHESIZER

SOUND DATA

CONTROL

CONTROL

CONTROL

COMMAND/DATA

CD IN(Stereo)

LINE IN(Stereo)

PC-SPKR(Mono)

LINE-OUT(Stereo)

MUSIC SYNTH.

MIC IN(Mono)

AGC

*OPTIONALWAVETABLE

*Note: These sections will be covered in some detail later

in this chapter.

Page 7: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

7

Audio Subsystem Overview - HistoryAudio Subsystem Overview - History » PC Speaker - 1981

> PIT Timer 2 output generates a square wave of a given frequency--low quality sound with a lot of CPU overhead.

» Adlib - 1987> First sound card: 8-bit CODEC; Yamaha OPL FM Synthesizer.

» Sound Blaster - 1989> Adlib compatible; 8-bit; Play only; FM Synth; MIDI interface.> SB Pro, SB16, AWE32, AWE64 developed later.> SB Pro (Stereo 1992) - de facto standard for DOS games.

» WSS (Windows Sound System) - 1992> 16-bit; Play & Record; FM Synth; MIDI.

» Note: MPC, MPC2, MPC3 denote Minimum Multimedia PC system hardware requirements

> MPC2 is similar to WSS standard.> MPC3 requires a Pentium and a 4x CD-ROM.

Page 8: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

8

PC Audio StandardsPC Audio Standards

Sound Blaster Most PC audio applications and games have been

developed to use the Sound Blaster (manufactured by Creative Labs) as the audio "device" within the PC.In the same way the IBM AT defined compatibility in the

PC space, the Sound Blaster defines compatibility in the sound card space.

» The Sound Blaster "standard" includes the specification of a certain set of programmable registers.

Sound Blaster compatibility has become the de facto standard for PC audio applications.

» A de facto standard has not been approved by a standards organization but is widely used and recognized by the industry as being standard.

Page 9: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

9

PC Audio StandardsPC Audio Standards

Windows Sound System (WSS) WSS is a 16-bit board which provides 44.1kHz stereo

record/play with FM synthesis for DOS game support in a DOS window

WSS added new features to the audio applications in Windows 3.1 and integrated a collection of Windows sound handling utilities. The features includes:

» Voice Pilot - Limited voice recognition allows substitution of voice input for some keyboard input.

» The ProofReader feature reads aloud the numbers in spreadsheets so that numbers can be verified without the aid of another person.

Page 10: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

10

PC Audio StandardsPC Audio Standards

The WAVE file specification

The native digital audio format for storing sound in files developed jointly by Microsoft and IBM.

» Support for WAV files was built into Windows 95 making it the de facto standard for sound on PCs.

A file is created while the digital audio is being recorded and is stored on the Hard Drive (e.g.-startup.wav)

» Files storing digitally sampled audio tend to be large.> Wave files use up 10 MEG of HD space for every minute of a

16-bit stereo digital audio track recorded at 44.1Khz.

» The WAVE file specification has a format section (sample rate & width, stereo, etc.) followed by the data section

> The WAVE specification also supports a number of different compression algorithms (e.g. ADPCM, A-law, mu-law).

Page 11: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

11

A/D and D/A Conversion The basic sound generation operation (play) is to

convert the value represented by bytes into a voltage. A Digital to Analog Converter (DAC or D/A) converts

numeric values to an analog voltage which can drive a loudspeaker.

The basic sound recording operation (record/capture) is to convert a voltage level into a byte value.An Analog to Digital Converter (ADC or A/D) converts

voltages corresponding to analog sound waves into digital values which can be stored in memory.

The process of A/D conversion is known as sampling.

Page 12: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

12

Analog-to-Digital Conversion An ADC maps a continuously

changing analog signal into discrete steps which are each represented by a digital code. The signal can then be stored in

digital form.

The process of A/D conversion is known as sampling. "sample" refers to a single output

value from an ADC.A motion picture is a good

example of sampling--the seemingly continuous motion is made up of a series of discrete-time images.

Dig

ital

Out

put

Cod

e (B

inar

y)

111

110

101

100

011

010

001

000

-F.S. +F.S.0

Analog Input (Volts)

3-bit ADC

ADC 010 011 100

Analog-to-Digital(Record/Capture)

Page 13: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

13

Digital-to-Analog Conversion

A Digital-to-Analog converter generates an analog signal which is representative of a digital word.

A DAC converts a series of multi-bit digital words to an “equivalent” analog representation of the signal. The width of each “step” in the staircase waveform is defined by the

sample period and the amplitude defined by the digital word.

TIME

6

5

4

3

2

1

-1

-2

-3

-4

-5

-6

AM

PL

ITU

DE

6

5

4

3

2

1

-1

-2

-3

-4

-5

-6

AM

PL

ITU

DE

TIME

DACAnalog

FilterAnalogOutput

DigitalAudioData

Digital-to-Analog(Play)

Page 14: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

14

A/D and D/A Conversion - Sampling Sampling parameters affect the quality of the sound

which can be reproduced from the recorded signal.Sound cards commonly use an 8 or 16 bit sample size

at sampling rates from 4K to 44K samples per second.

Sample size is the number of bits per sample (8 or 16) The larger the size of the sample (which is also known as

resolution or precision), the more granular the scale and the more accurate the digital sampling.

» 8-bit resolution is adequate for speech and simple sounds.

» 16-bit samples are used for complex audio, such as music.

The Sampling rate is the number of samples made per unit of time and limits the highest frequency than can be stored (e.g. samples per second: 44.1 KHz)

Page 15: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

15

A/D and D/A Conversion - SamplingThe Nyquist theorem shows that the highest frequency

that can be stored in a sampled signal is at most 1/2 of the sampling frequency.

» The higher the sample rate, the closer they are represented in digital form and the better the quality (and the more disk space is consumed).

Some common sampling rates are:» 8000: A telephony standard

> Twice the 4KHz required for full spectrum of the human voice.

» 44100: The CD sampling rate. > Audio CD's are sampled at 44.1KHz for hi-fi playback; slightly

more than double the 20KHz frequency a person can hear.

» Note that sampling rates are always measured per channel, so for stereo data recorded at 8000 samples/sec, there are actually 16000 samples in a second.

Page 16: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

16

Audio AdapterAudio Adapter FunctionsFunctions*JOYSTICK

PORT

*CODEC,A/D, D/A

(Linear, A-law, mu-law, ADPCM)

CDINTERFACE

POWERAMP

BUSINTERFACE

CHIP

RECORD & PLAYBACK

MIXERCHIP

ISABUS

SPKR

CD-ROM DRIVE

*MIDI PORT

*FMSYNTHESIZER

SOUND DATA

CONTROL

CONTROL

CONTROL

COMMAND/DATA

CD IN(Stereo)

LINE IN(Stereo)

PC-SPKR(Mono)

LINE-OUT(Stereo)

MUSIC SYNTH.

MIC IN(Mono)

AGC

*OPTIONALWAVETABLE

*Note: These sections will now be covered in more detail.

Page 17: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

17

Audio AdapterAudio Adapter FunctionsFunctions There are two basic audio functions that most PC

audio applications rely upon a Sound Card to provide. » The “Digital Audio” section and the Synthesizer section.

The “digital audio” section uses the CODEC to play & record sounds (often stored in WAVE files on the PC).

> Note: A CODEC is sometimes called a DSP (Digital Signal Processor), but the Sound Blaster DSP chip is very limited when compared to "true" DSP chips. 

FM Synthesis & sampling from a Wavetable are two ways to synthesize (electronically generate) sounds.

» FM Synthesis allows not only emulating traditional sounds, but also generating completely new sounds.

» Wavetable Synthesis replaces FM synthesis with authentic sounds that are derived from the actual source.

Page 18: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

18

Audio Adapter Functions - CODEC A Coder & Decoder packaged together are a CODEC.

An A/D converter that produces binary codes from analog input signals is called a CODer.

The D/A converter that converts a digital input signal to an analog signal is called a DECoder.

Common functions of the CODEC are:Stereo Analog-to-Digital & Digital-to-Analog conversion.Real-time compression/decompression.Interpreting Sound Blaster, WSS, & MIDI commands.

The “Digital Audio” section of an Audio Adapter uses the Codec for playing back voice & sound effects, and also for recording "digital audio tracks".

Page 19: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

19

Audio Adapter Functions - CODEC The A/D converters used in CODECS are often non-

linear and compress the signal (typically 4:1 or less). PCM and ADPCM are common compression algorithms.

» PCM (Pulse Code Modulation) is a technique for converting analog signals into digital form.

» Mu-law or u-Law (America) and A-law (Europe) are common non-linear, compressed (8-bit) PCM formats.

» Adaptive Differential PCM produces a lower bit rate (4-bits) by recording only the difference between adjacent samples.

> A type of lossy compression used when the reconstructed signal does not have to be identical to the original signal.

The D/A in the CODEC is nonlinear in the reverse manner and “expands” the signal to produce a representation of the original waveform.

Page 20: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

20

Audio Adapter Functions - CODEC The “Digital Audio” PLAY process that occurs is:

The program sends commands & digitized samples (e.g. wave files) to the registers on the Sound Card.

» Digital Audio data is often stored in Windows' WAV files, which store complete pictures of audio waveforms.

The Sound Card recognizes the commands and sends the samples to a DAC for actual playback.

» If the samples are ADPCM encoded audio, the CODEC "decompresses" the sample and sends it to the DAC.

RECORD function works in the reverse of playback.While the analog audio is being recorded, the ADC

creates digital values representing the audio--the longer the recording, the more digital values are created.

Page 21: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

21

Audio Adapter Functions - MIDI Musical Instrument Digital Interface

MIDI (“middy”) is a music-industry hardware & software protocol for the interchange of information between musical instruments, synthesizers and computers.

Audio adapter cards play MIDI scores on a synthesizer and have an interface for external MIDI in/out.

An advantage of generating sound with MIDI rather than using sampled audio (*.wav) is storage space.A wave file consumes more than 10MB of disk space per

minute versus ~10KB for an equivalent MIDI file.Since digital audio takes up a lot more disk space than

MIDI data, game software typically uses MIDI to play the background (instrumental) music.

Page 22: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

22

Audio Adapter Functions - MIDI A MIDI file does NOT contain sampled audio data, but

only the instructions to play the sounds.MIDI information tells a synthesizer which notes to play,

on what instruments, and when to start and stop playing a note (MIDI is to music, what text is to speech).

» Pitch, length, volume & optionally additional characteristics such as attack & decay.

The events sent over a MIDI bus can also be stored as MIDI files for later editing and playback.“Media Player" software can play MIDI sound files.Creating & modifying MIDI files requires a software

application called a MIDI sequencer that allows for the composition, editing and playback of MIDI data.

Page 23: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

23

Audio Adapter Functions - MIDI Sound Cards also contain a MIDI Interface with the

external MIDI in/out signals wired to the joystick port.The external MIDI interface converts parallel data from

the PC data bus into serial MIDI data and vice versa.» The MIDI data is a unidirectional asynchronous bit stream at

31.25 Kbits/sec (a start bit, 8 data bits, and 1 stop bit).

» MIDI cables carry commands, not audio signals.

Note: It is not very common to have a device connected to the IN port of a computer MIDI interface.

MPU-401 is the MIDI standard from Roland Corporation that has become the de facto interface for connecting a personal computer to a MIDI device.

Page 24: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

24

Audio Adapter Functions - FM Synthesis PC audio applications also rely upon a Sound Card to

provide the Synthesizer function. The traditional & most predominant form of sound card

music synthesis is Frequency Modulation (FM). FM Synthesis allows not only emulating traditional

sounds, but also generating completely new sounds. FM Synthesis was used by the first sound boards (e.g.

AdLib & Sound Blaster) and early computer games that were written before wavetable synthesizers appeared.

» FM is an integral part of Sound Blaster compatibility

On most Sound Blaster compatible cards, FM synthesis is accomplished with a Yamaha OPL(x) synthesizer chip.

» The OPL3 has become the de facto standard.

Page 25: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

25

Audio Adapter Functions - FM Synthesis FM synthesis produces music from MIDI files played

by manipulating various oscillators to roughly emulate the sounds of instruments.Applications specify how a wave form is to be modulated

to create a specific sound by writing FM parameters directly to hardware registers (e.g. 388h-38Bh).

FM synthesis involves modulating a sine wave with other sine waves to create a more complex wave form.

» Each FM voice requires a minimum of 2 signal generators.

» The more operators, the more satisfactory the synthesis. > Note: SB32 and similar cards have 32 voices not 32 bits.

FM synthesized sound has an electronic quality without any of the complex harmonics of natural instruments.

Page 26: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

26

Audio Adapter Functions - Wave Table Wavetable Synthesis replaces FM synthesis with

authentic sounds derived from the actual source.Wavetable is supported by new game software.

Wave-table synthesis uses digitally sampled sounds of real instruments stored in ROM. The sample memory contains sampled sound segments,

and can be thought of as a "table" of sound waveforms which may be looked up and utilized when needed.

Wavetable systems employ techniques to reduce the memory needed to store the sound samples and produce more types of sounds from a given amount of memory.

» Stores only a short segment of the attack & sustain sections of waveform, and then loops this segment during playback.

Page 27: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

27

Audio Adapter Functions - Wave TableWave-table synthesis plays the sample when instructed

by a program, which also contains the information for changes in duration, pitch, etc.

» e.g. - Stored “D” note sample for a particular instrument is changed to flat or sharp.

Wave Table requires extra hardware and a 1-4 MB ROM to store the actual samples of instruments.

Some boards also contain DRAM (typically <32 Mbyte) » Allows you to replace a factory supplied sample with one of

your own--RAM can also be used for echo & reverb effects.

Wavetable is often an option due to the extra cost.» Some boards include a connector for a daughter card,

which allows upgrade to wavetable abilities (e.g. Creative Labs Wave Blaster card).

Page 28: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

28

Audio Adapter Functions - Game PortThe connections on the DB15S connector are as follows:

Pin Used for Notes (Joystick typically at Port 200 or 201) 1 Plus 5 Volt 2 Joystick 1 Bit 4 - Button A 3 Joystick 1 Bit 0 - X coordinate 4 Ground 5 Ground 6 Joystick 1 Bit 1 - Y coordinate 7 Joystick 1 Bit 5 - Button B 8 Plus 5 Volt 9 Plus 5 Volt 10 Joystick 2 Bit 6 - Button A 11 Joystick 2 Bit 2 - X coordinate 12 Midi out or ground (MIDI is connected to unused pins ) 13 Joystick 2 Bit 3 - Y coordinate 14 Joystick 2 Bit 7 - Button B 15 Midi in or Plus 5 Volt (MIDI is connected to unused pins )

Page 29: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

29

Audio Adapter Functions - Game Port A Game Port supports 2 Joysticks & a MIDI interface.

The game port is used for reading the status of the joystick buttons and the position of the joystick axis.

» Joystick buttons status is determined by reading appropriate bit (7-4) at the joystick port (0=the button is pressed).

The shaft of the joystick is attached to 2 potentiometers (X and Y coordinates).

» The game port adapter connects the potentiometers to 555 timers that have outputs read at Port 200 (bits 3-0).

> Reads from Port 200 are immediately preceded by a write of any data to Port 200 which starts the timers.

» The position of the joystick axis is read by tracking the time that it takes for an X or Y bit to change logic levels.

> BIOS INT 15H Function 84H provides these services.

Page 30: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

30

Audio Subsystem - Interface Before any accesses to CS4232 by the host computer,

the internal registers of the CS4232 must be programmed via a PnP configuration sequence.

Plug And Play is a mechanism which auto detects ISA card needs and allocates system resources. Systems that use PnP usually have a PnP BIOS, though

an operating system can contain PnP software also.

A PnP BIOS will contain data such as the Device ID (e.g CS4232) and the I/O address, IRQ, & DMA requirements.This Extended System Configuration Data (ESCD) is

located in the FLASH BIOS. » ESCD at EA000h or ED000h on some systems.

Page 31: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

31

Audio Subsystem - Interface Note: The part is isolated from the bus until PnP

sequence completed. POST must have reached 8C using AMI BIOS to be able to access the device.

The PnP configuration sequence starts on power-up. All PnP devices are inactive and monitor I/O address

279h waiting for a PnP initialization key. All PnP devices go into configuration mode and each

device’s required resources are read by the BIOS.Once requirements have been determined and resource

conflicts are resolved, the BIOS allocates address space, and DMA & IRQ channels to the device.

After this is done, the CS4232 chip is enabled and may be utilized as required.

Page 32: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

32

Audio Subsystem - Interface There are two mutually exclusive types of ISA access:

Programmed I/O access» I/O access is used to configure the CS4232 for a task

(record, 8-bit playback, 16-bit playback, MIDI setup, etc.),

DMA access» Both Sound Blaster Pro and WSS use DMA to transfer data

across the ISA bus during record and playback.

» The WSS can use any two of DMA channels 0,1 & 3 that includes sharing DMA 1 with the Sound Blaster.

> Note - DMA channels 5,6 & 7 are often used for 16-bit DMA when supported.

» An interrupt is generated at the end of each block transfer (e.g. IRQ5).

Page 33: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

33

Audio Subsystem Example This section describes the Crystal CS4232 CODEC &

the Yamaha OPL3 FM synthesizer Audio Sub-system which provide support for the major sound standards.The CS4232 integrates a codec, mixing capabilities, an

MPU-401 UART, joystick logic, and interfaces for a music synthesizer and a CD-ROM

» The CS4232 provides compatibility with ISA Plug & Play, the Microsoft Windows Sound System, and will run software written to the Sound Blaster interfaces.

The main components on the board consist of:The CS4232 multimedia CODEC, Yamaha OPL3 FM

Synthesizer & CS4333 DAC, and various amplifiers.» Note: Other motherboards may use more integrated chips

instead of the CS4232, OPL3 & CS4333.

Page 34: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

34

Audio Subsystem ExampleSD[7..0]

SA[15..0]

IRQ[3,5,7,9,10]

DMA[0,1,3]

CS4232

LLINE OUT

RLINE OUT

LLINE IN

RLINE IN

LMIC IN

LINE OUTCONN

LINE INCONN

MIC INCONN

GAMEPORTCONN

CS4333OPL3SERDAT

CLOCK

CD CONN

RMIC IN

FM_R

FM_L

MIDI IN

MIDI OUT

WAVE_R

WAVE_L

CD_R

CD_L

FM

_D[7

..0]16.9 MHz

24.6 MHz

33.9 MHz

ISA

BU

S

INT

ER

FA

CE

FM SYNTH DAC

CODEC& CTLR

L & R LINE IN

EXT WAVE CONN

JOYSTICK / 4/ 4

Page 35: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

35

Audio Subsystem ExampleThe CS4232 has 5 internal physical devices:

» Sound Blaster Pro Compatible Interface:> SB Codec IO Port 220-22F, IRQ5, DMA Channel 1

» Windows Sound System Codec:> WSS Codec IO Port 534-537h, IRQ5, DMA Ch 0 & Ch 1

» Game Port (Joystick): IO Port 200h

» MPU-401 Midi Interface: IRQ9, IO Port 330-331h

» CS4232 Control Port: IO Port FF0-FF8h (Config. & Misc)

The CS4232 has PnP support for two external devices. » FM Synthesizer: IO Port 388-38B

> Yamaha OPL3L & CS4333 DAC--for FM sound generation .

» CD-ROM: usually not utilized--supported via the EIDE I/F

Note: See documentation for other available options.

Page 36: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

36

Audio Subsystem ExampleXTAL2I XTAL1I XTAL1O XTAL2O VREF REFFLT LFILT RFILT

VREF

A/D

A/D

Gain

Gain

Mux

Gain

AttenMute

AttenMute

AttenMute

AttenMuteD/A

MonitorAtten

Serial Shift Serial I/FControl

Record FIFO

Linearu-LawA-Law

ADPCM

PlayFIFO

ISABus

InterfacePlug

&Play

CodecRegI/F

ConfigIO

IRQDMA

DecodeLogic

SD<7:0>

SA<11:0>

IOR

IOW

AEN

IOCHRDY

IRQ

DRQ

LMICRMICLLINERLINELAUX1RAUX1

LOUT (TO OP AMP)

MOUT

ROUT (TO OP AMP)

RAUX2LAUX2

MIN (PC SPKR.)

OSCILLATORS

CD-ROM Logic, orUpper Address Bits

MPU-401UART

JoystickLogic

WSS,SBPRO

Registers

SynthesisInterface

E² PROM& MISC I/F

3/

/ 44/

JOYSTICK MIDI SCS SINT BRESET

/8/3

XIOWXIORXD<7:0>XA<2:0>

DACK

SA<12:15>(CDROM)

3/

6/

12 /

8/

Mute

Gain

Gain Gain

Gain

D/A

Linearu-LawA-Law

ADPCM

/ 4

MICROPHONE

FM/WAVETABLE

EXT LINE

CD-ROM

Page 37: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

37

Audio Specific Signal Description Misc. Signals

RESET: Typically connected to ISA bus signal RSTDRV.» RESDRV initializes the chip and the registers will contain

their reset values.

» The part will be isolated from the bus until the Plug and Play sequence is completed.

Note: Most analog signals listed on the following pages are 1Vrms max centered around VREF.VREF-Voltage Reference, Output

» VREF is nominally 2.1 Volts DC.

» All analog inputs and outputs are centered around VREF.

Page 38: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

38

Audio Specific Signal Description Analog Inputs--The ADC input comes from a MUX that

selects between Analog inputs (e.g. Line, Aux1, MIC).» Note: Newer CODECs use a mixer instead of a multiplexer.

» LLINE-Left Line Input; RLINE-Right Line Input> Typically used for Synthesis (FM or Wave Table).

» LMIC-Left Mic Input; RMIC-Right Mic Input> Separate Gain adjustment circuit included.

» LAUX1-Left Auxillary #1 Input: RAUX1-Right Aux #1 Input> Typically used for External Stereo Line inputs.

» LAUX2-Left Auxillary #2 Input; RAUX2-Right Aux #2 Input> Typically for CDROM--not in record path in some chipsets.

» MIN-Mono Input> General purpose analog input normally used to mix the

speaker signal on most computers into the audio system.

Page 39: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

39

Audio Specific Signal Description Analog Outputs

» LOUT, ROUT -Left & Right Line Level Outputs> Analog output from the mixer for the Left & Right channels> Typically uses Op Amps on motherboard for amplification

and impedance matching.> These Op Amps often use a +/-12 VDC supply.

» MOUT-Mono Output> Summed analog output of the left & right mixer outputs.> Typically is connected to a speaker driver that drives the

internal speaker in most computers

» MIDIOUT-MIDI Out Transmit Data, Output> Sends MIDI data serially out to an external MIDI device.> Connected to external Wavetable & Wavetable header.

» MIDIIN-MIDI In Receive Data, Input> Receive serial MIDI data from an external MIDI device.

Page 40: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

40

Testing & Troubleshooting Audio

INTERNAL F M L/B

EXTERNAL FM/CD L/B

INTERNAL LINE

EXTERNAL LINE L/B

EXTERNAL MIC L/B

MIDI L/B

JOYSTICK

SD[7..0]

SA[15..0]

IRQ[3,5,7,9,10]

DMA[0,1,3]

CS4232

LLINE OUT

RLINE OUT

LLINE IN

RLINE IN

LMIC IN

JS

MIDI IN

MIDI OUT

CONN MICIN

MX L

MX R

CONN_LOUTR

CONN_LOUTL LINE OUTCONN

LINE INCONN

MIC INCONN

GAMEPORTCONN

/ 8

CS4333OPL3SERDAT

CLOCK

FM/CDLOOPBACK

RMIC IN

FM_R

FM_L

WAVE_R

WAVE_L

CD_R

CD_L

FM

_D[7

..0]16.9 MHz

24.6 MHz

33.9 MHz

ISA

BU

S

INT

ER

FA

CE

FM SYNTH DAC

CODEC& CTLR

Page 41: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

41

Testing & Troubleshooting Audio The recommended method of debug is to run all the

tests using Testview/MTA, then use the debug hints provided to track down the problem. It is a good idea to compare signals with a known good

board while stimulating with Testview. » Note: Use the “/PLAY_FOREVER” switch in Testview to

produce a continuous signal, rather than looping as with many other tests in MTA.

» Use the “/VERY_VERBOSE” switch for more detailed information on the test.

DMA problems are usually related to the DMAC (PIIX)Using the ITP to debug audio is not recommended.

» Due to the complexity of Digital Audio, most ITP procs only read & write registers and do not check functionality.

Page 42: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

42

Newer Technologies - 3D sound 3D sound seems to originate in the three-dimensional

space outside a listener's head.Stereo sound may be louder or softer in one ear, but the

movement of the sound is generally restricted to a line between the ears.

There are two kinds of 3D sound systems available3D enhancement: sounds may be placed within a 180

degree arc around and in front of the listener.» Sounds fill area around stereo speakers.

3D positional: sounds may be placed from one point of a 360 degree arc around the listener.

» Requires encoding/decoding at both ends.

Page 43: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

43

Newer Technologies - 3D sound 3D enhancement is designed to interpret sound the

same way the human ear does. 3D enhancement works by using psychoacoustic

phenomena called HRTFs (Head-Related Transfer Functions), which provide the brain with position clues about the location of an audio source.

» 3D enhancement uses those same clues to create realistic three-dimensional sound from two speakers.

3D enhancement works with any existing recorded material; mono, stereo, surround encoded or other encoding technologies.

» 3D enhancement is not required in the recording process.

Page 44: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

44

Newer Technologies - AC '97 The Audio Codec (AC) '97 specification outlines a

revolutionary new approach to providing PC sound. Unlike today's sound boards, which use proprietary

codecs & DSP chips, the AC '97-compliant audio circuitry will be transparent to the O/S & system hardware.

» The architecture enables digital controllers to reside on any bus, including PCI, USB, 1394, and ISA.

AC '97 divides functionality between 2 discrete modules. » A DSP-like digital controller is relieved of the complexities of

high-fidelity linear circuitry.> Eliminating interference between analog & digital signals

reduces on-chip noise, increasing quality of the audio output.

» An audio codec chip converts the digital data into an analog signal that can be sent to speakers.

Page 45: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

45

REVIEW & SUMMARYWE HAVE DISCUSSED THE FOLLOWING:

Fundamental components of Digital Audio.CODECs, MIDI, FM synthesis & Wavetables, and the

game port. (CD-ROM I/F).

PC Audio standards.Sound Blaster (8-bit play only), WSS (16-bit rec/play).Wave files (10 MEG of HD space for every minute of a

16-bit stereo digital).

A/D, D/A, & sampling parameters.A/D = record/capture; play = D/A. Nyquist theorem; 8 or 16 bit sample size; sampling rates

from 4K to 44K.

Page 46: 1 PC Peripherals for Technicians PC Peripherals for Technicians Chapter 4 Chapter 4 Digital Audio Systems Manufacturing Training and Employee Development

46

REVIEW & SUMMARY The basic functions of an Audio Adapter.

The “digital audio” section uses the CODEC to play & record sounds (often stored in WAVE files on the PC).

FM Synthesis & sampling from a Wavetable are two ways to synthesize (electronically generate) sounds.

Use MIDI to play the background (instrumental) music.Game port--reading joystick buttons and the joystick axis.

Audio Sub-system example block diagram. Part isolated from the bus until PnP sequence complete.Prog I/O-configure for a task; DMA access- transfer data.

Audio testing and troubleshooting.Use Testview/MTA.

End of Chapter 4-1