- Various rewordings, style and grammar fixes.

- Some common sense changes: use of 50 instead of 100 for the volume
  channel example.

PR:		docs/114718
Submitted by:	Ben Kaduk <minimarmot@gmail.com>
This commit is contained in:
Marc Fonvieille 2007-07-31 06:23:43 +00:00
parent 8be7ca6e50
commit d19021e367
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=30553

View file

@ -27,7 +27,7 @@
applications allowing you to edit your recorded audio, add sound applications allowing you to edit your recorded audio, add sound
effects, and control attached MIDI devices.</para> effects, and control attached MIDI devices.</para>
<para>With some willingness to experiment, FreeBSD can support <para>With some experimentation, &os; can support
playback of video files and DVD's. The number of applications playback of video files and DVD's. The number of applications
to encode, convert, and playback various video media is more to encode, convert, and playback various video media is more
limited than the number of sound applications. For example as limited than the number of sound applications. For example as
@ -52,8 +52,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para>Methods to test that your card is working using <para>Methods to test whether your card is working.</para>
sample applications.</para>
</listitem> </listitem>
<listitem> <listitem>
@ -78,7 +77,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para>How to rip CD and DVD information into files.</para> <para>How to rip CD and DVD content into files.</para>
</listitem> </listitem>
<listitem> <listitem>
@ -140,7 +139,7 @@
FreeBSD supports a wide variety of both PCI and ISA cards. FreeBSD supports a wide variety of both PCI and ISA cards.
Check the supported audio devices list of the <ulink Check the supported audio devices list of the <ulink
url="&rel.current.hardware;">Hardware Notes</ulink> to see if url="&rel.current.hardware;">Hardware Notes</ulink> to see if
your card is supported. This document will also mention which your card is supported. The Hardware Notes will also mention which
driver supports your card.</para> driver supports your card.</para>
<indexterm> <indexterm>
@ -190,14 +189,14 @@
<sect3> <sect3>
<title>Configuring a Custom Kernel with Sound Support</title> <title>Configuring a Custom Kernel with Sound Support</title>
<para>The first thing to do is adding the generic audio driver <para>The first thing to do is add the audio framework driver
&man.sound.4; to the kernel, for that you will need to &man.sound.4; to the kernel; for that you will need to
add the following line to the kernel configuration file:</para> add the following line to the kernel configuration file:</para>
<programlisting>device sound</programlisting> <programlisting>device sound</programlisting>
<para>Then we have to add the support for our sound card. <para>Next, you have to add the support for your sound card.
Therefore, we need to know which driver supports the card. Therefore, you need to know which driver supports the card.
Check the supported audio devices list of the <ulink Check the supported audio devices list of the <ulink
url="&rel.current.hardware;">Hardware Notes</ulink>, to url="&rel.current.hardware;">Hardware Notes</ulink>, to
determine the correct driver for your sound card. For determine the correct driver for your sound card. For
@ -208,24 +207,24 @@
<programlisting>device snd_emu10k1</programlisting> <programlisting>device snd_emu10k1</programlisting>
<para>Be sure to read the manual page of the driver for the <para>Be sure to read the manual page of the driver for the
syntax to use. Information regarding the syntax of sound syntax to use. The explicit syntax for the kernel configuration
drivers in the kernel configuration can also be found in the of every supported sound driver can also be found in the
<filename>/usr/src/sys/conf/NOTES</filename> file.</para> <filename>/usr/src/sys/conf/NOTES</filename> file.</para>
<para>Non-PnP ISA cards may require you to provide the kernel <para>Non-PnP ISA sound cards may require you to provide the kernel
with information on the sound card settings (IRQ, I/O port, with information on the card settings (IRQ, I/O port,
etc). This is done via the etc), as is true of all non-PnP ISA cards. This is done via the
<filename>/boot/device.hints</filename> file. At system boot, <filename>/boot/device.hints</filename> file. During the boot process,
the &man.loader.8; will read this file and pass the settings the &man.loader.8; will read this file and pass the settings
to the kernel. For example, an old to the kernel. For example, an old
Creative &soundblaster; 16 ISA non-PnP card will use the Creative &soundblaster; 16 ISA non-PnP card will use the
&man.snd.sbc.4; driver in conjunction with snd_sb16(4). For this card the following lines have to be added to &man.snd.sbc.4; driver in conjunction with <literal>snd_sb16</literal>. For this card the following lines must be added to
the kernel configuration file:</para> the kernel configuration file:</para>
<programlisting>device snd_sbc <programlisting>device snd_sbc
device snd_sb16</programlisting> device snd_sb16</programlisting>
<para>as well as the following in <para>and these to
<filename>/boot/device.hints</filename>:</para> <filename>/boot/device.hints</filename>:</para>
<programlisting>hint.sbc.0.at="isa" <programlisting>hint.sbc.0.at="isa"
@ -239,12 +238,13 @@ hint.sbc.0.flags="0x15"</programlisting>
<para>The syntax used in the <para>The syntax used in the
<filename>/boot/device.hints</filename> file is covered in the <filename>/boot/device.hints</filename> file is covered in the
sound driver manual page.</para> &man.sound.4; driver manual page and the manual page
for the driver in question.</para>
<para>The settings shown above are the defaults. In some <para>The settings shown above are the defaults. In some
cases, you may need to change the IRQ or the other settings to cases, you may need to change the IRQ or the other settings to
match your card. See the &man.snd.sbc.4; manual page for more match your card. See the &man.snd.sbc.4; manual page for more
information.</para> information about this card.</para>
</sect3> </sect3>
</sect2> </sect2>
@ -269,14 +269,14 @@ pcm0: &lt;Intel ICH3 (82801CA)&gt; at io 0xd800, 0xdc80 irq 5 bufsz 16384
kld snd_ich (1p/2r/0v channels duplex default)</screen> kld snd_ich (1p/2r/0v channels duplex default)</screen>
<para>The output from your system may vary. If no <para>The output from your system may vary. If no
<devicename>pcm</devicename> devices show up, go back and review <devicename>pcm</devicename> devices are listed, go back and review
what was done earlier. Go through your kernel what was done earlier. Go through your kernel
configuration file again and make sure the correct configuration file again and make sure the correct
device is chosen. Common problems are listed in <xref device driver was chosen. Common problems are listed in <xref
linkend="troubleshooting">.</para> linkend="troubleshooting">.</para>
<para>If all goes well, you should now have a functioning sound <para>If all goes well, you should now have a functioning sound
card. If your CD-ROM or DVD-ROM drive is properly coupled to card. If your CD-ROM or DVD-ROM drive's audio-out pins are properly connected to
your sound card, you can put a CD in the drive and play it your sound card, you can put a CD in the drive and play it
with &man.cdcontrol.1;:</para> with &man.cdcontrol.1;:</para>
@ -286,8 +286,10 @@ kld snd_ich (1p/2r/0v channels duplex default)</screen>
role="package">audio/workman</filename> can provide a friendlier role="package">audio/workman</filename> can provide a friendlier
interface. You may want to install an application such as interface. You may want to install an application such as
<filename role="package">audio/mpg123</filename> to listen to <filename role="package">audio/mpg123</filename> to listen to
MP3 audio files. A quick way to test the card is sending data MP3 audio files.</para>
to the <filename>/dev/dsp</filename>, like this:</para>
<para>Another quick way to test the card is sending data
to <filename>/dev/dsp</filename>, like this:</para>
<screen>&prompt.user; <userinput>cat <replaceable>filename</replaceable> &gt; /dev/dsp</userinput></screen> <screen>&prompt.user; <userinput>cat <replaceable>filename</replaceable> &gt; /dev/dsp</userinput></screen>
@ -317,12 +319,6 @@ kld snd_ich (1p/2r/0v channels duplex default)</screen>
</thead> </thead>
<tbody> <tbody>
<row>
<entry><errorname>unsupported subdevice XX</errorname></entry>
<entry><para>One or more of the device nodes was not created
correctly. Repeat the steps above.</para></entry>
</row>
<row> <row>
<entry><errorname>sb_dspwr(XX) timed out</errorname></entry> <entry><errorname>sb_dspwr(XX) timed out</errorname></entry>
<entry><para>The I/O port is not set correctly.</para></entry> <entry><para>The I/O port is not set correctly.</para></entry>
@ -372,9 +368,9 @@ kld snd_ich (1p/2r/0v channels duplex default)</screen>
sound device with a certain application.</para> sound device with a certain application.</para>
<para>FreeBSD lets you do this through <emphasis>Virtual Sound <para>FreeBSD lets you do this through <emphasis>Virtual Sound
Channels</emphasis>, which can be set with the &man.sysctl.8; Channels</emphasis>, which can be enabled with the &man.sysctl.8;
facility. Virtual channels allow you to multiplex your sound facility. Virtual channels allow you to multiplex your sound
card's playback channels by mixing sound in the kernel.</para> card's playback by mixing sound in the kernel.</para>
<para>To set the number of virtual channels, there are two sysctl <para>To set the number of virtual channels, there are two sysctl
knobs which, if you are the <username>root</username> user, can knobs which, if you are the <username>root</username> user, can
@ -406,7 +402,8 @@ kld snd_ich (1p/2r/0v channels duplex default)</screen>
where <replaceable>x</replaceable> is 0 to 3 if where <replaceable>x</replaceable> is 0 to 3 if
<varname>hw.snd.pcm.0.vchans</varname> is set to 4 as in the <varname>hw.snd.pcm.0.vchans</varname> is set to 4 as in the
above example. On a system using &man.devfs.5;, the above will above example. On a system using &man.devfs.5;, the above will
automatically be allocated transparently to the user.</para> automatically be allocated transparently to a program
that requests <filename>/dev/dsp0</filename>.</para>
</sect2> </sect2>
<sect2> <sect2>
@ -424,17 +421,17 @@ kld snd_ich (1p/2r/0v channels duplex default)</screen>
<para>The default values for the different mixer channels are <para>The default values for the different mixer channels are
hardcoded in the sourcecode of the &man.pcm.4; driver. There are hardcoded in the sourcecode of the &man.pcm.4; driver. There are
a lot of different applications and daemons that allow many different applications and daemons that allow
you to set values for the mixer they remember and set you to set values for the mixer that are remembered between
each time they are started, but this is not a clean invocations, but this is not a clean solution. It is possible
solution, we want to have default values at the driver to set default mixer values at the driver level &mdash; this
level. This is accomplished by defining the appropriate is accomplished by defining the appropriate
values in <filename>/boot/device.hints</filename>. E.g.:</para> values in <filename>/boot/device.hints</filename>, e.g.:</para>
<programlisting>hint.pcm.0.vol="100"</programlisting> <programlisting>hint.pcm.0.vol="50"</programlisting>
<para>This will set the volume channel to a default value of <para>This will set the volume channel to a default value of
100, when the &man.pcm.4; module is loaded.</para> 50 when the &man.pcm.4; module is loaded.</para>
</sect2> </sect2>
</sect1> </sect1>