diff --git a/en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml b/en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml index 36b5d05984..655bf25f3c 100644 --- a/en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml @@ -1,567 +1,578 @@ Moses Moore Contributed by Sound Synopsis FreeBSD supports a wide variety of sound cards, allowing you to enjoy high fidelity output from your computer. This includes the ability to record and playback audio in the MPEG Audio Layer 3 (MP3), WAV, and Ogg Vorbis formats as well as many other formats. The FreeBSD Ports Collection also contains applications allowing you to edit your recorded audio, add sound effects, and control attached MIDI devices. After reading this chapter, you will know: How to locate your sound card. How to configure your system so that your sound card is recognized. Methods to test that your card is working using sample applications. How to troubleshoot your sound setup. How to playback and encode MP3s. How to rip CD audio tracks into data files. Before reading this chapter, you should: Know how to configure and install a new kernel (). Locating the Correct Device PCI ISA sound cards Before you begin, you should know the model of the card you have, the chip it uses, and whether it is a PCI or ISA card. - FreeBSD supports a wide variety of both PCI and ISA cards. If you - do not see your card in the following list, check the &man.pcm.4; - manual page. This is not a complete list; however, it does list - some of the most common cards. + FreeBSD supports a wide variety of both PCI and ISA cards. If + you do not see your card in the following list, check the + &man.pcm.4; manual page. This is not a complete list; however, + it does list some of the most common cards. Crystal 4237, 4236, 4232, 4231 Yamaha OPL-SAx OPTi931 Ensoniq AudioPCI 1370/1371 ESS Solo-1/1E NeoMagic 256AV/ZX Sound Blaster Pro, 16, 32, AWE64, AWE128, Live Creative ViBRA16 Advanced Asound 100, 110, and Logic ALS120 ES 1868, 1869, 1879, 1888 Gravis UltraSound Aureal Vortex 1 or 2 kernel configuration To use your sound device, you will need to load the proper device driver. This may be accomplished in one of two ways. The easiest way is to simply load a kernel module for your sound card with &man.kldload.8;. Alternatively, you may statically compile in support for your sound card in your kernel. The sections below provide the information you need to add support for your hardware in this manner. For more information about recompiling your kernel, please see . Creative, Advance, and ESS Sound Cards If you have one of the above cards, you will need to add: device pcm to your kernel configuration file. If you have a PnP ISA card, you will also need to add: device sbc For a non-PnP ISA card, add: device pcm device sbc0 at isa? port 0x220 irq 5 drq 1 flags 0x15 to your kernel configuration file. The settings shown above are the defaults. You may need to change the IRQ or the other settings to match your card. See the &man.sbc.4; manual page for more information. The Sound Blaster Live is not supported under FreeBSD 4.0 without a patch, which this section will not cover. It is recommended that you update to the latest -STABLE before trying to use this card. Gravis UltraSound Cards For a PnP ISA card, you will need to add: device pcm device gusc - to your kernel configuration file. If you have a non-PnP ISA card, you will - need to add: + to your kernel configuration file. If you have a non-PnP + ISA card, you will need to add: device pcm device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13 to your kernel configuration file. You may need to change the IRQ or the other settings to match your card. See the &man.gusc.4; manual page for more information. Crystal Sound Cards For Crystal cards, you will need to add: device pcm device csa to your kernel configuration file. Generic Support For PnP ISA or PCI cards, you will need to add: device pcm - to your kernel configuration file. If you have a non-PnP ISA - sound card that does not have a bridge driver, you will need - to add: + to your kernel configuration file. If you have a non-PnP + ISA sound card that does not have a bridge driver, you will + need to add: device pcm0 at isa? irq 10 drq 1 flags 0x0 to your kernel configuration file. You may need to change the IRQ or the other settings to match your card. Onboard Sound Some systems with built-in motherboard sound devices may require the following option in your kernel configuration: options PNPBIOS Creating and Testing the Device Nodes device nodes - After you reboot, log in and run dmesg | grep pcm as shown - below: + After you reboot, log in and run dmesg | grep + pcm as shown below: &prompt.root; dmesg | grep pcm pcm0: <SB16 DSP 4.11> on sbc0 The output from your system may look different. If no - pcm devices show up, something went wrong - earlier. If that happens, go through your kernel configuration - file again and make sure you chose the correct device. Consult - the troubleshooting section for additional options. + pcm devices show up, something went + wrong earlier. If that happens, go through your kernel + configuration file again and make sure you chose the correct + device. Consult the troubleshooting section for additional + options. - If the previous command returned pcm0, - you will have to run the following as root: + If the previous command returned + pcm0, you will have to run the + following as root: &prompt.root; cd /dev &prompt.root; sh MAKEDEV snd0 If the command returned pcm1, follow the same steps as shown above, replacing snd0 with snd1. The above commands will not create a /dev/snd device! MAKEDEV will create a group of device nodes, including: Device Description /dev/audio SPARC-compatible audio device /dev/dsp Digitized voice device /dev/dspW Like /dev/dsp, but 16 bits per sample /dev/midi Raw midi access device /dev/mixer Control port mixer device /dev/music Level 2 sequencer interface /dev/sequencer Sequencer device /dev/pss Programmable device interface If all goes well, you should now have a functioning sound card. You may want to install an application such as audio/mpg123 to listen to audio files. Common Problems Error Solution device node unsupported subdevice XX One or more of the device nodes was not created - correctly. Repeat the steps above. + correctly. Repeat the steps above. I/O port sb_dspwr(XX) timed out The I/O port is not set correctly. IRQ bad irq XX The IRQ is set incorrectly. Make sure that the set IRQ and the sound IRQ are the same. xxx: gus pcm not attached, out of memory There is not enough available memory to use the device. Chern Lee Contributed by MP3 Audio MP3 (MPEG Layer 3 Audio) accomplishes near CD-quality sound, leaving no reason to let your FreeBSD workstation fall short of its offerings. MP3 Players By far, the most popular XFree86 MP3 player is XMMS (X Multimedia System). WinAmp skins can be used with XMMS since the GUI is almost identical to that of Nullsoft Winamp's. XMMS also has native plug-in support. XMMS can be installed from the audio/xmms port or package. - XMMS' interface is intuitive, with - a playlist, graphic equalizer, and more. Those familiar with WinAmp - will find XMMS simple to use. + XMMS' interface is intuitive, + with a playlist, graphic equalizer, and more. Those familiar + with WinAmp will find + XMMS simple to use. The audio/mpg123 port is an alternative, command-line MP3 player. - mpg123 can be run by specifying the - sound device and the MP3 file on the command line, as shown below: + mpg123 can be run by specifying + the sound device and the MP3 file on the command line, as + shown below: &prompt.root; mpg123 -a /dev/dsp1.0 Foobar-GreatestHits.mp3 High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3. Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp. Uses code from various people. See 'README' for more! THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK! Playing MPEG stream from BT - Foobar-GreastHits.mp3 ... MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo /dev/dsp1.0 should be replaced with the dsp device entry on your system. Ripping CD Audio Tracks Before encoding a CD or CD track to MP3, the audio data on the CD must be ripped onto the hard drive. This is done by copying the raw CDDA (CD Digital Audio) data to WAV files. - The cdda2wav tool, which is a part of the - sysutils/cdrtools suite, is used for ripping audio - information of CDs and the information associated with it. + The cdda2wav tool, which is a part of + the sysutils/cdrtools suite, is used for ripping + audio information of CDs and the information associated with + it. - With the audio CD in the drive, the following command - can be issued (as root) to rip an entire - CD into individual (per track) WAV files: + With the audio CD in the drive, the following command can + be issued (as root) to rip an entire CD + into individual (per track) WAV files: &prompt.root; cdda2wav -D 0,1,0 -B The - indicates the SCSI device 0,1,0, which - corresponds to the output of cdrecord - -scanbus. + indicates the SCSI device 0,1,0, + which corresponds to the output of cdrecord + -scanbus. To rip individual tracks, make use of the option as shown: &prompt.root; cdda2wav -D 0,1,0 -t 7 - This example rips track seven of the audio CDROM. To rip a range - of tracks, for example, track one to seven, specify a range: + This example rips track seven of the audio CDROM. To rip + a range of tracks, for example, track one to seven, specify a + range: &prompt.root; cdda2wav -D 0,1,0 -t 1+7 cdda2wav only supports SCSI CDROM drives. For IDE drives, try out audio/cdd or some of the various other utilities in the audio ports collection. Encoding MP3s Nowadays, the mp3 encoder of choice is lame. Lame can be found at audio/lame in the ports tree. Using the ripped WAV files, the following command will convert audio01.wav to audio01.mp3: &prompt.root; lame -h -b 128 \ --tt "Foo Song Title" \ --ta "FooBar Artist" \ --tl "FooBar Album" \ --ty "2001" \ --tc "Ripped and encoded by Foo" \ --tg "Genre" \ audio01.wav audio01.mp3 128 kbits seems to be the standard MP3 bitrate in use. Many enjoy the higher quality 160, or 192. The higher the - bitrate, the more disk space the resulting MP3 will consume--but - the quality will be higher. The option - turns on the higher quality but a little slower - mode. The options beginning with indicate - ID3 tags, which usually contain song information, to be embedded - within the MP3 file. Additional encoding options can be found - by consulting the lame man page. + bitrate, the more disk space the resulting MP3 will + consume--but the quality will be higher. The + option turns on the higher quality + but a little slower mode. The options beginning with + indicate ID3 tags, which usually contain + song information, to be embedded within the MP3 file. + Additional encoding options can be found by consulting the + lame man page. Decoding MP3s - In order to burn an audio CD from MP3s, they must be converted - to a non-compressed WAV format. Both XMMS - and mpg123 support the output of MP3 to + In order to burn an audio CD from MP3s, they must be + converted to a non-compressed WAV format. Both + XMMS and + mpg123 support the output of MP3 to an uncompressed file format. Writing to Disk in XMMS: Launch XMMS. Right-click on the window to bring up the XMMS menu. Select Preference under Options. Change the Output Plugin to Disk Writer Plugin. Press Configure. Enter (or choose browse) a directory to write the uncompressed files to. Load the MP3 file into XMMS as usual, with volume at 100% and EQ settings turned off. - Press PlayXMMS - will appear as if it is playing the MP3, but no music will be heard. It - is actually playing the MP3 to a file. + Press Play — + XMMS will appear as if it is + playing the MP3, but no music will be heard. It is + actually playing the MP3 to a file. - Be sure to set the default Output Plugin back to what it was before - in order to listen to MP3s again. + Be sure to set the default Output Plugin back to what + it was before in order to listen to MP3s again. Writing to stdout in mpg123: Run mpg123 -s audio01.mp3 > audio01.pcm - XMMS writes a file in the WAV format, while - mpg123 converts the MP3 into raw PCM audio data. - Both of these formats can be used with cdrecord - or burncd to create audio CDROMs. + XMMS writes a file in the WAV + format, while mpg123 converts the + MP3 into raw PCM audio data. Both of these formats can be + used with cdrecord or + burncd to create audio + CDROMs. Read for more information on using a CD burner in FreeBSD. diff --git a/en_US.ISO8859-1/books/handbook/sound/chapter.sgml b/en_US.ISO8859-1/books/handbook/sound/chapter.sgml index 36b5d05984..655bf25f3c 100644 --- a/en_US.ISO8859-1/books/handbook/sound/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/sound/chapter.sgml @@ -1,567 +1,578 @@ Moses Moore Contributed by Sound Synopsis FreeBSD supports a wide variety of sound cards, allowing you to enjoy high fidelity output from your computer. This includes the ability to record and playback audio in the MPEG Audio Layer 3 (MP3), WAV, and Ogg Vorbis formats as well as many other formats. The FreeBSD Ports Collection also contains applications allowing you to edit your recorded audio, add sound effects, and control attached MIDI devices. After reading this chapter, you will know: How to locate your sound card. How to configure your system so that your sound card is recognized. Methods to test that your card is working using sample applications. How to troubleshoot your sound setup. How to playback and encode MP3s. How to rip CD audio tracks into data files. Before reading this chapter, you should: Know how to configure and install a new kernel (). Locating the Correct Device PCI ISA sound cards Before you begin, you should know the model of the card you have, the chip it uses, and whether it is a PCI or ISA card. - FreeBSD supports a wide variety of both PCI and ISA cards. If you - do not see your card in the following list, check the &man.pcm.4; - manual page. This is not a complete list; however, it does list - some of the most common cards. + FreeBSD supports a wide variety of both PCI and ISA cards. If + you do not see your card in the following list, check the + &man.pcm.4; manual page. This is not a complete list; however, + it does list some of the most common cards. Crystal 4237, 4236, 4232, 4231 Yamaha OPL-SAx OPTi931 Ensoniq AudioPCI 1370/1371 ESS Solo-1/1E NeoMagic 256AV/ZX Sound Blaster Pro, 16, 32, AWE64, AWE128, Live Creative ViBRA16 Advanced Asound 100, 110, and Logic ALS120 ES 1868, 1869, 1879, 1888 Gravis UltraSound Aureal Vortex 1 or 2 kernel configuration To use your sound device, you will need to load the proper device driver. This may be accomplished in one of two ways. The easiest way is to simply load a kernel module for your sound card with &man.kldload.8;. Alternatively, you may statically compile in support for your sound card in your kernel. The sections below provide the information you need to add support for your hardware in this manner. For more information about recompiling your kernel, please see . Creative, Advance, and ESS Sound Cards If you have one of the above cards, you will need to add: device pcm to your kernel configuration file. If you have a PnP ISA card, you will also need to add: device sbc For a non-PnP ISA card, add: device pcm device sbc0 at isa? port 0x220 irq 5 drq 1 flags 0x15 to your kernel configuration file. The settings shown above are the defaults. You may need to change the IRQ or the other settings to match your card. See the &man.sbc.4; manual page for more information. The Sound Blaster Live is not supported under FreeBSD 4.0 without a patch, which this section will not cover. It is recommended that you update to the latest -STABLE before trying to use this card. Gravis UltraSound Cards For a PnP ISA card, you will need to add: device pcm device gusc - to your kernel configuration file. If you have a non-PnP ISA card, you will - need to add: + to your kernel configuration file. If you have a non-PnP + ISA card, you will need to add: device pcm device gus0 at isa? port 0x220 irq 5 drq 1 flags 0x13 to your kernel configuration file. You may need to change the IRQ or the other settings to match your card. See the &man.gusc.4; manual page for more information. Crystal Sound Cards For Crystal cards, you will need to add: device pcm device csa to your kernel configuration file. Generic Support For PnP ISA or PCI cards, you will need to add: device pcm - to your kernel configuration file. If you have a non-PnP ISA - sound card that does not have a bridge driver, you will need - to add: + to your kernel configuration file. If you have a non-PnP + ISA sound card that does not have a bridge driver, you will + need to add: device pcm0 at isa? irq 10 drq 1 flags 0x0 to your kernel configuration file. You may need to change the IRQ or the other settings to match your card. Onboard Sound Some systems with built-in motherboard sound devices may require the following option in your kernel configuration: options PNPBIOS Creating and Testing the Device Nodes device nodes - After you reboot, log in and run dmesg | grep pcm as shown - below: + After you reboot, log in and run dmesg | grep + pcm as shown below: &prompt.root; dmesg | grep pcm pcm0: <SB16 DSP 4.11> on sbc0 The output from your system may look different. If no - pcm devices show up, something went wrong - earlier. If that happens, go through your kernel configuration - file again and make sure you chose the correct device. Consult - the troubleshooting section for additional options. + pcm devices show up, something went + wrong earlier. If that happens, go through your kernel + configuration file again and make sure you chose the correct + device. Consult the troubleshooting section for additional + options. - If the previous command returned pcm0, - you will have to run the following as root: + If the previous command returned + pcm0, you will have to run the + following as root: &prompt.root; cd /dev &prompt.root; sh MAKEDEV snd0 If the command returned pcm1, follow the same steps as shown above, replacing snd0 with snd1. The above commands will not create a /dev/snd device! MAKEDEV will create a group of device nodes, including: Device Description /dev/audio SPARC-compatible audio device /dev/dsp Digitized voice device /dev/dspW Like /dev/dsp, but 16 bits per sample /dev/midi Raw midi access device /dev/mixer Control port mixer device /dev/music Level 2 sequencer interface /dev/sequencer Sequencer device /dev/pss Programmable device interface If all goes well, you should now have a functioning sound card. You may want to install an application such as audio/mpg123 to listen to audio files. Common Problems Error Solution device node unsupported subdevice XX One or more of the device nodes was not created - correctly. Repeat the steps above. + correctly. Repeat the steps above. I/O port sb_dspwr(XX) timed out The I/O port is not set correctly. IRQ bad irq XX The IRQ is set incorrectly. Make sure that the set IRQ and the sound IRQ are the same. xxx: gus pcm not attached, out of memory There is not enough available memory to use the device. Chern Lee Contributed by MP3 Audio MP3 (MPEG Layer 3 Audio) accomplishes near CD-quality sound, leaving no reason to let your FreeBSD workstation fall short of its offerings. MP3 Players By far, the most popular XFree86 MP3 player is XMMS (X Multimedia System). WinAmp skins can be used with XMMS since the GUI is almost identical to that of Nullsoft Winamp's. XMMS also has native plug-in support. XMMS can be installed from the audio/xmms port or package. - XMMS' interface is intuitive, with - a playlist, graphic equalizer, and more. Those familiar with WinAmp - will find XMMS simple to use. + XMMS' interface is intuitive, + with a playlist, graphic equalizer, and more. Those familiar + with WinAmp will find + XMMS simple to use. The audio/mpg123 port is an alternative, command-line MP3 player. - mpg123 can be run by specifying the - sound device and the MP3 file on the command line, as shown below: + mpg123 can be run by specifying + the sound device and the MP3 file on the command line, as + shown below: &prompt.root; mpg123 -a /dev/dsp1.0 Foobar-GreatestHits.mp3 High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3. Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp. Uses code from various people. See 'README' for more! THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK! Playing MPEG stream from BT - Foobar-GreastHits.mp3 ... MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo /dev/dsp1.0 should be replaced with the dsp device entry on your system. Ripping CD Audio Tracks Before encoding a CD or CD track to MP3, the audio data on the CD must be ripped onto the hard drive. This is done by copying the raw CDDA (CD Digital Audio) data to WAV files. - The cdda2wav tool, which is a part of the - sysutils/cdrtools suite, is used for ripping audio - information of CDs and the information associated with it. + The cdda2wav tool, which is a part of + the sysutils/cdrtools suite, is used for ripping + audio information of CDs and the information associated with + it. - With the audio CD in the drive, the following command - can be issued (as root) to rip an entire - CD into individual (per track) WAV files: + With the audio CD in the drive, the following command can + be issued (as root) to rip an entire CD + into individual (per track) WAV files: &prompt.root; cdda2wav -D 0,1,0 -B The - indicates the SCSI device 0,1,0, which - corresponds to the output of cdrecord - -scanbus. + indicates the SCSI device 0,1,0, + which corresponds to the output of cdrecord + -scanbus. To rip individual tracks, make use of the option as shown: &prompt.root; cdda2wav -D 0,1,0 -t 7 - This example rips track seven of the audio CDROM. To rip a range - of tracks, for example, track one to seven, specify a range: + This example rips track seven of the audio CDROM. To rip + a range of tracks, for example, track one to seven, specify a + range: &prompt.root; cdda2wav -D 0,1,0 -t 1+7 cdda2wav only supports SCSI CDROM drives. For IDE drives, try out audio/cdd or some of the various other utilities in the audio ports collection. Encoding MP3s Nowadays, the mp3 encoder of choice is lame. Lame can be found at audio/lame in the ports tree. Using the ripped WAV files, the following command will convert audio01.wav to audio01.mp3: &prompt.root; lame -h -b 128 \ --tt "Foo Song Title" \ --ta "FooBar Artist" \ --tl "FooBar Album" \ --ty "2001" \ --tc "Ripped and encoded by Foo" \ --tg "Genre" \ audio01.wav audio01.mp3 128 kbits seems to be the standard MP3 bitrate in use. Many enjoy the higher quality 160, or 192. The higher the - bitrate, the more disk space the resulting MP3 will consume--but - the quality will be higher. The option - turns on the higher quality but a little slower - mode. The options beginning with indicate - ID3 tags, which usually contain song information, to be embedded - within the MP3 file. Additional encoding options can be found - by consulting the lame man page. + bitrate, the more disk space the resulting MP3 will + consume--but the quality will be higher. The + option turns on the higher quality + but a little slower mode. The options beginning with + indicate ID3 tags, which usually contain + song information, to be embedded within the MP3 file. + Additional encoding options can be found by consulting the + lame man page. Decoding MP3s - In order to burn an audio CD from MP3s, they must be converted - to a non-compressed WAV format. Both XMMS - and mpg123 support the output of MP3 to + In order to burn an audio CD from MP3s, they must be + converted to a non-compressed WAV format. Both + XMMS and + mpg123 support the output of MP3 to an uncompressed file format. Writing to Disk in XMMS: Launch XMMS. Right-click on the window to bring up the XMMS menu. Select Preference under Options. Change the Output Plugin to Disk Writer Plugin. Press Configure. Enter (or choose browse) a directory to write the uncompressed files to. Load the MP3 file into XMMS as usual, with volume at 100% and EQ settings turned off. - Press PlayXMMS - will appear as if it is playing the MP3, but no music will be heard. It - is actually playing the MP3 to a file. + Press Play — + XMMS will appear as if it is + playing the MP3, but no music will be heard. It is + actually playing the MP3 to a file. - Be sure to set the default Output Plugin back to what it was before - in order to listen to MP3s again. + Be sure to set the default Output Plugin back to what + it was before in order to listen to MP3s again. Writing to stdout in mpg123: Run mpg123 -s audio01.mp3 > audio01.pcm - XMMS writes a file in the WAV format, while - mpg123 converts the MP3 into raw PCM audio data. - Both of these formats can be used with cdrecord - or burncd to create audio CDROMs. + XMMS writes a file in the WAV + format, while mpg123 converts the + MP3 into raw PCM audio data. Both of these formats can be + used with cdrecord or + burncd to create audio + CDROMs. Read for more information on using a CD burner in FreeBSD.