Snd-bt87x (alsa bt878 driver): Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
m (Snd-bt87x information by Michael Papet)
No edit summary
Line 1: Line 1:
The rumor is that snd-bt87x is the ALSA driver that replaces the legacy btaudio.
The rumor is that snd-bt87x is the ALSA driver that replaces the legacy btaudio.


When setting up the driver, find and delete any defaults that may be present that would make getting the sound to work a challenge. For example, in Debian, there is a mapping string in /etc/modprobe.d/aliases that maps bttv devices to -2 to get them "out of the way" of the default sound card.
When setting up the driver, find and delete any defaults that may be present that would make getting the sound to work a challenge. For example, in Debian, there is a mapping stanza in /etc/modprobe.d/aliases that maps bttv devices to -2 to get them "out of the way" of the default sound card. Further research suggests the -2 has special meaning in ALSA. It is interpreted as, take the next device number available after any other device. In order to keep track of which sound device is the first,second, etc., it is advised to comment out stanzas with the -2 designation and define card0, card1, etch with index= kernel options.




Line 7: Line 7:


== Rough instructions to enable snd-bt87x audio ==
== Rough instructions to enable snd-bt87x audio ==
'''1: Pre-installation Debugging'''

Before inserting the card, you need to make some kernel options load by default when the system boots. In Debian, that is accomplished by adding a text file to /etc/modprobe.d/. This can vary depending on your distro. Just know where and how you need to add the kernel options.
Before inserting the card, you need to make some kernel options load by default when the system boots. In Debian, that is accomplished by adding a text file to /etc/modprobe.d/. This can vary depending on your distro. Just know where and how you need to add the kernel options. Do not edit the files ALSA generates. Create new ones.


Before inserting the card, enable all debug options for the bttv, snd-bt87x, and bt878. If you have already inserted the card, add the kernel option to your system. You need to be sure your primary sound card is given an index=0 kernel option and the snd-bt87x is given an index value of 1 (or greater) and has the ''load_all'' option. ex. snd-bt87x index=1 id=bttv load_all appears in my /etc/modprobe.d/bttv file. The id= option is helpful to name your cards. Sound rate options may need to be set. Then make sure the module is loaded when booting. For Debian, I add snd-bt87x to /etc/modules.
Before inserting the card, enable all debug options for the bttv, snd-bt87x, and bt878. If you have already inserted the card, add the kernel option to your system. You need to be sure your primary sound card is given an index=0 kernel option and the snd-bt87x is given an index value of 1 (or greater) and has the ''load_all'' option. ex. snd-bt87x index=1 id=bttv load_all appears in my /etc/modprobe.d/bttv file. The id= option is helpful to name your cards. Sound rate options may need to be set. Then make sure the module is loaded when booting. For Debian, I add snd-bt87x to /etc/modules.
Line 14: Line 14:
If your primary volume is not down low, then turn your audio waaaay down before shutting off your PC. It's possible for the sound capture to come on right away with TV capture volume on 11. (See Spinal Tap for the "It goes to 11" reference)
If your primary volume is not down low, then turn your audio waaaay down before shutting off your PC. It's possible for the sound capture to come on right away with TV capture volume on 11. (See Spinal Tap for the "It goes to 11" reference)


'''2: Hardware Configuration'''
If your card has internal connectors to send audio to an open plug on your sound card, then plug them in and note the name of the connector. (usually Aux) If it does not, you will need a patch cord running from the back of the tv card to your sound card's capture port.
If your card has internal connectors to send audio to an open plug on your sound card, then plug them in and note the name of the connector. (usually Aux) If it does not, you will need a patch cord running from the back of the tv card to your sound card's capture port.


'''3: Post Installation Testing'''
After booting, open a terminal and type "dmesg | grep bt" (no quotes) That will give you all of the output related to the tv card. Your kernel should have no problems finding the card and giving it device nodes. At minimum, /dev/video0 should be created. If dmesg does not at least detect the card, then chances are good the card does not have the bare minimum to function at all under Linux. Despite the ubiquity of bttv-based cards, it is still possible that your card is not supported.
After booting, open a terminal and type "dmesg | grep bt" (no quotes) That will give you all of the output related to the tv card. Your kernel should have no problems finding the card and giving it device nodes. At minimum, /dev/video0 should be created. If dmesg does not at least detect the card, then chances are good the card does not have the bare minimum to function at all under Linux. Despite the ubiquity of bttv-based cards, it is still possible that your card is not supported.


Check to see what devices have been made available for alsa a couple of ways. In the console, arecord -l should show at least one capture interface. Depending on the amount of support, amixer -c 1 should give a list of some controls from the snd-bt87x device. The "-c 1" option is the index number set in the kernel options.
Check to see what devices have been made available for alsa a couple of ways. Note, this doesn't mean the device works with all of the features advertised from the Windows world. It just means that ALSA/Linux detects the device. (Welcome to the fascinating world of device driver hacking!) In the console, arecord -l should show at least one capture interface. Depending on the amount of support, amixer -c 1 should give a list of some controls from the snd-bt87x device. The "-c 1" option is the index number set in the kernel options. You can also check /proc/asound for the device names you set with the kernel options in pre-configuration.



