# karta video bttv

## w_lukasz

Mam problem z kartą na chipie bt878.

Karta ładuje mi się jako moduł i jest wszystko ładnie tylko ze nie widzi ustawień modułu z /etc/modules.d/bttv

```
options bttv card=77,77,77,77,77,77 pll=1,1,1,1,1,1 radio=-1 tuner=5,5,5,5,5,5$

options i2c-algo-bit bit_test=1
```

dmesg pokazuje

```
dmesg | grep bttv

bttv: driver version 0.9.16 loaded

bttv: using 8 buffers with 2080k (520 pages) each for capture

bttv: Bt8xx card found (0).

bttv0: Bt878 (rev 17) at 0000:04:08.0, irq: 233, latency: 32, mmio: 0xfdaff000

bttv0: using:  *** UNKNOWN/GENERIC ***  [card=0,autodetected]

bttv0: gpio: en=00000000, out=00000000 in=00f360ff [init]

bttv0: using tuner=-1

bttv0: i2c: checking for MSP34xx @ 0x80... not found

bttv0: i2c: checking for TDA9875 @ 0xb0... not found

bttv0: i2c: checking for TDA7432 @ 0x8a... not found

bttv0: i2c: checking for TDA9887 @ 0x86... not found

bttv0: registered device video0

bttv0: registered device vbi0

bttv: Bt8xx card found (1).

bttv1: Bt878 (rev 17) at 0000:04:09.0, irq: 50, latency: 32, mmio: 0xfdafd000

bttv1: using:  *** UNKNOWN/GENERIC ***  [card=0,autodetected]

bttv1: gpio: en=00000000, out=00000000 in=00f360ff [init]

bttv1: using tuner=-1

bttv1: i2c: checking for MSP34xx @ 0x80... not found

bttv1: i2c: checking for TDA9875 @ 0xb0... not found

bttv1: i2c: checking for TDA7432 @ 0x8a... not found

bttv1: i2c: checking for TDA9887 @ 0x86... <6>EXT3 FS on sda2, internal journal

bttv1: registered device video1

bttv1: registered device vbi1

```

```
lspci

00:00.0 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)

00:00.1 RAM memory: nVidia Corporation C51 Memory Controller 0 (rev a2)

00:00.2 RAM memory: nVidia Corporation C51 Memory Controller 1 (rev a2)

00:00.3 RAM memory: nVidia Corporation C51 Memory Controller 5 (rev a2)

00:00.4 RAM memory: nVidia Corporation C51 Memory Controller 4 (rev a2)

00:00.5 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)

00:00.6 RAM memory: nVidia Corporation C51 Memory Controller 3 (rev a2)

00:00.7 RAM memory: nVidia Corporation C51 Memory Controller 2 (rev a2)

00:02.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)

00:03.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)

00:04.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)

00:05.0 VGA compatible controller: nVidia Corporation C51PV [GeForce 6150] (rev a2)

00:09.0 RAM memory: nVidia Corporation MCP51 Host Bridge (rev a2)

00:0a.0 ISA bridge: nVidia Corporation MCP51 LPC Bridge (rev a3)

00:0a.1 SMBus: nVidia Corporation MCP51 SMBus (rev a3)

00:0a.2 RAM memory: nVidia Corporation MCP51 Memory Controller 0 (rev a3)

00:0b.0 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3)

00:0b.1 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3)

00:0d.0 IDE interface: nVidia Corporation MCP51 IDE (rev a1)

00:0e.0 IDE interface: nVidia Corporation MCP51 Serial ATA Controller (rev a1)

00:0f.0 IDE interface: nVidia Corporation MCP51 Serial ATA Controller (rev a1)

00:10.0 PCI bridge: nVidia Corporation MCP51 PCI Bridge (rev a2)

00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)

00:14.0 Bridge: nVidia Corporation MCP51 Ethernet Controller (rev a3)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

04:08.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)

04:08.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)

04:09.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)

04:09.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)

```

