From owner-svn-doc-head@FreeBSD.ORG Sun Oct 13 19:40:11 2013 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2961366B; Sun, 13 Oct 2013 19:40:11 +0000 (UTC) (envelope-from dru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 15B6F23B5; Sun, 13 Oct 2013 19:40:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9DJeB1x061140; Sun, 13 Oct 2013 19:40:11 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9DJeBYq061139; Sun, 13 Oct 2013 19:40:11 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201310131940.r9DJeBYq061139@svn.freebsd.org> From: Dru Lavigne Date: Sun, 13 Oct 2013 19:40:11 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r42949 - head/en_US.ISO8859-1/books/handbook/multimedia X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2013 19:40:11 -0000 Author: dru Date: Sun Oct 13 19:40:10 2013 New Revision: 42949 URL: http://svnweb.freebsd.org/changeset/doc/42949 Log: This patch does the following: - comments out some authors - tightens up some headings - some word-smithing - changes examples to more modern sound cards Approved by: bcr (mentor) Modified: head/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml Sun Oct 13 11:44:18 2013 (r42948) +++ head/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml Sun Oct 13 19:40:10 2013 (r42949) @@ -61,7 +61,7 @@ - Playback DVDs, .mpg, and + Play DVDs, .mpg, and .avi files. @@ -80,52 +80,38 @@ Configure an image scanner. - - - How to configure an image scanner. - Before reading this chapter, you should: - Know how to configure and install a new kernel - (). - - - - Audio CDs have specialized encodings which differ from the - usual ISO-filesystem. This means that they should not be - mounted using &man.mount.8;. - - + Know how to install applications as described in + . + + + Contributed by in November 2000 Marc Fonvieille - Enhanced by - + Enhanced by in September 2004 + --> Setting Up the Sound Card - - Configuring the System - PCI sound cards Before beginning the configuration, determine the model of @@ -140,19 +126,19 @@ configuration - In order to use the sound device, the proper device driver - must be loaded. This may be accomplished in one of two ways. + In order to use the sound device, its device driver + must be loaded. The easiest way is to load a kernel module for the sound card with &man.kldload.8;. This example loads the driver for a - Creative &soundblaster; Live! sound card: + built-in audio chipset based on the Intel specification: - &prompt.root; kldload snd_emu10k1 + &prompt.root; kldload snd_hda To automate the loading of this driver at boot time, add the driver to /boot/loader.conf. The line for this driver is: - snd_emu10k1_load="YES" + snd_hda_load="YES" Other available sound modules are listed in /boot/defaults/loader.conf. When unsure @@ -171,32 +157,28 @@ after loading the snd_driver metadriver, type cat /dev/sndstat. - Users who prefer to statically compile in support for the - sound card in a custom kernel should refer to the instructions - in the next section. For more information about recompiling a - kernel, refer to . - - + Configuring a Custom Kernel with Sound Support + This section is for users who prefer to statically compile in support for the + sound card in a custom kernel. For more information about recompiling a + kernel, refer to . + When using a custom kernel to provide sound support, make sure that the audio framework driver exists in the custom kernel configuration file: device sound - Next, add support for the sound card. Therefore, you need - to know which driver supports the card. To continue the example - of the Creative &soundblaster; Live! sound card from the + Next, add support for the sound card. To continue the example + of the built-in audio chipset based on the Intel specification from the previous section, use the following line in the custom kernel configuration file: - device snd_emu10k1 + device snd_hda Be sure to read the manual page of the driver for the - syntax to use. The explicit syntax for the kernel - configuration of every supported sound driver can also be - found in /usr/src/sys/conf/NOTES. + device name to use for the driver. Non-PnP ISA sound cards may require the IRQ and I/O port settings of the card to be added to @@ -233,57 +215,62 @@ hint.sbc.0.flags="0x15" cases, the IRQ or other settings may need to be changed to match the card. Refer to &man.snd.sbc.4; for more information about this card. - - Testing the Sound Card + Testing Sound - After rebooting into the custom kernel, or after loading - the required module, the sound card should appear in the system - message buffer. Run &man.dmesg.8; and look for a message - like: - - pcm0: <Intel ICH3 (82801CA)> port 0xdc80-0xdcbf,0xd800-0xd8ff irq 5 at device 31.5 on pci0 -pcm0: [GIANT-LOCKED] -pcm0: <Cirrus Logic CS4205 AC97 Codec> + After loading + the required module or rebooting into the custom kernel, + the sound card should be detected. + To confirm, run dmesg | grep pcm. This + example is from a system with a built-in Conexant CX20590 chipset: + + pcm0: <NVIDIA (0x001c) (HDMI/DP 8ch)> at nid 5 on hdaa0 +pcm1: <NVIDIA (0x001c) (HDMI/DP 8ch)> at nid 6 on hdaa0 +pcm2: <Conexant CX20590 (Analog 2.0+HP/2.0)> at nid 31,25 and 35,27 on hdaa1 The status of the sound card may also be checked using this command: &prompt.root; cat /dev/sndstat -FreeBSD Audio Driver (newpcm) +FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) Installed devices: -pcm0: <Intel ICH3 (82801CA)> at io 0xd800, 0xdc80 irq 5 bufsz 16384 -kld snd_ich (1p/2r/0v channels duplex default) - - The output may vary between systems. If no - pcm devices are listed, go back and - review the kernel configuration file and make sure the correct - device driver was chosen. Common problems are listed in . +pcm0: <NVIDIA (0x001c) (HDMI/DP 8ch)> (play) +pcm1: <NVIDIA (0x001c) (HDMI/DP 8ch)> (play) +pcm2: <Conexant CX20590 (Analog 2.0+HP/2.0)> (play/rec) default + + The output will vary depending upon the sound card. If no + pcm devices are listed, double-check that the correct + device driver was loaded or compiled into the kernel. The + next section lists some common problems and their solutions. If all goes well, the sound card should now work in os;. If - the CD-ROM or DVD-ROM drive's audio-out pins are properly + the CD or DVD drive is properly connected to the sound card, one can insert an audio CD in the drive and play it with &man.cdcontrol.1;: &prompt.user; cdcontrol -f /dev/acd0 play 1 + + Audio CDs have specialized encodings which means that they should not be + mounted using &man.mount.8;. + + Various applications, such as audio/workman provide a friendlier + role="package">audio/workman, provide a friendlier interface. The audio/mpg123 port can be installed to listen to MP3 audio files. Another quick way to test the card is to send data to - /dev/dsp: + /dev/dsp: &prompt.user; cat filename > /dev/dsp where filename can - be any file. This command should produce some noise, confirming - that the sound card is actually working. + be any type of file. This command should produce some noise, confirming + that the sound card is working. The /dev/dsp* device nodes will @@ -291,19 +278,21 @@ kld snd_ich (1p/2r/0v channels duplex de do not exist and will not appear in the output of &man.ls.1;. + - Sound card mixer levels can be changed using &man.mixer.8;. - More details can be found in &man.mixer.8;. - - - Common Problems + + Troubleshooting Sound device nodes I/O port IRQ DSP - + Table 8.1 lists some common error messages and their + solutions: + + + Common Error Messages @@ -337,8 +326,8 @@ kld snd_ich (1p/2r/0v channels duplex de xxx: can't open /dev/dsp! - Check with fstat | grep - dsp if another application is holding the + Type fstat | grep + dsp to check if another application is holding the device open. Noteworthy troublemakers are esound and KDE's sound @@ -346,13 +335,13 @@ kld snd_ich (1p/2r/0v channels duplex de - +
- Another issue is that modern graphics cards often come - with their own sound driver, for use with - HDMI and similar. This sound device will - sometimes be enumerated before the sound card and the sound - card will subsequently not be used as the default playback + Modern graphics cards often come + with their own sound driver for use with + HDMI. This sound device is + sometimes enumerated before the sound card meaning that the sound + card will not be used as the default playback device. To check if this is the case, run dmesg and look for pcm. The output looks something like @@ -376,7 +365,7 @@ pcm6: <HDA Realtek ALC889 PCM #2 Digi pcm7: <HDA Realtek ALC889 PCM #3 Digital> at cad 2 nid 1 on hdac1 ... - Here the graphics card (NVidia) has + In this example, the graphics card (NVidia) has been enumerated before the sound card (Realtek ALC889). To use the sound card as the default playback device, change hw.snd.default_unit @@ -384,17 +373,17 @@ pcm7: <HDA Realtek ALC889 PCM #3 Digi &prompt.root; sysctl hw.snd.default_unit=n - Here, n is the number of the sound + where n is the number of the sound device to use. In this example, it should be 4. Make this change permanent by adding the following line to /etc/sysctl.conf: hw.snd.default_unit=4 -
+ Utilizing Multiple Sound Sources It is often desirable to have multiple sources of sound that - are able to play simultaneously. &os; uses Virtual - Sound Channels, which can be enabled using - &man.sysctl.8;. Virtual channels allow one to multiplex the + are able to play simultaneously. &os; uses Virtual + Sound Channels to multiplex the sound card's playback by mixing sound in the kernel. - To set the number of virtual channels, three - &man.sysctl.8; knobs are available: + Three + &man.sysctl.8; knobs are available for configuring virtual channels: &prompt.root; sysctl dev.pcm.0.play.vchans=4 &prompt.root; sysctl dev.pcm.0.rec.vchans=4 &prompt.root; sysctl hw.snd.maxautovchans=4 - The above example allocates four virtual channels, which + This example allocates four virtual channels, which is a practical number for everyday use. Both dev.pcm.0.play.vchans=4 and - dev.pcm.0.rec.vchans=4 are the number of + dev.pcm.0.rec.vchans=4 are configurable after a device has been + attached and represent the number of virtual channels pcm0 has for playback - and recording, and are configurable after a device has been - attached. hw.snd.maxautovchans is the number - of virtual channels a new audio device is given when it is - attached using &man.kldload.8;. Since the + and recording. Since the pcm module can be loaded independently of the hardware drivers, hw.snd.maxautovchans - indicates how many virtual channels will be given to devices - when they are attached. Refer to &man.pcm.4; for more + indicates how many virtual channels will be given to an audio device + when it is attached. Refer to &man.pcm.4; for more information. @@ -447,6 +434,7 @@ pcm7: <HDA Realtek ALC889 PCM #3 Digi + Setting Default Values for Mixer Channels The default values for the different mixer channels are - hardcoded in the source code of the &man.pcm.4; driver. There - are many different applications and daemons that allow values to - be set for the mixer that are remembered between invocations, - but this is not a clean solution. It is possible to set default - mixer values at the driver level. This is accomplished by - defining the appropriate values in + hardcoded in the source code of the &man.pcm.4; driver. While + sound card mixer levels can be changed using &man.mixer.8; or + third-party applications and daemons, this is not a permanent solution. + To instead set default + mixer values at the driver level, + define the appropriate values in /boot/device.hints, as seen in this example: @@ -478,16 +467,17 @@ pcm7: <HDA Realtek ALC889 PCM #3 Digi
+ + --> MP3 Audio