Digital Domain -- (By Ken Pohlmann; Mar. 1987)

Home | Audio Magazine | Stereo Review magazine | Good Sound | Troubleshooting


Departments | Features | ADs | Equipment | Music/Recordings | History



MINDING YOUR P's AND Q's

If you read this column regularly (and I know you do), you've followed me through some of the startling twists and turns of emerging Com pact Disc technology. Recently, we've observed that the CD-ROM and CD-I formats will promote the Compact Disc in entirely new markets, to entirely new users. For example, corporate data bases, telephone books, automobile navigation, and interactive fiction could all be considered candidates for that 12-cm disc.

In order to appreciate some of the potentials of the emerging CD formats, it's important to shed the stereotypical (pun intended) ideas of what a disc can and cannot do. An often over looked part of the CD system, the sub-code, can help demonstrate the open ended nature of the format.

To begin our perspective-broadening exercise, try to purge yourself of all thoughts of LPs and tapes. Those analog audio-storage media are far re moved from the bit stream encoded on a CD. Try not to think of the CD as an audio medium at all. Rather, consider it as general storage for numerically rep resented information. The fact that most CDs today have used an audio signal to modulate the bit stream is happenstance. The CD is simply a random-access, stand-alone, compact storage medium. Similarly, think of your CD player as more than an audio component. It is a data retrieval device; only a minority of its circuitry is devoted to the analog audio signal. In a CD-ROM drive, the audio section is omitted entirely and replaced by a computer interface.

A CD is thus much more than a re cording. It contains an encoded data structure complete with all the information the player requires to decode the contained data. Many of the player's operational features-such as timing, addressing, and indexing-derive their intelligence from special control information encoded on the disc. The control information is hidden in the sub-code on every CD.

All data on an audio CD is arranged into frames, as shown in Fig. 1. The frame structure is used to distinguish among audio data, parity information, the synchronization word, and the sub-code. The 27-bit sync word, both 96-bit data words, both 32-bit parity words, and two of the eight subcode bits are all used on a disc for audio reproduction.

The eight subcode bits contained in every frame are assigned letter designations from P through W, and are collectively referred to as the PQ subcode.

In the audio format, only the P and Q bits are used; the remaining six bits comprise the "user field" and are available for other applications. The eight sub-code bits are used as eight different information channels, with each frame containing one P bit, one Q bit, one R bit, etc. Since there is only one subcode bit per channel in each frame, subcode data is assembled eight bits at a time, from 98 successive frames, to form a subcode block (Fig. 2).

The start of each subcode block is signaled by a synchronization word consisting of two sync patterns, S0 and S1. Because the signal has already undergone a process called eight-to-fourteen modulation (EFM) by this point, these are 14-bit patterns. There are 267 "legal" EFM patterns, but only 256 of them correspond to possible values for the eight-bit data which existed before EFM encoding. The S0 and S1 patterns are two of the 11 EFM patterns which have no eight-bit equivalents; this ensures that the sync pat terns cannot be confused with sub-code data during playback.

Subcode data accumulates at a rap id rate. Each CD channel contains 44,100 16-bit (two-byte) audio samples every second, so the byte rate is 44,100 x 2 x 2, or 176.4 kilobytes/S.

There are 24 audio symbols in every frame, so the frame rate is 176,400 divided by 24, or 7,350 Hz. Because it takes 98 frames to make one complete subcode block, the subcode block rate is 7,350 divided by 98, or 75 Hz.

That is, there are 75 subcode blocks every second.

Figure 3 shows some of the information contained in the P and Q subcode channels of an audio CD. The P channel primarily carries flag bits used by the player to control the optical pickup.

These flags designate the start of each track and the lead-in and lead-out areas on the disc. The lead-in and lead-out signals tell the player where the music program begins and ends.

A repeated pattern of ones in the P channel indicates that the next track is about to start. This start-flag signal is equal in length to the pause between tracks but is no shorter than 2 S; if a pause of less than 2 S occurs between two tracks, the start flag will begin be fore the first of those tracks has ended.

If one track is cross-faded into another, with no intervening pause, the start flag begins 2 S before whatever point the producers consider the start of the second track. The player counts start flags to locate any particular track.

During audio tracks, the P subcode channel carries a series of zeros, except when the start flag for the next track has begun. The lead-in is also encoded as a series of zeros in the P channel. The lead-out includes both repeated ones and zeros, alternating at a 2-Hz rate.