```
 emerge info

*** Deprecated use of action 'info', use '--info' instead

Portage 2.1.2.2 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo-r7 x86_64)

=================================================================

System uname: 2.6.18-gentoo-r7 x86_64 AMD Sempron(tm) Processor 3000+

Gentoo Base System release 1.12.9

Timestamp of tree: Wed, 28 Mar 2007 13:50:01 +0000

dev-lang/python:     2.4.3-r4

dev-python/pycrypto: 2.0.1-r5

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.61

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.14

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.17-r2

ACCEPT_KEYWORDS="amd64"

AUTOCLEAN="yes"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=athlon64 -msse3 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"

CXXFLAGS="-march=athlon64 -msse3 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"

GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://gentoo.prz.rzeszow.pl/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://gentoo.prz.rzeszow.pl http://gentoo.zie.pg.gda.pl http://gentoo.po.opole.pl"

LINGUAS="pl"

MAKEOPTS="-j2 -s"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://gentoo.prz.rzeszow.pl/gentoo-portage"

USE="amd64 apache2 bitmap-fonts bzip2 cli cracklib crypt dri encode exif fbcon ffmpeg gd gdbm gpm iconv isdnlog java javascript jpeg jpeg2k libg++ matroska midi mime mp3 mpeg mpm-prefork mysql ncurses nptl nptlonly ogg oggvorbis pam pcre perl php ppds pppd python quicktime readline reflection samba session spl ssl symlink tcpd theora truetype-fonts type1-fonts unicode usb v4l vcd vorbis wifi xml xml2 xorg xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i810 mga neomagic nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

pierwszy raz mam ta sytuacje przy wczesniejszych instalacjach nie bylo tego problemu. ustawilem pełne prawa do pliku chmod 777 /etc/modules.d/bttv

Próbowałem z róznymi kernelami, za pomocą genkernela, kompilowałem ręcznie. Nie wiem w czym może być problem.

----------

## Gabrys

Może

```
modules-update -f
```

załatwi sprawę.

----------

## w_lukasz

Dostaje cos takiego:

```
 modules-update -f

 * Updating /etc/modules.conf ...

/etc/modules.d/bttv: line 8: options: command not found

/etc/modules.d/bttv: line 9: options: command not found                   [ ok ]

 * Updating /etc/modprobe.conf ...                                        [ ok ]
```

----------

## Gabrys

A zobacz czy w podobnych plikach jest options czy option.

Jest "options" czyli to akurat masz dobrze. Zapodaj całym plikiem /etc/modules.d/bbtv.

----------

## w_lukasz

wpisywalem options i option w man modprobe.conf jest options modulename option... itd na 4 innych kompach mi to działa na roznych wersjach kernela

```
modules-update -f

 * Updating /etc/modules.conf ...                                         [ ok ]

 * Updating /etc/modprobe.conf ...                                        [ ok ]

 * Updating modules.dep ...                                               [ ok ]
```

----------

## Gabrys

To pokaż jeszcze wyniki rmmod bttv i potem modprobe bttv .

----------

## w_lukasz

```
kompik ~ # rmmod bttv

kompik ~ # modprobe bttv

kompik ~ #
```

wyglada ok ale troche dlugo ładuje moduł czy udev moze tu mieć jakieś znaczenie w tamtym kompiku mam coldplug nie mam udev

----------

## Gabrys

Jak ładujesz z palca, tj. modprobe, to nie powinien mieć znaczenia. Wrzuć gdzieś ten /etc/modules.d/bttv, to sobie go obejrzę.

To może Ci się przydać: http://freshmeat.net/projects/gcbttv/

----------

## w_lukasz

```
# bttv

#alias char-major-81   videodev

#alias char-major-81-0   bttv

#options   tuner      debug=0

options bttv card=77,77,77,77,77,77 pll=1,1,1,1,1,1 radio=-1 tuner=5,5,5,5,5,5 gbuffers=16

options i2c-algo-bit bit_test=1

~

~

"/etc/modules.d/bttv" [converted] 9L, 285C                    1,0-1         All
```

te zakomendowane linijki znalazlem w jakims poscie i eksperymentowalem ale tez nie pomaga zawsze wpisuje tylko to odkomendowane

----------

## Gabrys

No właśnie brakuje tego alias. Bo skąd ma wiedzieć modprobe do czego się stosują opcje?

Także odhaszuj aliasy i wtedy modules-update -f i będzie ok.

----------

## w_lukasz

/etc/modules.d/aliases

```
# Aliases to tell insmod/modprobe which modules to use

# Uncomment the network protocols you don't want loaded:

# alias net-pf-1 off            # Unix

# alias net-pf-2 off            # IPv4

# alias net-pf-3 off            # Amateur Radio AX.25

# alias net-pf-4 off            # IPX

# alias net-pf-5 off            # DDP / appletalk

# alias net-pf-6 off            # Amateur Radio NET/ROM

# alias net-pf-9 off            # X.25

# alias net-pf-10 off           # IPv6

# alias net-pf-11 off           # ROSE / Amateur Radio X.25 PLP

# alias net-pf-19 off           # Acorn Econet

alias char-major-10-175 agpgart

alias char-major-10-200 tun

alias char-major-81     bttv

alias char-major-108    ppp_generic