It is probably the case that capture will need to be enabled in alsamixer for the plug you connected your card's audio. In a terminal, type alsamixer and press F4. Move the cursor to the device that may be capturing the audio and press the space bar. If capture and output are working, then sound should come out quietly at first when you return to the main mixer gui and turn up the capture volume.
To see if audio actually works in some fashion, it is probably the case that capture will need to be enabled in alsamixer for the plug you connected your card's audio. In a terminal, type alsamixer and press F4. Move the cursor to the device that may be capturing the audio and press the space bar. If capture and output are working, then sound should come out quietly at first when you return to the main mixer gui and turn up the capture volume. If your card is really well supported, stereo audio may be available and you may even be able to use arecord to capture audio directly from the device.


Play with the the master volume and capture volumes to get things right for you. Then remove the debug options you enabled at the beginning.
Play with the the master volume and capture volumes to get things right for you. Then remove the debug options you enabled at the beginning.

Revision as of 15:54, 29 May 2008

The rumor is that snd-bt87x is the ALSA driver that replaces the legacy btaudio.

When setting up the driver, find and delete any defaults that may be present that would make getting the sound to work a challenge. For example, in Debian, there is a mapping stanza in /etc/modprobe.d/aliases that maps bttv devices to -2 to get them "out of the way" of the default sound card. Further research suggests the -2 has special meaning in ALSA. It is interpreted as, take the next device number available after any other device. In order to keep track of which sound device is the first,second, etc., it is advised to comment out stanzas with the -2 designation and define card0, card1, etch with index= kernel options.


Functional sound is still a lottery because of the wide variety of card designs using the bttv framegrabber and the unknown number of actively maintained drivers from kernel version to kernel version. Mythtv has good information on what is supported with their application. In theory, this wiki is supposed to have better information, but there are many gaps. That's your chance to create a page for your card. Please take a few moments to contribute!

Rough instructions to enable snd-bt87x audio

1: Pre-installation Debugging Before inserting the card, you need to make some kernel options load by default when the system boots. In Debian, that is accomplished by adding a text file to /etc/modprobe.d/. This can vary depending on your distro. Just know where and how you need to add the kernel options. Do not edit the files ALSA generates. Create new ones.

Before inserting the card, enable all debug options for the bttv, snd-bt87x, and bt878. If you have already inserted the card, add the kernel option to your system. You need to be sure your primary sound card is given an index=0 kernel option and the snd-bt87x is given an index value of 1 (or greater) and has the load_all option. ex. snd-bt87x index=1 id=bttv load_all appears in my /etc/modprobe.d/bttv file. The id= option is helpful to name your cards. Sound rate options may need to be set. Then make sure the module is loaded when booting. For Debian, I add snd-bt87x to /etc/modules.

If your primary volume is not down low, then turn your audio waaaay down before shutting off your PC. It's possible for the sound capture to come on right away with TV capture volume on 11. (See Spinal Tap for the "It goes to 11" reference)

2: Hardware Configuration If your card has internal connectors to send audio to an open plug on your sound card, then plug them in and note the name of the connector. (usually Aux) If it does not, you will need a patch cord running from the back of the tv card to your sound card's capture port.

3: Post Installation Testing After booting, open a terminal and type "dmesg | grep bt" (no quotes) That will give you all of the output related to the tv card. Your kernel should have no problems finding the card and giving it device nodes. At minimum, /dev/video0 should be created. If dmesg does not at least detect the card, then chances are good the card does not have the bare minimum to function at all under Linux. Despite the ubiquity of bttv-based cards, it is still possible that your card is not supported.

Check to see what devices have been made available for alsa a couple of ways. Note, this doesn't mean the device works with all of the features advertised from the Windows world. It just means that ALSA/Linux detects the device. (Welcome to the fascinating world of device driver hacking!) In the console, arecord -l should show at least one capture interface. Depending on the amount of support, amixer -c 1 should give a list of some controls from the snd-bt87x device. The "-c 1" option is the index number set in the kernel options. You can also check /proc/asound for the device names you set with the kernel options in pre-configuration.


To see if audio actually works in some fashion, it is probably the case that capture will need to be enabled in alsamixer for the plug you connected your card's audio. In a terminal, type alsamixer and press F4. Move the cursor to the device that may be capturing the audio and press the space bar. If capture and output are working, then sound should come out quietly at first when you return to the main mixer gui and turn up the capture volume. If your card is really well supported, stereo audio may be available and you may even be able to use arecord to capture audio directly from the device.

Play with the the master volume and capture volumes to get things right for you. Then remove the debug options you enabled at the beginning.

This page needs more information, formatting and editing assistance. Please contribute!