The Q code is more sophisticated. Each Q-channel subcode block (Fig. 4) contains 72 bits of Q data plus 16 bits of CRCC (cyclic redundancy check code) used for error detection, four "address" bits, four bits of control information, and two sync bits.

Of the four control bits, only three have defined uses so far. Bit 1 indicates whether the recording has two or four channels, allowing for players which would automatically switch their outputs from stereo to quadraphonic sound. (I know of no such players yet.) Bit 2 is undefined. Bit 3 is used to permit or deny digital copying; it can be used to activate or disable the CD player's digital output or could regulate the ability of digital recorders to copy the CD's data directly. Bit 4 indicates whether the current track is encoded with pre-emphasis, a high-frequency boost used to reduce noise; if pre-emphasis is in use, Bit 4 switches the player's de-emphasis circuits on to re store flat frequency response.

The "address" bits tell the player how to interpret the 72 bits of Q-channel data which follow. So far, three interpretive modes have been established.

A Mode 1 Q-channel data field al ways contains track numbers, time within the track, and absolute time from the beginning of track 1; it also contains other information whose meaning depends on whether it occurs during the lead-in or during the music. In the program areas, Mode 1 indicates that the 0-channel data contains index numbers within the track, as well as the timing information. During the lead-in (track 00, absolute time 00:00), it indicates that the Q channel contains the disc's table of contents (TOC), which tells how many tracks there are (up to 99), how long each lasts, and their starting times (measured from the be ginning of the disc). The TOC is repeated continuously throughout the lead-in, and the data is repeated three times in each TOC. This information is read during disc initialization, before the disc begins playing, so that the player can respond to any programming or program searching that is re quested by the user. Also, most players can display this information.


Fig. 1-One frame of data on an audio CD, before EFM encoding.


Fig. 2-A subcode block is assembled from the subcode bits of 98 successive data frames before being divided into 98-bit frames for each subcode channel. The beginning of each block is marked by two unique sync patterns.

The indicated time-within-track is set to zero at the beginning of each track (including the lead-in and lead-out areas) and is increased during the track to show elapsed time (Fig. 3). At the beginning of a pause, however, time-within-track is set equal to the length of the pause, and is decreased during the pause until it reaches zero at the end of the pause. Absolute time stays at zero throughout the lead-in, then in creases continuously, right to the end of the lead-out. Time-within-track and absolute time are expressed in minutes, seconds, and frames; a frame is equal to 1/75 S.

Mode 2 and Mode 3 Q-channel data fields are both optional. Mode 2 contains the catalog number of the disc in 52-bit UPC (Universal Product Code) bar-code form. Mode 3 data, which is present only in the program area, gives the ISRC (International Standard Re cording Code) for each music track.

The ISRC number gives the country code, the owner code, the year of re cording, and a serial number. If Mode 2 or Mode 3 is used, it must appear in at least one out of each 100 subcode blocks.


Fig. 3-Relationship of P and Q subcode information to the lead-in, music, and lead-out tracks on an audio CD.


Fig. 4-Data structure of a Q subcode frame. The meaning of the Q data depends on the mode, which is indicated in the "Address" field, and on the frame's location on the disc (see text).

Every audio Compact Disc contains additional data capacity in the guise of the other six subcode bits (designated R through W). They account for about 20 megabytes of storage and are avail able for video information. The original disc designers guessed that a little spare room of unspecified space might come in handy some day. On the other hand, they may have goofed, wasting gobs of optical storage capacity forever.

The P and Q subcode bits are important in playing back music, but the R through W bits are recorded with zeros on most audio discs. With the advent of CD-I, the relatively crude R through W subcode may never be extensively commercialized.

The PQ subcode is thus special data, plucked from the bit stream. It gathers control information from the bit stream to inform the player of parameters relevant to decoding.

I hope that with your new insight into the secret dealings of the subcode, you've come to appreciate a CD as more than just a recording. It is an intelligent, self-directed storage sys tem, somewhat like a self-reading, smart book. The player knows how to read, and the subcode tells it when to turn the pages. What is written on the pages is entirely up to the software producer. With that in mind, surely the wide diversity of CD applications be comes apparent.

Next time someone asks, "Oh, is that your CD player?" you should answer, "No, that's my information retrieval sys tem." Because that's a better description of what you've got.

(adapted from Audio magazine, Mar. 1987)

Also see: Dr. Thomas Stockham on the Future of Digital Recording (Feb. 1980)

= = = =

Prev. | Next

Top of Page    Home

Updated: Saturday, 2019-05-04 12:44 PST