Quote |
----------------------------------------------------------------------------------------- General discussion: Red Hat Linux 6.0 and the ThinkPad 600E Right out of the box, Red Hat Linux 6.0 contains drivers for many of the devices built into the ThinkPad 600E, including video, audio, serial, parallel, diskette, hard disk, CD-ROM, mouse, and Advanced Power Management (APM). With the exceptions of audio and APM support, these devices are ready for use immediately after installation without any additional configuration. This section discusses some of the Linux compatibility issues with the built-in devices. Audio. The ThinkPad 600E uses a CS4239 chip for FM synthesis and 16-bit playback and record of waveform data. The driver included with Red Hat Linux that is most suited to supporting this audio chip is the CS4232 driver, which generically supports the CS4232 and chips that are compatible with it. When configured as described later in this document, the CS4232 driver provides basic audio support on the ThinkPad 600E. --------------------------------------------------------------------------------------- |
Quote |
------------------------------------------------------------------------------------------ Sound Ordinarily, configuring Linux sound support is as simple as running the sndconfig utility and specifying the audio hardware to be used as well as its resource configuration. You may recall from Part I of this Guide that the audio chip in the ThinkPad 600E is a CS4239, and that it is supported by the standard CS4232 audio driver included with Red Hat Linux. However, there is a problem when using the standard CS4232 audio driver with the ThinkPad 600E. The symptom is that when you play a wave file, the sound plays two or more times with various parts of the sound interwoven, as if the interrupt resource was specified incorrectly. The problem occurs when the CS4232 driver is loaded in the usual fashion during boot-up, but it does not occur if the driver is loaded later. There is a work-around, but it may be too involved for a user who is new to Linux. The work around, describe shortly, involves creating a script that will be run during the initialization of a run-level. The procedure for configuring sound on the ThinkPad 600E is summarized below.Use the sndconfig utility to specify the audio device and its resources.Create a script file that loads as part of the desired run-levels. The script will stop and restart the CS4232 audio driver. Run sndconfig. From a Linux command prompt, issue the command sndconfig . This will start the sound configuration utility, which will let you specify the type of sound card that you have and the resources that it uses. When prompted for the card type, use the following setting. Setup prompt Recommended selection Card Type Crystal CS423x sound chip Next, select the I/O, IRQ, and DMA resources for the sound chip. Listed below are the default settings for the ThinkPad 600E. You can try these, or use a ThinkPad Configuration program to determine the actual settings. In most cases, the settings below should work. An interesting anomaly: On occasion we have found some systems that require the DMA and DMA2 settings to be reversed (DMA=0, DMA2=1), even when the PS2 utility shows that the default settings are in effect! So if the default settings are in effect for your system but you don't hear any sound with Linux when you specify those settings, try swapping the DMA values. Setup prompt Recommended selection I/O PORT 0x530 IRQ 5 DMA 1 DMA 2 0 MPU I/O 330 MPU IRQ 9 After you specify the resource settings, sndconfig will play some samples. Try to select a resource configuration that results in clear playback of the audio sample. Another interesting anomaly: On some systems we noticed that the sample playback was garbled, even though the correct settings were specified. In these cases, normal audio playback worked correctly, and audio was garbled only during playback of sndconfig's test samples. Create the CS4232 script. To work around the problem of repeating wave data, you must load the CS4232 driver later in the boot process. One way to do this is by creating a script that is executed during run-level initialization. You can use a script like the one below. # !/bin/bash # chkconfig: 345 84 16 # description: Starts/stops the CS4232 driver at boot time and shutdown HOME=/etc case "$1" in start) echo "Starting CS4232 driver" rmmod cs4232 modprobe cs4232 ;; stop) echo "Stopping CS4232 driver" rmmod cs4232 ;; restart) $0 stop $0 start ;; status) echo "Status (NO-OP)" ;; *) echo "Usage: cs4232 {start|stop|status|restart} exit 1 esac exit 0 Save the script as /etc/rc.d/init.d/cs4232 and set the "execute" file attribute. Then, for each run-level that you want to include sound support, create an appropriate "symbolic link" to the file from the corresponding run-level directories. For example, to run the script as part of run-level 5, create the link /etc/rc.d/rc5.d/S84cs4232 that points to /etc/rc.d/init.d/cs4232 . The "S84" prefix was chosen for this example because, by default, the mixer service starts as "S85", and we want the CS4232 driver to be functional before that. With the above script in place, the CS4232 driver will be unloaded and reloaded as the run-level is initialized, which will put the CS4232 driver and sound chip into a good state. ---------------------------------------------------------------------------------------- |