Difference between revisions of "Snd-bt87x"

From MythTV Official Wiki
Jump to: navigation, search
m
 
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{wrongtitle|snd-bt87x}}
 
{{wrongtitle|snd-bt87x}}
----
 
  
 
==What Is It?==
 
==What Is It?==
snd-bt87x is a Linux kernel driver for the Advanced Linux Sound Architecture (ALSA).  It allows you to capture digitized sound directly from a [[bttv]] capture card, without hooking it to your sound card.
+
[[snd-bt87x]] is a Linux kernel driver for the Advanced Linux Sound Architecture ([[ALSA]]).  It allows you to capture digitized sound directly from a bt87x capture card, without hooking it to your sound card.
 +
 
 +
For more information of bt87x capture cards, see [[bttv]].
  
 
For a more generic overview of TV audio-over-PCI, including other (non-bttv) analog cards, see [[PCI TV audio]].
 
For a more generic overview of TV audio-over-PCI, including other (non-bttv) analog cards, see [[PCI TV audio]].
  
 
==Installing the Module==
 
==Installing the Module==
To use the snd-bt87x driver, the driver module needs to be installed.  To see if your Linux distribution has already installed it, try
+
To use the snd-bt87x driver, the driver module needs to be installed.  To see if it is already installed on your system, type
  
<code># find /lib/modules/`uname -r` -name 'snd[-_]bt87x*'
+
# find /lib/modules/`uname -r` -name 'snd[-_]bt87x*'
  
If it returns a filename, the module is installed.  If it doesn't, you will have to get it installed.  To do that, you will probably have to do one of the following:
+
If it returns a filename, the module is installed.  If it doesn't, you will have to install it yourself.  To do that, you will probably have to do one of the following:
 
* install it from a package included with your Linux distribution
 
* install it from a package included with your Linux distribution
 
* build it from the kernel source code included with your Linux distribution
 
* build it from the kernel source code included with your Linux distribution
Line 20: Line 21:
 
Once the module is installed, it needs to be loaded.  To see if your Linux distribution has already loaded it, try
 
Once the module is installed, it needs to be loaded.  To see if your Linux distribution has already loaded it, try
  
<code># lsmod | grep 'snd[-_]bt87x'
+
<pre># lsmod | grep 'snd[-_]bt87x'</pre>
  
 
If it returns one or more lines, the module is already loaded.  If not, you will need to load it yourself.  To do that, try
 
If it returns one or more lines, the module is already loaded.  If not, you will need to load it yourself.  To do that, try
  
<code># modprobe snd-bt87x
+
<pre># modprobe snd-bt87x</pre>
 +
 
 +
If it doesn't give you any errors, use the lsmod command above to confirm that it's loaded.
 +
 
 +
==Making Sure the Module Recognized Your bt87x Card==
 +
Sometimes the driver doesn't recognize a bt87x card.  To make sure that your card was recognized, try
 +
 
 +
<pre># cat /proc/asound/cards</pre>
 +
 
 +
The output should have one or more lines that look something like
 +
 
 +
<pre> 1 [Bt878  ]: Bt87x - Brooktree Bt878</pre>
 +
 
 +
If it doesn't, you can reload the module using the load_all option, so it will recognize more cards.  To do this, do
 +
 
 +
<pre>modprobe -r snd-bt87x; modprobe snd-bt87x load_all=1</pre>
 +
 
 +
Now, the 'cat' command above should show your card.
 +
 
 +
==Making Your System Load the Module When it Boots==
 +
Different Linux distributions use different configuration files to load and configure modules.  Here's what you need to do for some distributions.
 +
 
 +
* Mandriva
 +
** 2007
 +
*** <code>echo "snd-bt87x" >>/etc/modules # load the module on boot</code>
 +
*** <code>echo "options snd-bt87x load_all=1" >>/etc/modprobe.conf # OPTIONAL - if required for your bt87x card</code>
 +
 
 +
== Testing the Driver==
 +
Once the module is loaded, it creates one or more ALSA sound card instances, one for each bt87x card it found.  To see these, type
 +
 
 +
<pre># cat /proc/asound/cards</pre>
 +
 
 +
The number preceding the card you are interested in is the ALSA sound card number.
 +
 
 +
If your system uses [[udev]] or devfs, a corresponding device file might be created automatically.  It will probably be named <code>/dev/dsp</code> for ALSA sound card zero, or <code>/dev/dsp&lt;ALSA_sound_card_number_here&gt;</code>.
 +
 
 +
If the device file has not been created, please refer to the documentation for your Linux distribution to determine how to create it.
 +
 
 +
Once you know the name of the device file, you can try it with:
  
If it doesn't give you any errors, use the lsmod command above to see if it's loaded.
+
<pre># dd if=/dev/dsp1 of=/dev/dsp bs=1K count=33</pre>
  
