//edit// Moved this thread to a more appropriate forum //end of edit//
Source : Audio Compact Disc : Reading and Writing the data
For the complete paper start here. This is a small part of it :
Prologue :
Part I – A Brief Overview
Data storage in CD format is not a simple thing. Typically, a user pictures the “1s” and “0s” in the memory of the computer as being directly transferred to “pits” and “bumps” on the CD disk. Unfortunately, it is far from that easy.
To begin with the incoming data is subjected to a series of coding operations. These coding operations add a number of additional parity bits to the data for error detection and correction purposes. The data is also subject to an interleaving process (which means that adjacent data on the disk is not adjacent data from the incoming file).
Additionally, the physical form of the data is changed (EFM coding) to eliminate the possibility of adjacent “1s”. (This is done because it is the edges of the pit – not the pit itself – that represent l’s in the data stream.)
A. Simple error detection and correction codes
Error detection and correction codes are fundamental to the operation of any digital storage system. There are literally thousands of such codes. These codes typically rely on using additional bits (usually called parity bits) to carry the error detection and correction information.
In a simple binary parity check, a parity bit is a single bit that represents whether the total number of “1s” in a particular data stream is even (1) or odd (0). (Modulo two addition).
For example, assume that you are setting a parity bit over all the digits of the following word.
1101 0000
The total number of “1s” is odd, so the parity bit would be 1. The word might then be written as
1101 0000 1
where the last digit is the parity bit.
Even simple binary parity checks can become quite complex if more than one parity bit is used. For example, you may elect to have two parity bits – one on the first four bits of the word and one on the last four.
1 1 0 1 0 0 0 0 P1 P2
x x x x 1
x x x x 0
If enough parity bits are used, then error can not only be detected – they can also be corrected. For example, consider what happens if you use four parity bits. The first one is on the first four bits, the second one is on the second four bits, the third one is on the 1,2,5,6 bits and the fourth one is on the 2,3,6,7 bits.
1 1 0 1 0 0 0 0 P1 P2 P3 P4
x x x x 1
x x x x 0
x x x x 0
x x x x 1
Now, assume that there was an error in the final bit.
1 2 3 4 5 6 7 8 P1 P2 P3 P4
1 1 0 1 0 0 0 1 1 0 0 1
x x x x 1
x x x x 1
x x x x 0
x x x x 1
Parity bit P1 would agree with the parity bit in the transmitted word, P2 would NOT agree, P3 and P4 would agree. Since P2 is the only parity bit not agreeing with the transmitted word – then the error must be in the 8th bit.
Unfortunately, the majority of error-detection and correction algorithms used in CD players are not as simple as the binary check codes discussed above. Although an overview of these codes will be presented, in-depth analysis of the codes is beyond the scope of this course. (Interested students should consult more advanced references, such a W. Peterson, Error-Correcting Codes, MIT Press)
B. Simple interleaving
Interleaving is a very simple and powerful idea. To illustrate interleaving, assume that you have a frame consisting of several characters of information,
U N I V E R S I T Y O F W A S H I N G T O N
Assume that you spit on the disk and destroy several of the characters.
R S I T Y O F W A S H I N G T O N
The first word is then very hard to reconstruct! However, you can take the original frame and scramble it as,
U N I V E R S I T Y O F W A S H I N G T O N
O N S T H U G R F S I I O T W N N V E I Y A
Then you can damage it,
U G R F S I I O T W N N V E I Y A
Then you can unscramble it,
U N I V E R I Y O F W A S I G T N
It is much easier to “interpolate” or “guess” the missing letters. (A bit like the later stages of “hangman”!)
C. Concealment
In practice some errors are so large that they cannot be corrected by the error-detection and correction algorithms. Unless these errors are handled by some other means, they can result in audible clicks in the audio output. In order to avoid these clicks, several methods are used to conceal uncorrectable errors:
Interpolation: In this technique, some average is constructed using the valid data around an error. This average is then substituted in for the erroneous data. Since most music (with the possible exception of heavy metal!) is continuous – this method works well for concealing relatively short errors.
Muting: Muting is a last ditch technique – as it effectively creates a brief period of silence in the audio train. However, it is not effective to simply set all the binary digits to zero --as this produces exactly the click that we are trying to avoid! Instead, the volume is faded out and then back in again to conceal the error.
EFM means Eight to Fourteen Modulation and is an incredibly clever way of reducing errors. The idea is to minimize the number of 0 to 1 and 1-0 transitions – thus avoiding small pits. In EFM only those combinations of bits are used in which more than two but less than 10 zeros appear continuously.
For example, a digital 10 given as a binary 0000 1010 is an EFM 1001 0001 0000 00
The use of EFM coding means that pits come in discrete lengths ranging from 3 bits long (often written 3T) to 11 bits long (11T).
As the laser beam scans across these pits, a very distinct RF signal is formed. The shortest wavelength in this signal (highest frequency) is produced by the 3T pits. The longest wavelength in the signal (lowest frequency) is produced by the 11T pits. The zero crossings of the RF signal represent the edges of the pits – and thus the binary “1s” in the data stream[2]. (Notice that the longer the wavelength, the larger the amplitude of the signal.)
It is common to display the photodetector output on a scope with a conventional trigger. This results in a display where the nine possible frequencies (3T to 11T) all add up on top of each other. This type of display is termed an “eye” pattern and provides valuable information about the various alignment parameters of the CD player. Notice that the relationship between size and wavelength is very distinct in the eye pattern
The RF output is converted to a square wave, and then phase locks a clock with the period T. The CD player then begins to hunt for the characteristic start of frame symbol, which is three transitions separated by 11T. (100000000001000000000010 + 3 merge bits) Then, the player isolates the 33 17T symbols, and then kicks off the 3T merge bits – leaving the 33 14T active symbols.