Monday, May 24, 2010

How do i troubleshoot sound card problems in Linux?

I've intel DC102 motherboard which contains real tech high definition audio card.Its working well in windows but in Linux it seems there is a problem with /dev/mixer

How do i troubleshoot sound card problems in Linux?
If you already identified /dev/mixer be the problem, just install a mixer panel and adjust /dev/mixer through it, it seems distros don't agree on a standardized version since they differ in even which desktop to run, sometimes the default is aumix, kmix, whatever can it be. No wonder Linux has yet to make much encroachment into desktop computer.





Mine is Xubuntu it is xfce4-mixer.
Reply:The Linux kernel currently supports the following sound cards:





Roland MPU-401 MIDI interface





AdLib





SoundBlaster and compatibles (including ThunderBoard and Ati Stereo F/X)





SoundBlaster Pro





SoundBlaster 16





ProAudioSpectrum 16





Gravis UltraSound





The Linux kernel also supports the SCSI port provided on some sound cards (e.g., ProAudioSpectrum 16) and the CD-ROM interface provided on the Soundblaster Pro and SoundBlaster 16.





For those who do not (yet) have sound hardware, there are a couple of other options. With a little hardware, a sound interface can be built using the parallel printer port. For a zero-cost solution, there is even a sound driver for the internal speaker of your PC. The driver is compatible with the sound card driver, but the quality may leave something to be desired.





Configuring Linux for Sound


Setting up Linux to support a sound card involves the following steps:





installing the sound card





configuring and building the kernel with the sound drivers





creating the sound device files





testing the installation





The first requirement, if you have not already done so, is to install the sound card. Follow the instructions provided by the manufacturer. Be sure to note down the jumper settings for IRQ, DMA channel, and so on; if you are unsure, use the factory defaults. Try to avoid conflicts with other devices (e.g., Ethernet cards) if possible. You will also need speakers, and a microphone if you want to do any recording. A math co-processor is also useful for some sound applications (e.g., changing file formats, adding effects or speech synthesis), but not necessary.





The next step is to configure the Linux kernel. If you are using a recent version (0.99 patch level 14 or later), the sound drivers are included with the kernel release. Follow your usual procedure for building the kernel. When you configure the kernel, enable the sound driver, and answer the questions about sound card settings when prompted by the configure program.





Once the kernel is configured, you need to create the sound device files. The easiest way to do this is to cut the short shell script from the end of the file /usr/src/linux/drivers/sound/Readme.linu... and run it as root. These are the files that will be created:





/dev/audio- Sun workstation compatible audio device (read/write)





/dev/dsp- digital sampling device (read/write)





/dev/mixer- sound mixer





/dev/sequencer- MIDI, FM, and GUS synthesizer access





/dev/midi- MIDI device (not yet implemented in current sound driver)





/dev/sndstat- displays sound driver status when read





/dev/audio1- for second sound card





/dev/dsp1- for second sound card





If you are using the PC speaker sound driver, then it will use the following devices:





/dev/pcaudio- equivalent to /dev/audio





/dev/pcsp- equivalent to /dev/dsp





/dev/pcmixer- equivalent to /dev/mixer





Now that the kernel is configured and the device files created, you can verify the sound hardware and software. Follow your usual procedure for installing and rebooting the new kernel. (Keep the old kernel around in case of problems, of course.) Verify that sound card is recognized during kernel initialization. You should see a message such as the following on powerup:





snd2 %26lt;SoundBlaster Pro 3.2%26gt; at 0x220 irq 5 drq 1





snd1 %26lt;Yamaha OPL-3 FM%26gt; at 0x388 irq 0 drq 0





This should match your sound card type and jumper settings. The driver may also display some error messages and warnings during boot up. Watch for these when booting the first time after configuring the sound driver.





If no sound card is detected when booting, there are a couple of possible reasons. The configuration of the driver could be incorrect and the driver was not able to detect your card in the given I/O address. Another common error is not having the sound driver in the kernel, because you booted with an old kernel instead of the one that was just compiled.





Reading the sound driver status device file provides additional information on whether the sound card driver initialized properly. Sample output should look something like this:





% cat /dev/sndstat


Sound Driver:2.4 (Sun Feb 13 14:49:20 EST 1994 root@fizzbin.mitel.com)


Config options: 1aa2


HW config:


Type 2: SoundBlaster at 0x220 irq 5 drq 1


Type 1: AdLib at 0x388 irq 0 drq 0


PCM devices:


0: SoundBlaster Pro 3.2


Synth devices:


0: Yamaha OPL-3


Midi devices:


0: SoundBlaster


Mixer(s) installed





If the cat command displays "No such device", then the sound driver is not active in the kernel. If the printout contains no devices (PCM, Synth or Midi), then your sound card was not detected. Verify that you entered the correct information when configuring the sound driver.





Now you should be ready to play a sample sound file, and send it to the sound device as a basic check of sound output, for example,





% cat endoftheworld %26gt;/dev/dsp


% cat crash.au %26gt;/dev/audio





Some sample sound files can be obtained from the file snd-data-0.1.tar.Z, available on many Linux archive sites.





If you have sound input capability, you can do a quick test of this using commands such as the following:





# record 4 seconds of audio from microphone


% dd bs=8k count=4 %26lt;/dev/audio %26gt;sample.au


# play back sound


% cat sample.au %26gt;/dev/audio

pollen

No comments:

Post a Comment