==Making Sure the Module Saw Your [[bttv]] Card==
+
Assuming that /dev/dsp is your default sound card, and /dev/dsp1 is your bt87x capture card, you should hear about 5 seconds of sound from your bt87x capture card.  If you only hear static, don't worry, your capture card might not have the correct input selected or be tuned to a valid channel.  If the sound you hear is noisy, it might be because the dd command is not meant for playing sound.  It's just a very crude way to test that the driver is working.  If you hear sound, it's probably working fine.
''COMPLETE ME''
 
  
==Making Your System Loads the Module When it Boots==
+
==Using the Driver==
''COMPLETE ME''
+
To use the new ALSA sound card, just configure your application to use the device file as it's input.
  
== Using the Module==
+
For example, in MythTV, when configuring the capture card, just enter the device file where it says '''Audio device:'''.
''COMPLETE ME''
 
  
----
+
* Using in Fedora Core 6
==Card Specific Information==
+
    If using a Hauppauge WinTV DBX 401 w/radio try using /dev/adsp1 as your audio device for capture during setup.
* ATI TV Wonder
+
    If you are fresh installing be aware that the sound may be very grainy and distorted.  Go to the Recording
** I have a plain ATI TV Wonder and snd-bt87x was loading, but not seeing the card. To get it
+
    Profiles and change the Audio Codec to Uncompressed.
  
==Distribution Specific Information==
+
[[Category:Driver]]
* Mandriva Linux 2007
 
**
 

Latest revision as of 06:45, 11 August 2007

Important.png Note: The correct title of this article is snd-bt87x. It appears incorrectly here due to technical restrictions.


What Is It?

snd-bt87x is a Linux kernel driver for the Advanced Linux Sound Architecture (ALSA). It allows you to capture digitized sound directly from a bt87x capture card, without hooking it to your sound card.

For more information of bt87x capture cards, see bttv.

For a more generic overview of TV audio-over-PCI, including other (non-bttv) analog cards, see PCI TV audio.

Installing the Module

To use the snd-bt87x driver, the driver module needs to be installed. To see if it is already installed on your system, type

# find /lib/modules/`uname -r` -name 'snd[-_]bt87x*'

If it returns a filename, the module is installed. If it doesn't, you will have to install it yourself. To do that, you will probably have to do one of the following:

  • install it from a package included with your Linux distribution
  • build it from the kernel source code included with your Linux distribution
  • build it from the ALSA source code (available at http://www.alsa-project.org)

Loading the Module

Once the module is installed, it needs to be loaded. To see if your Linux distribution has already loaded it, try

# lsmod | grep 'snd[-_]bt87x'

If it returns one or more lines, the module is already loaded. If not, you will need to load it yourself. To do that, try

# modprobe snd-bt87x

If it doesn't give you any errors, use the lsmod command above to confirm that it's loaded.

Making Sure the Module Recognized Your bt87x Card

Sometimes the driver doesn't recognize a bt87x card. To make sure that your card was recognized, try

# cat /proc/asound/cards

The output should have one or more lines that look something like

 1 [Bt878  ]: Bt87x - Brooktree Bt878

If it doesn't, you can reload the module using the load_all option, so it will recognize more cards. To do this, do

modprobe -r snd-bt87x; modprobe snd-bt87x load_all=1

Now, the 'cat' command above should show your card.

Making Your System Load the Module When it Boots

Different Linux distributions use different configuration files to load and configure modules. Here's what you need to do for some distributions.

  • Mandriva
    • 2007
      • echo "snd-bt87x" >>/etc/modules # load the module on boot
      • echo "options snd-bt87x load_all=1" >>/etc/modprobe.conf # OPTIONAL - if required for your bt87x card

Testing the Driver

Once the module is loaded, it creates one or more ALSA sound card instances, one for each bt87x card it found. To see these, type

# cat /proc/asound/cards

The number preceding the card you are interested in is the ALSA sound card number.

If your system uses udev or devfs, a corresponding device file might be created automatically. It will probably be named /dev/dsp for ALSA sound card zero, or /dev/dsp<ALSA_sound_card_number_here>.

If the device file has not been created, please refer to the documentation for your Linux distribution to determine how to create it.

Once you know the name of the device file, you can try it with:

# dd if=/dev/dsp1 of=/dev/dsp bs=1K count=33

Assuming that /dev/dsp is your default sound card, and /dev/dsp1 is your bt87x capture card, you should hear about 5 seconds of sound from your bt87x capture card. If you only hear static, don't worry, your capture card might not have the correct input selected or be tuned to a valid channel. If the sound you hear is noisy, it might be because the dd command is not meant for playing sound. It's just a very crude way to test that the driver is working. If you hear sound, it's probably working fine.

Using the Driver

To use the new ALSA sound card, just configure your application to use the device file as it's input.

For example, in MythTV, when configuring the capture card, just enter the device file where it says Audio device:.

  • Using in Fedora Core 6
   If using a Hauppauge WinTV DBX 401 w/radio try using /dev/adsp1 as your audio device for capture during setup.
   If you are fresh installing be aware that the sound may be very grainy and distorted.  Go to the Recording 
   Profiles and change the Audio Codec to Uncompressed.