alias /dev/ppp          ppp_generic

alias tty-ldisc-3       ppp_async

alias tty-ldisc-14      ppp_synctty

alias ppp-compress-21   bsd_comp

alias ppp-compress-24   ppp_deflate

alias ppp-compress-26   ppp_deflate

# Crypto modules (see http://www.kerneli.org/)

alias loop-xfer-gen-0   loop_gen

alias loop-xfer-3       loop_fish2

alias loop-xfer-gen-10  loop_gen

alias cipher-2          des

alias cipher-3          fish2

alias cipher-4          blowfish

alias cipher-6          idea

alias cipher-7          serp6f

alias cipher-8          mars6

alias cipher-11         rc62

alias cipher-15         dfc2

alias cipher-16         rijndael

alias cipher-17         rc5

```

/etc/modules.d/bttv

```
alias char-major-81     bttv

#options   tuner      debug=0

#options bttv      radio=1 card=16 tuner=38 pll=0

options bttv card=77,77,77,77,77,77 pll=1,1,1,1,1,1 radio=-1 tuner=5,5,5,5,5,5 gbuffers=16

options i2c-algo-bit bit_test=1
```

modules-update -f 

```
 * Updating /etc/modules.conf ...

/etc/modules.d/bttv: line 4: alias: char-major-81: not found

/etc/modules.d/bttv: line 4: alias: bttv: not found

/etc/modules.d/bttv: line 8: options: command not found

/etc/modules.d/bttv: line 9: options: command not found                                                                                                 [ ok ]

 * Updating /etc/modprobe.conf ...                                                                                                                      [ ok ]

 * Updating modules.dep ... 
```

----------

## w_lukasz

OK dzieki za pomoc juz wszystko ok

/etc/modules.d/bttv wyglada teraz tak

```
# bttv

alias char-major-81     bttv

options bttv card=77,77,77,77,77,77 pll=1,1,1,1,1,1 radio=-1 tuner=5,5,5,5,5,5 gbuffers=16

options i2c-algo-bit bit_test=1

```

```
 dmesg | grep bttv

bttv: driver version 0.9.16 loaded

bttv: using 16 buffers with 2080k (520 pages) each for capture

bttv: Bt8xx card found (0).

bttv0: Bt878 (rev 17) at 0000:04:08.0, irq: 233, latency: 32, mmio: 0xfdaff000

bttv0: using: GrandTec Multi Capture Card (Bt878) [card=77,insmod option]

bttv0: gpio: en=00000000, out=00000000 in=00f360ff [init]

bttv0: using tuner=5

bttv0: registered device video0

bttv0: registered device vbi0

bttv0: registered device radio0

bttv0: PLL: 28636363 => 35468950 ..<6>parport: PnPBIOS parport detected.

bttv: Bt8xx card found (1).

bttv1: Bt878 (rev 17) at 0000:04:09.0, irq: 50, latency: 32, mmio: 0xfdafd000

bttv1: using: GrandTec Multi Capture Card (Bt878) [card=77,insmod option]

bttv1: gpio: en=00000000, out=00000000 in=00f360ff [init]

bttv1: using tuner=5

bttv1: registered device video1

bttv1: registered device vbi1

bttv1: PLL: 28636363 => 35468950 .. ok

```

przełądowanie modułu i jest ok

a zeby pamietało to przy starcie linuxa dopisałem moduł bttv do /etc/modules.autoload.d/kernel-2.6

Dzieki za pomoc. Dziwne tylko ze w tamtych poprzednich 3 kompach chodzi poprawnie bez tego 

```
alias char-major-81     bttv
```

A tak przy okazji bawie sie monitoringiem na Gentoo - sofcik zwie sie Zoneminder - jak by ktos byl zainteresowany

----------

## w_lukasz

kombinuje dalej i wychodzi na to ze wystarczylo wpsiac modul bttv do /etc/modules.autoload.d/kernel-2.6 i nie bylo by tego posta  :Very Happy:  szkoda ze na to nie wpadlem na to wczesniej ale wygladalo na to ze modul jest ładowany i to poprawnie teraz nawet wpsiane tak do /etc/modules.d/bttv działa poprawnie

```
# bttv

#alias char-major-81     bttv

options                 bttv card=77,77,77,77,77,77 pll=1,1,1,1,1,1 radio=-1  tuner=5,5,5,5,5,5 gbuffers=16

options                 i2c-algo-bit bit_test=1

```

chyba sie pobawie i przekompiluje jajko ale i tam dzieki za pomoc

----------

## Gabrys

no to solved.

----------

## milu

Moved from Polish to Instalacja i sprzęt.

----------

