Driver Installation
Driver Installation Overview
This chapter describes how to install cards and driver.Overview of installation procedure
- Mount capture card
- Download bt848x driver
- Download required library
- Install bt848x driver
- Change system and driver configuration
- Connect video and audio cable
- Test with viewer program
There are 3 methods to install bt848x driver; first is using binary package method. Second is building binaries from source package with own your compile option. And last is building binary package and install it.
Step 1: Mount capture card
Shutdown machine and plug card into PCI slot of workstation/PC. Beware not to skewed or shallowly plugged. Connect audio-out of capture card and line-in of workstation/PC.After boot up, verify device recognition of kernel. Run 'prtconf -pv' command and search node with 'vendor-id = 109e' and 'class-code = 00040000' (this means vendor is Brooktree/Conexant and device is video related stuff). If entry has 'subsystem-id' and 'subsystem-vendor-id' fields, keep it in mind.
Example under SPARC system:
% uname -m sun4u % prtconf -pv ...(snip) Node 0xf00922bc assigned-addresses: 82011010.00000000.03004000.00000000.0000200 0 reg: 00011000.00000000.00000000.00000000.00000000.02011010.0000 0000.00000000.00000000.00002000 compatible: 'pci109e,350.12' + 'pci109e,350' + 'pciclass,040000' + 'pciclass,0400' name: 'video' fast-back-to-back: devsel-speed: 00000001 class-code: 00040000 interrupts: 00000001 latency-timer: 00000040 cache-line-size: 00000000 max-latency: 00000028 min-grant: 00000010 revision-id: 00000012 device-id: 00000350 vendor-id: 0000109e
Step 2: Download bt848x driver
To download bt848x, visit download page in sourceforge.net. Binary package and source package are available.Download page: http://sourceforge.net/project/showfiles.php?group_id=68093
Step 3: Download required library
"Software Requirement" section of "Introduction" chapter describes required library and its distribution sites. Please go back and download them.Step 4: Install bt848x driver
Step 4 method A: Using binary package
- Extract gziped binary package.
% gzip -dc bt848x-platform-x.y.z.pkg.gz | pkgtrans /dev/stdin . all
- Add package using pkgadd command (needs root privilege).
# pkgadd -d . KSWbt8x8
- Erase extracted files.
% rm -r KSWbt8x8
Step 4 method B: Building from source package
- Extract gziped source package.
% gzip -dc bt848x-src-x.y.z.tar.gz | tar xf -
- Change compile options as you like.
- Make and install them.
# make all64 && make install # SPARC # make all32 && make install # SPARC (32-bit target only) # make all86 && make install # x86
Step 4 method C: Building binary package and install
- Extract gziped source package.
% gzip -dc bt848x-src-x.y.z.tar.gz | tar xf -
- Change compile options as you like.
- Make and install them.
# make binpkg64 && make pkg-inst # SPARC # make binpkg32 && make pkg-inst # SPARC (32-bit target only) # make binpkg86 && make pkg-inst # x86
Step 5: Change system and driver configuration
Step 5-a: Increase Shared Memory Size
[Solaris 8 only] Confirm that shared memory segment is larger than 6.1MB. Example (enough size of shared memory):% sysdef | grep SHMMAX 33554432 max shared memory segment size (SHMMAX)If this size is smaller than it, edit or add line to /etc/system like this:
set shmsys:shminfo_shmmax=0x2000000See "System V Shared Memory" in the "Solaris Tunable Parameters Reference Manual" at http://docs.sun.com.
Step 5-b: Edit Driver Configuration File
Driver configuration file is located at /platform/`uname -m`/kernel/drv/bt848x.conf. Configuration file can hold many parameters, please see "Driver Configuration" section for detailed description.Notice: If you changed configuration file, its change will not be reflected immediately.
[Solaris 8] Issue "modunload -i 0" command to unload unused driver. Once unloaded, next open of bt848x device will cause update of driver configuration.
[Solaris 9] Issue "update_drv bt848x" command to update driver configuration.
Step 6: Reboot
Reboot workstation/PC with "-r" option. Solaris will reconfigure /devices and /dev directory. After rebooting, confirm driver installation.- Confirm that driver is attached to kernel using modinfo command.
Example:
% modinfo | grep bt848x 219 78294000 4500 188 1 bt848x (Bt8x8 video grabber x.y.z)
- Confirm what card type driver assumes to be, by using
dmesg command.
If your card is auto-identified, you will get "auto-indent: card
type card_ID <model> (PCI subsytem
subsystem_ID)".
Auto-identified example:
Oct 31 00:18:53 kero bt848x: #0 auto-ident: card type 67, <I-O Data Co. GV-BCV4/PCI> (PCI subsystem ID 0x405010fc)
If your card is not auto-identified and not configured yet, you will get "using generic card attribute". Driver will try to work, but you may need more configurations to use properly.Identified but unconfigured example:
Oct 31 00:18:53 kero bt848x: #0 found Bt878 rev 17 Oct 31 00:18:53 kero bt848x: #0 using generic card attribute
If you have already configured driver manually, you will get "config: card type card_ID, <model>"Manually configured example:
Oct 31 00:18:53 kero bt848x: #0 found Bt878 rev 17 Oct 31 00:18:53 kero bt848x: #0 config: card type 94, <GV-BCTV2/PCI>
- Confirm device file
Check if device file is created under /dev. Exactly speaking, files under /dev are symbolic links to genuine device special file under /devices.Example (SPARC platform):
% ls -l /dev/video* lrwxrwxrwx 1 root other 39 Oct 31 00:18 /dev/video0 -> ../devices/pci@1f,0/pci@5/video@1:video
Example (x86 platform):
% ls -l /dev/video* lrwxrwxrwx 1 root other 39 Nov 8 11:29 /dev/video0 -> ../devices/pci@0,0/pci109e,36e@14:video
Target of symbolic link differs between systems, so please don't mind if it doesn't match exactly.In case it fails, run "devfsadm" command manually as root.
Step 7: Make symbolic link (optional)
bt848x utility executables are installed under /opt/KSWbt8x8/bin/. If you want them in /usr/local/bin/, run /opt/KSWbt8x8/bin/i_prefer_to_usr_local script optionally.Final Step: Test with viewer program
If you've come here, you're ready to try viewer program! Go bravely and carefully.- Viewer produce error message. What?
-
- If device node or symbolic link not created, "initialize_capture: can't open /dev/xxx" is displayed. Retry driver installation.
- If control operation on device failed, "ioctl(XXXX): ..." is displayed. Try changing bt848x.conf. For example, 'tuner-type' parameter is needed to use tuner correctly.
- If "ioctl(VIDIOCGAUDIO): ..." or "ioctl(VIDIOCSAUDIO): ..." is displayed, probably 'audio-mux' or 'audio-inputs' is wrong.
- If "ioctl(VIDIOCGCHAN): ..." or "ioctl(VIDIOCSCHAN): ..." is displayed, probably video-mux' is wrong.
- If "ioctl(VIDIOCGCAP)", "ioctl(VIDIOCGMBUF)" is displayed, probably driver faces unknown situation. Check dmesg output.
- No image (or monotone blue screen) displayed?
- Change video channel by using gtk-v4lctl program or by supplying '-c' (channel) option to viewer.
- No meaningful image displayed?
- First, I suggest not to use tuenr for the first trial.
Output of video game or video tape player or DVD player is preferrable.
Second, try changing video signal standards (=norm) by using gtk-v4lctl program or by supplying '-n' (norm) option to viewer.
As last bet, try changing 'pll' parameter in bt848x.conf
- No sound?
- Try connecting audio-out of capture card and another audio equipment.
If card doesn't produce sound, you probably need adjust 'gpio-mask',
'audio-mux'.
If capture card produce sound, you probably forget to enable recording monitor of sound card. Supply '-A' option to viewer or use audiocontrol command.
- [x86 only] Warning message in dmesg: "IRQx is being shared by drivers with different interrupt levels."
- Too many interrupt levels are required in your system and IRQ signal are shared. Adjust IRQ assignment in BIOS configuration. bt848x driver itself does not need 'fast' interrupt service.
- [x86 only] Warning message in dmesg: "btx_attach: allocated only 2 buffers"
- Driver failed to allocate DMA buffers. Try increase system memory. Or change value of NR_FRAMES from 3 to 2 (This is black magic that requires compile procedure). It is defined in drv/bt848.h
- Warning message in dmesg: "WARNING: cannot merge prototype from
pcixxxx,xxxx.conf"
- Warning message in dmesg: "WARNING: cannot find reg property in pcixxxx,xxxx"
- If you met these messege in x86 platform, you don't have to worry about because bt848x driver can have multiple names but doesn't have alias.
Uninstallation
If you want to uninstall bt848x, you should have installed using package. If so, proceed following instructions.- Unplug card. Of course, you should turn off machine first ;-)
- Run /opt/KSWbt8x8/bin/i_prefer_to_usr_local -r to remove symbolic links under /usr/local.
- Remove package using pkgrm command (needs root privilege).
# pkgrm KSWbt8x8