⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lsg10.htm

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTM
📖 第 1 页 / 共 3 页
字号:




<BR>







<BR>







<A NAME="E68E57"></A>







<H3 ALIGN=CENTER>







<CENTER>







<FONT SIZE=5 COLOR="#FF0000"><B>Sampling Linux Sound Applications</B></FONT></CENTER></H3>







<BR>







<P>A few Linux applications use sound, and the number is increasing almost daily. This section describes sample applications for each type of sound card function. These applications are generally supplied with Linux distributions. For a complete list of all applications that support music, check the Linux documentation or local download sites. The USENET newsgroups also are helpful for finding the most useful applications for particular purposes.







<BR>







<UL>







<LI>For playing simple audio files, a common application is called play. You call this application with the name of the audio file. Other applications, such as wavplay, do the same thing, some with better interfaces than others.







<BR>







<BR>







<LI>For mixing, the utilities aumix and xmix are useful. They let you control the input and output of the sound card and combine sound files into another sound files in some cases.







<BR>







<BR>







<LI>To play MIDI files, you need a special player like mp. MIDI files are stored in a different format than most Linux sound files, so they have to be interpreted differently. Linux's MIDI players can interface with a wide variety of MIDI equipment, including many commercial synthesizers and drum machines.







<BR>







<BR>







<LI>Several conversion utilities are available to help you convert audio files from one format to another. A good starting utility is Sox. You may need to convert audio files that were originally designed for another operating system or machine.







<BR>







<BR>







<LI>Recording sound samples requires an application that can interface with the sound card inputs. One widely used application for this purpose is called vrec. It will work with many of the microphone-equipped sound cards used by DOS and Windows.







<BR>







<BR>







</UL>







<BR>







<A NAME="E68E58"></A>







<H3 ALIGN=CENTER>







<CENTER>







<FONT SIZE=5 COLOR="#FF0000"><B>Troubleshooting the Sound Card</B></FONT></CENTER></H3>







<BR>







<P>If you have properly installed the sound card, yet don't hear anything when you try to test it (or get error messages during initialization), it's time to follow a few simple diagnostic and troubleshooting procedures. Follow these steps in the order they're presented to try and isolate the problem.







<BR>







<BR>







<A NAME="E69E91"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Configuration Information</B></FONT></CENTER></H4>







<BR>







<P>Check the initialization messages from the kernel. When the machine reboots with the kernel that has the sound drivers linked in, you should see some initialization messages similar to







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">snd1 &lt;Sound_Card_Name&gt; at 0x330 irq 1 drq 1</FONT></PRE>







<P>where the sound card's name and configuration parameters are shown. Verify the sound card parameters! Incorrect prarmeters are the most common cause of sound card failure, as many users assume default values when the values have been changed. Sometimes the default values are used on the sound card but are incorrectly entered in the configuration information.







<BR>







<P>If no lines in the bootup messages refer to the sound card driver, then the driver is inactive or not linked to the current boot kernel. Make sure you linked the drivers to the current boot kernel. Some Linux systems don't display any boot messages if the configuration information is correct, and others generate a message telling you the information is correct.







<BR>







<P>Use the sound card's manual to determine the default settings and compare them to the board. Physically remove the sound board and examine the jumpers, DIPs, or whatever method is used for setting the configuration. Some boards use software configuration, so you should boot your machine in DOS and use the diagnostics supplied with the card to examine and set the board. Write down all the settings, and then check the device driver configuration file to ensure that they match.







<BR>







<P>A good method of checking settings is to run a DOS application that uses the sound board. If the settings work in DOS, they will work in Linux. However, if a DOS application can't access the sound card properly, that indicates a configuration problem (or the sound card is defective). If the settings are incorrect, re-enter them into the device driver configuration information, recompile and relink the kernel, and then reboot the machine and test the sound card again.







<BR>







<BR>







<A NAME="E69E92"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Check the File /dev/sndstat</B></FONT></CENTER></H4>







<BR>







<P>The file /dev/sndstat should contain some basic information about the sound card and its initialization. Not all versions of Linux provide this file, so don't be too surprised if it doesn't exist. In this case, skip this step. If the /dev/sndstat file does exist, the contents should show the name of the configured card and its parameters, as well as any additional installed devices. For example, a file may contain the following lines:







<BR>







<PRE>







<FONT COLOR="#000080">Sound Driver 3.1







HW config:







Type 1: SoundBlaster Pro at 0x220 irq 5 drq 1







PCM devices:







0: SoundBlaster Pro 3.2







Synth devices:







0: Yamaha OPL-3







Midi devices:







0: SoundBlaster







Mixer(s) installed</FONT></PRE>







<P>This sample file shows the drivers and components that are installed for a typical Sound Blaster Pro card. Additional messages may appear for other drivers or for error conditions. Check the file for anything of use, and verify the configuration parameters with your sound card documentation.







<BR>







<P>If you can't find the /dev/sndstat file or it is empty, either your Linux version doesn't support that file or the sound card was not recognized during boot. Usually the HW config section is filled in even if the sound card was not found.







<BR>







<BR>







<A NAME="E69E93"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>No Such File or Device Errors</B></FONT></CENTER></H4>







<BR>







<P>If the sound card seems to load but then you can't test it, or you get the error message







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">No such file or directory</FONT></PRE>







<P>when the sound card tries to initialize or you run an application that uses the sound card, the problem is the device driver files. Typically, these problems mean that the device driver files do not exist or the files are not in the proper location.







<BR>







<P>Check to ensure the device driver files are linked into the kernel and are in the /dev directory. Check the section &quot;Understanding Sound Card Device Files&quot; earlier in this chapter for a list of the sound card device driver files you should have. If the device driver files exist, check that the major and minor device numbers do not conflict with any other active device.







<BR>







<P>If you get the error message







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">No such device</FONT></PRE>







<P>when an application tries to use the sound card, it means the device driver wasn't loaded in the kernel boot process. Check to make sure you did relink the kernel and you have booted the system using the new image.







<BR>







<P>If you get the message







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">device busy</FONT></PRE>







<P>when an application is running and trying to communicate with the sound card, it means that more than one process is using the sound card at the same time. Linux allows only one process to access the sound card device at a time. You can determine which processes are using the sound card using the fuser command. For example, if the problem is with the /dev/audio device file, issue the command







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">fuser -v /dev/audio</FONT></PRE>







<P>and examine the output to see which processes are currently using the device. Repeat the command for the /dev/dsp device if the /dev/audio device has no conflict.







<BR>







<P>If the device busy error message persists, it is likely a DMA error. Make sure you are not using DMA 0 for the sound card. Some sound cards allow this DMA channel to be chosen, but Linux uses DMA 0 as a special refresh channel for DRAM. Change to DMA channel, reconfigure the kernel, relink, rebuild, reboot, and then test again.







<BR>







<BR>







<A NAME="E69E94"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Incomplete Playing of Sound Files</B></FONT></CENTER></H4>







<BR>







<P>If you only hear a small section of a sound file and then the playing abruptly stops, or you get an error message after a file has started to play, the problem is probably an incorrect IRQ or DMA setting. You may see messages that tell you the IRQ or DMA has timed out.







<BR>







<P>To correct this problem, check the DMA and IRQ values on the sound card and in the configuration files. If the values match, check for a conflict with other devices in your PC. Odds are that the IRQ or DMA is shared with another device (network cards are a common culprit). Change the settings on whichever card is the easiest. (If you already have a network up and running, change the sound card if it will let you.)







<BR>







<BR>







<A NAME="E69E95"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Sounds Stop and Start When Playing</B></FONT></CENTER></H4>







<BR>







<P>Sounds stop and start when playing because the sound card, computer, or hard disk can't keep up with each other. The simplest method of solving this problem is to choose a lower sampling rate or switch to mono. Alternatively, if your system is running many processes (as it will with some games), try eliminating applications you don't need. X applications that run on the desktop are good at gobbling up huge chunks of processor time. Freeing up enough CPU time to support the sound card will help. For a longer-term solution, consider either upgrading your computer to a faster processor or getting a sound card with more capabilities, including on-board RAM.







<BR>







<BR>







<A NAME="E68E59"></A>







<H3 ALIGN=CENTER>







<CENTER>







<FONT SIZE=5 COLOR="#FF0000"><B>Summary</B></FONT></CENTER></H3>







<BR>







<P>The sound card is a useful peripheral when it's properly supported by a Linux application. It is also one of the most frustrating devices to get working properly. If you can use an automated installation utility instead of trying to manually build t<A NAME="I2"></A>he drivers, do so. They will save you a lot of grief!







<BR>







<P>A growing number of applications support sound cards, especially games and X applications, so when you have your sound card properly configured and tested, keep your eye out for them. They make using Linux a lot more interesting.







<P ALIGN=LEFT>























































</td>
</tr>
</table>

<!-- begin footer information -->



</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -