|
Lines 27-38
Link Here
|
| 27 |
applications allowing you to edit your recorded audio, add sound |
27 |
applications allowing you to edit your recorded audio, add sound |
| 28 |
effects, and control attached MIDI devices.</para> |
28 |
effects, and control attached MIDI devices.</para> |
| 29 |
|
29 |
|
| 30 |
<para>With some willingness to experiment, FreeBSD can support |
30 |
<para>With some experimentation, FreeBSD can support |
| 31 |
playback of video files and DVD's. The number of applications |
31 |
playback of video files and DVD's. The number of applications |
| 32 |
to encode, convert, and playback various video media is more |
32 |
to encode, convert, and playback various video media is more |
| 33 |
limited than the number of sound applications. For example as |
33 |
limited than the number of sound applications. For example as |
| 34 |
of this writing, there is no good re-encoding application in the |
34 |
of this writing, there is no good re-encoding application in the |
| 35 |
FreeBSD Ports Collection, which could be used to convert |
35 |
FreeBSD Ports Collection that can be used to convert |
| 36 |
between formats, as there is with <filename |
36 |
between formats, as there is with <filename |
| 37 |
role="package">audio/sox</filename>. However, the software |
37 |
role="package">audio/sox</filename>. However, the software |
| 38 |
landscape in this area is changing rapidly.</para> |
38 |
landscape in this area is changing rapidly.</para> |
|
Lines 52-59
Link Here
|
| 52 |
</listitem> |
52 |
</listitem> |
| 53 |
|
53 |
|
| 54 |
<listitem> |
54 |
<listitem> |
| 55 |
<para>Methods to test that your card is working using |
55 |
<para>Methods to test whether your card is working.</para> |
| 56 |
sample applications.</para> |
|
|
| 57 |
</listitem> |
56 |
</listitem> |
| 58 |
|
57 |
|
| 59 |
<listitem> |
58 |
<listitem> |
|
Lines 78-84
Link Here
|
| 78 |
</listitem> |
77 |
</listitem> |
| 79 |
|
78 |
|
| 80 |
<listitem> |
79 |
<listitem> |
| 81 |
<para>How to rip CD and DVD information into files.</para> |
80 |
<para>How to rip CD and DVD content into files.</para> |
| 82 |
</listitem> |
81 |
</listitem> |
| 83 |
|
82 |
|
| 84 |
<listitem> |
83 |
<listitem> |
|
Lines 140-146
Link Here
|
| 140 |
FreeBSD supports a wide variety of both PCI and ISA cards. |
139 |
FreeBSD supports a wide variety of both PCI and ISA cards. |
| 141 |
Check the supported audio devices list of the <ulink |
140 |
Check the supported audio devices list of the <ulink |
| 142 |
url="&rel.current.hardware;">Hardware Notes</ulink> to see if |
141 |
url="&rel.current.hardware;">Hardware Notes</ulink> to see if |
| 143 |
your card is supported. This document will also mention which |
142 |
your card is supported. The Hardware Notes will also mention which |
| 144 |
driver supports your card.</para> |
143 |
driver supports your card.</para> |
| 145 |
|
144 |
|
| 146 |
<indexterm> |
145 |
<indexterm> |
|
Lines 190-203
Link Here
|
| 190 |
<sect3> |
189 |
<sect3> |
| 191 |
<title>Configuring a Custom Kernel with Sound Support</title> |
190 |
<title>Configuring a Custom Kernel with Sound Support</title> |
| 192 |
|
191 |
|
| 193 |
<para>The first thing to do is adding the generic audio driver |
192 |
<para>The first thing to do is add the audio framework driver |
| 194 |
&man.sound.4; to the kernel, for that you will need to |
193 |
&man.sound.4; to the kernel; for that you will need to |
| 195 |
add the following line to the kernel configuration file:</para> |
194 |
add the following line to the kernel configuration file:</para> |
| 196 |
|
195 |
|
| 197 |
<programlisting>device sound</programlisting> |
196 |
<programlisting>device sound</programlisting> |
| 198 |
|
197 |
|
| 199 |
<para>Then we have to add the support for our sound card. |
198 |
<para>Next, you have to add the support for your sound card. |
| 200 |
Therefore, we need to know which driver supports the card. |
199 |
Therefore, you need to know which driver supports the card. |
| 201 |
Check the supported audio devices list of the <ulink |
200 |
Check the supported audio devices list of the <ulink |
| 202 |
url="&rel.current.hardware;">Hardware Notes</ulink>, to |
201 |
url="&rel.current.hardware;">Hardware Notes</ulink>, to |
| 203 |
determine the correct driver for your sound card. For |
202 |
determine the correct driver for your sound card. For |
|
Lines 208-231
Link Here
|
| 208 |
<programlisting>device snd_emu10k1</programlisting> |
207 |
<programlisting>device snd_emu10k1</programlisting> |
| 209 |
|
208 |
|
| 210 |
<para>Be sure to read the manual page of the driver for the |
209 |
<para>Be sure to read the manual page of the driver for the |
| 211 |
syntax to use. Information regarding the syntax of sound |
210 |
syntax to use. The explicit syntax for the kernel configuration |
| 212 |
drivers in the kernel configuration can also be found in the |
211 |
of every supported sound driver can also be found in the |
| 213 |
<filename>/usr/src/sys/conf/NOTES</filename> file.</para> |
212 |
<filename>/usr/src/sys/conf/NOTES</filename> file.</para> |
| 214 |
|
213 |
|
| 215 |
<para>Non-PnP ISA cards may require you to provide the kernel |
214 |
<para>Non-PnP ISA sound cards may require you to provide the kernel |
| 216 |
with information on the sound card settings (IRQ, I/O port, |
215 |
with information on the card settings (IRQ, I/O port, |
| 217 |
etc). This is done via the |
216 |
etc), as is true of all non-PnP ISA cards. This is done via the |
| 218 |
<filename>/boot/device.hints</filename> file. At system boot, |
217 |
<filename>/boot/device.hints</filename> file. During the boot process, |
| 219 |
the &man.loader.8; will read this file and pass the settings |
218 |
the &man.loader.8; will read this file and pass the settings |
| 220 |
to the kernel. For example, an old |
219 |
to the kernel. For example, an old |
| 221 |
Creative &soundblaster; 16 ISA non-PnP card will use the |
220 |
Creative &soundblaster; 16 ISA non-PnP card will use the |
| 222 |
&man.snd.sbc.4; driver in conjunction with snd_sb16(4). For this card the following lines have to be added to |
221 |
&man.snd.sbc.4; driver. For this card the following lines must be added to |
| 223 |
the kernel configuration file:</para> |
222 |
the kernel configuration file:</para> |
| 224 |
|
223 |
|
| 225 |
<programlisting>device snd_sbc |
224 |
<programlisting>device snd_sbc |
| 226 |
device snd_sb16</programlisting> |
225 |
device snd_sb16</programlisting> |
| 227 |
|
226 |
|
| 228 |
<para>as well as the following in |
227 |
<para>and these to |
| 229 |
<filename>/boot/device.hints</filename>:</para> |
228 |
<filename>/boot/device.hints</filename>:</para> |
| 230 |
|
229 |
|
| 231 |
<programlisting>hint.sbc.0.at="isa" |
230 |
<programlisting>hint.sbc.0.at="isa" |
|
Lines 239-250
Link Here
|
| 239 |
|
238 |
|
| 240 |
<para>The syntax used in the |
239 |
<para>The syntax used in the |
| 241 |
<filename>/boot/device.hints</filename> file is covered in the |
240 |
<filename>/boot/device.hints</filename> file is covered in the |
| 242 |
sound driver manual page.</para> |
241 |
&man.sound.4; driver manual page and the manual page |
|
|
242 |
for the driver in question.</para> |
| 243 |
|
243 |
|
| 244 |
<para>The settings shown above are the defaults. In some |
244 |
<para>The settings shown above are the defaults. In some |
| 245 |
cases, you may need to change the IRQ or the other settings to |
245 |
cases, you may need to change the IRQ or the other settings to |
| 246 |
match your card. See the &man.snd.sbc.4; manual page for more |
246 |
match your card. See the &man.snd.sbc.4; and &man.snd.gusc.4; |
| 247 |
information.</para> |
247 |
manual pages for more information about these cards.</para> |
| 248 |
</sect3> |
248 |
</sect3> |
| 249 |
</sect2> |
249 |
</sect2> |
| 250 |
|
250 |
|
|
Lines 269-282
Link Here
|
| 269 |
kld snd_ich (1p/2r/0v channels duplex default)</screen> |
269 |
kld snd_ich (1p/2r/0v channels duplex default)</screen> |
| 270 |
|
270 |
|
| 271 |
<para>The output from your system may vary. If no |
271 |
<para>The output from your system may vary. If no |
| 272 |
<devicename>pcm</devicename> devices show up, go back and review |
272 |
<devicename>pcm</devicename> devices are listed, go back and review |
| 273 |
what was done earlier. Go through your kernel |
273 |
what was done earlier. Go through your kernel |
| 274 |
configuration file again and make sure the correct |
274 |
configuration file again and make sure the correct |
| 275 |
device is chosen. Common problems are listed in <xref |
275 |
device driver was chosen. Common problems are listed in <xref |
| 276 |
linkend="troubleshooting">.</para> |
276 |
linkend="troubleshooting">.</para> |
| 277 |
|
277 |
|
| 278 |
<para>If all goes well, you should now have a functioning sound |
278 |
<para>If all goes well, you should now have a functioning sound |
| 279 |
card. If your CD-ROM or DVD-ROM drive is properly coupled to |
279 |
card. If your CD-ROM or DVD-ROM drive's audio-out pins are properly connected to |
| 280 |
your sound card, you can put a CD in the drive and play it |
280 |
your sound card, you can put a CD in the drive and play it |
| 281 |
with &man.cdcontrol.1;:</para> |
281 |
with &man.cdcontrol.1;:</para> |
| 282 |
|
282 |
|
|
Lines 286-293
Link Here
|
| 286 |
role="package">audio/workman</filename> can provide a friendlier |
286 |
role="package">audio/workman</filename> can provide a friendlier |
| 287 |
interface. You may want to install an application such as |
287 |
interface. You may want to install an application such as |
| 288 |
<filename role="package">audio/mpg123</filename> to listen to |
288 |
<filename role="package">audio/mpg123</filename> to listen to |
| 289 |
MP3 audio files. A quick way to test the card is sending data |
289 |
MP3 audio files.</para> |
| 290 |
to the <filename>/dev/dsp</filename>, like this:</para> |
290 |
|
|
|
291 |
<para>Another quick way to test the card is sending data |
| 292 |
to <filename>/dev/dsp</filename>, like this:</para> |
| 291 |
|
293 |
|
| 292 |
<screen>&prompt.user; <userinput>cat <replaceable>filename</replaceable> > /dev/dsp</userinput></screen> |
294 |
<screen>&prompt.user; <userinput>cat <replaceable>filename</replaceable> > /dev/dsp</userinput></screen> |
| 293 |
|
295 |
|
|
Lines 317-328
Link Here
|
| 317 |
</thead> |
319 |
</thead> |
| 318 |
|
320 |
|
| 319 |
<tbody> |
321 |
<tbody> |
| 320 |
<row> |
|
|
| 321 |
<entry><errorname>unsupported subdevice XX</errorname></entry> |
| 322 |
<entry><para>One or more of the device nodes was not created |
| 323 |
correctly. Repeat the steps above.</para></entry> |
| 324 |
</row> |
| 325 |
|
| 326 |
<row> |
322 |
<row> |
| 327 |
<entry><errorname>sb_dspwr(XX) timed out</errorname></entry> |
323 |
<entry><errorname>sb_dspwr(XX) timed out</errorname></entry> |
| 328 |
<entry><para>The I/O port is not set correctly.</para></entry> |
324 |
<entry><para>The I/O port is not set correctly.</para></entry> |
|
Lines 372-380
Link Here
|
| 372 |
sound device with a certain application.</para> |
368 |
sound device with a certain application.</para> |
| 373 |
|
369 |
|
| 374 |
<para>FreeBSD lets you do this through <emphasis>Virtual Sound |
370 |
<para>FreeBSD lets you do this through <emphasis>Virtual Sound |
| 375 |
Channels</emphasis>, which can be set with the &man.sysctl.8; |
371 |
Channels</emphasis>, which can be enabled with the &man.sysctl.8; |
| 376 |
facility. Virtual channels allow you to multiplex your sound |
372 |
facility. Virtual channels allow you to multiplex your sound |
| 377 |
card's playback channels by mixing sound in the kernel.</para> |
373 |
card's playback by mixing sound in the kernel.</para> |
| 378 |
|
374 |
|
| 379 |
<para>To set the number of virtual channels, there are two sysctl |
375 |
<para>To set the number of virtual channels, there are two sysctl |
| 380 |
knobs which, if you are the <username>root</username> user, can |
376 |
knobs which, if you are the <username>root</username> user, can |
|
Lines 406-412
Link Here
|
| 406 |
where <replaceable>x</replaceable> is 0 to 3 if |
402 |
where <replaceable>x</replaceable> is 0 to 3 if |
| 407 |
<varname>hw.snd.pcm.0.vchans</varname> is set to 4 as in the |
403 |
<varname>hw.snd.pcm.0.vchans</varname> is set to 4 as in the |
| 408 |
above example. On a system using &man.devfs.5;, the above will |
404 |
above example. On a system using &man.devfs.5;, the above will |
| 409 |
automatically be allocated transparently to the user.</para> |
405 |
automatically be allocated transparently to a program |
|
|
406 |
that requests <filename>/dev/dsp0</filename>.</para> |
| 410 |
</sect2> |
407 |
</sect2> |
| 411 |
|
408 |
|
| 412 |
<sect2> |
409 |
<sect2> |
|
Lines 424-440
Link Here
|
| 424 |
|
421 |
|
| 425 |
<para>The default values for the different mixer channels are |
422 |
<para>The default values for the different mixer channels are |
| 426 |
hardcoded in the sourcecode of the &man.pcm.4; driver. There are |
423 |
hardcoded in the sourcecode of the &man.pcm.4; driver. There are |
| 427 |
a lot of different applications and daemons that allow |
424 |
many different applications and daemons that allow |
| 428 |
you to set values for the mixer they remember and set |
425 |
you to set values for the mixer that are remembered between |
| 429 |
each time they are started, but this is not a clean |
426 |
invocations, but this is not a clean solution. It is possible |
| 430 |
solution, we want to have default values at the driver |
427 |
to set default mixer values at the driver level — this |
| 431 |
level. This is accomplished by defining the appropriate |
428 |
is accomplished by defining the appropriate |
| 432 |
values in <filename>/boot/device.hints</filename>. E.g.:</para> |
429 |
values in <filename>/boot/device.hints</filename>, e.g.:</para> |
| 433 |
|
430 |
|
| 434 |
<programlisting>hint.pcm.0.vol="100"</programlisting> |
431 |
<programlisting>hint.pcm.0.vol="50"</programlisting> |
| 435 |
|
432 |
|
| 436 |
<para>This will set the volume channel to a default value of |
433 |
<para>This will set the volume channel to a default value of |
| 437 |
100, when the &man.pcm.4; module is loaded.</para> |
434 |
50 when the &man.pcm.4; module is loaded.</para> |
| 438 |
</sect2> |
435 |
</sect2> |
| 439 |
</sect1> |
436 |
</sect1> |