|
|||
Linux Sound System Calibration |
Home | John | Connie | Publications | Software | Correspondence | NtropiX | NdustriX | NformatiX | NdeX | Thanks
Linux sound mixer controls interact and must be calibrated for maximum dynamic range-the difference between maximum undistorted output and the quantization noise of the digital signal. Since the only mixer input that has a unique, single, level control is the CD, it will be used as a reference, and all other inputs balanced against the maximum CD level-the CD level will be adjusted such that at maximum input from the CD device, the output level from the mixer is just below clipping. Clipping will be measured graphically, (i.e., like using an oscilloscope,) using the tsriff program suite, from the Spatial Distortion Reduction Headphone Amplifier page and sox.
To calibrate the sound system, (I will use aumix, since it
is a "standard" in most Linux distributions,) with all
levels set at zero, recording from the CD, and adjusting
IGain, place the CD with the
and:
to record the 440 Hz. waveform on the CD. After about 10 seconds, kill the sox recording program, and:
to make a Figure I is a plot of the 440 Hz., maximum output level, WAV/RIFF file recording. Note that the output level is the maximum supported by the sound card, with no visible clipping. Figure II is a plot of the 440 Hz., maximum output level, WAV/RIFF file recording. Note the pronounced clipping, meaning that the IGain level was set too high-another try will have to be made, lowering the IGain level. The sine waveform of the
Leaving the IGain value at its calibrated level, record
from IGain, and adjust the CD level, (as opposed to adjusting
the IGain level above,) again using sox and tsriff
to find the maximum, non-clipped level the sound card will
handle. The IGain and CD levels are now calibrated, leaving
only the PCM level to be adjusted-eject the CD with the
Leaving the IGain and CD values at their calibrated levels,
play the original
and record a few seconds of the output, as before:
iteratively adjusting the PCM level for maximum non-clipped output. All three levels, IGain, CD, and PCM, are now calibrated to
utilize the sound card's maximum available dynamic range. In
better sound cards, they will all have a maximum PCM output
value of 32767 to -32768, and the
Calibration of the Line/Mic input on the sound card is more difficult. However, using the -p option to tsriff after recording about 10 minutes of content, can be of help-it tells the tsriff program to print the maximum, minimum, and root-mean-square of the PCM values of the content; there should be very few of the maximum values, (i.e., less than 1% should be over 32000, or less than -32000,) and the RMS value should be about 10-20 dB, (about a factor of 3 to 10,) lower than the peaks, (i.e., an RMS value of about 5000.) Note that for generality, tsriff and gnuplot were used to display the waveforms in the calibration procedure. Another handy program is xoscope, and is a highly recommended tool for the Linux audio enthusiast. Quite frequently, the line input of the sound card will be required to mix two, (or more,) line outputs of external devices; for example, individual FM/TV/DVD component/devices, all of which have different output levels. A simple "T" resistive network mixer will often suffice to combine the different signal levels-in my case, it was an FM tuner, and television. Making measurements, as above, on each, indicated that the television had to have its signal level reduced by a factor of 1.5, and the tuner had to have its level reduced by a factor of 4: Figure III is the schematic of the simple "T" resistive network mixer. Then, by inspection:
and:
Which means solving two simultaneous equations. However, by
inspection, the first equation means something,
(
and:
or:
and:
substituting:
which means:
and combining:
which means no matter what values we chose:
and:
Since the output impedance of many devices can be about
LicenseA license is hereby granted to reproduce this software for personal, non-commercial use. THIS PROGRAM IS PROVIDED "AS IS". THE AUTHOR PROVIDES NO WARRANTIES WHATSOEVER, EXPRESSED OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, TITLE, OR FITNESS FOR ANY PARTICULAR PURPOSE. THE AUTHOR DOES NOT WARRANT THAT USE OF THIS PROGRAM DOES NOT INFRINGE THE INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY IN ANY COUNTRY. So there. Copyright © 1992-2008, John Conover, All Rights Reserved. Comments and/or problem reports should be addressed to:
|
Home | John | Connie | Publications | Software | Correspondence | NtropiX | NdustriX | NformatiX | NdeX | Thanks