Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: docs: update bttv.rst information

This document is... old. The bttv driver was one of the first
drivers at the Kernel. So, the document became a little obsoleted.

Update it to reflect some changes that happened along the time
affecting this driver and the subsystem.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

+133 -178
+133 -178
Documentation/admin-guide/media/bttv.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 + =============== 3 4 The bttv driver 4 5 =============== 5 6 6 7 Release notes for bttv 7 8 ---------------------- 8 9 9 - You'll need at least these config options for bttv: 10 + You'll need at least these config options for bttv:: 10 11 11 - .. code-block:: none 12 + ./scripts/config -e PCI 13 + ./scripts/config -m I2C 14 + ./scripts/config -m INPUT 15 + ./scripts/config -m MEDIA_SUPPORT 16 + ./scripts/config -e MEDIA_PCI_SUPPORT 17 + ./scripts/config -e MEDIA_ANALOG_TV_SUPPORT 18 + ./scripts/config -e MEDIA_DIGITAL_TV_SUPPORT 19 + ./scripts/config -e MEDIA_RADIO_SUPPORT 20 + ./scripts/config -e RC_CORE 21 + ./scripts/config -m VIDEO_BT848 12 22 13 - CONFIG_I2C=m 14 - CONFIG_I2C_ALGOBIT=m 15 - CONFIG_VIDEO_DEV=m 23 + If your board has digital TV, you'll also need:: 16 24 17 - The latest bttv version is available from http://bytesex.org/bttv/ 25 + ./scripts/config -m DVB_BT8XX 18 26 27 + In this case, please see :doc:`bt8xx` for additional notes. 19 28 20 29 Make bttv work with your card 21 30 ----------------------------- 22 31 23 - Just try "modprobe bttv" and see if that works. 32 + If you have bttv compiled and installed, just booting the Kernel 33 + should be enough for it to try probing it. However, depending 34 + on the model, the Kernel may require additional information about 35 + the hardware, as the device may not be able to provide such info 36 + directly to the Kernel. 24 37 25 38 If it doesn't bttv likely could not autodetect your card and needs some 26 39 insmod options. The most important insmod option for bttv is "card=n" 27 40 to select the correct card type. If you get video but no sound you've 28 41 very likely specified the wrong (or no) card type. A list of supported 29 - cards is in CARDLIST.bttv 42 + cards is in :doc:`bttv-cardlist`. 30 43 31 44 If bttv takes very long to load (happens sometimes with the cheap 32 - cards which have no tuner), try adding this to your modules.conf: 33 - 34 - .. code-block:: none 45 + cards which have no tuner), try adding this to your modules configuration 46 + file (usually, it is either ``/etc/modules.conf`` or some file at 47 + ``/etc/modules-load.d/``, but the actual place depends on your 48 + distribution):: 35 49 36 50 options i2c-algo-bit bit_test=1 37 51 38 - For the WinTV/PVR you need one firmware file from the driver CD: 39 - hcwamc.rbf. The file is in the pvr45xxx.exe archive (self-extracting 40 - zip file, unzip can unpack it). Put it into the /etc/pvr directory or 41 - use the firm_altera=<path> insmod option to point the driver to the 42 - location of the file. 52 + Some cards may require an extra firmware file to work. For example, 53 + for the WinTV/PVR you need one firmware file from its driver CD, 54 + called: ``hcwamc.rbf``. It is inside a self-extracting zip file 55 + called ``pvr45xxx.exe``. Just placing it at the ``/etc/firmware`` 56 + directory should be enough for it to be autoload during the driver's 57 + probing mode (e. g. when the Kernel boots or when the driver is 58 + manually loaded via ``modprobe`` command). 43 59 44 - If your card isn't listed in CARDLIST.bttv or if you have trouble making 45 - audio work, you should read the Sound-FAQ. 60 + If your card isn't listed in :doc:`bttv-cardlist` or if you have 61 + trouble making audio work, please read :ref:`still_doesnt_work`. 46 62 47 63 48 64 Autodetecting cards ··· 77 61 only bt878-based cards can have a subsystem ID (which does not mean 78 62 that every card really has one). bt848 cards can't have a Subsystem 79 63 ID and therefore can't be autodetected. There is a list with the ID's 80 - in bttv-cards.c (in case you are intrested or want to mail patches 81 - with updates). 64 + at :doc:`bttv-cardlist` (in case you are intrested or want to mail 65 + patches with updates). 82 66 67 + 68 + .. _still_doesnt_work: 83 69 84 70 Still doesn't work? 85 71 ------------------- ··· 89 71 I do NOT have a lab with 30+ different grabber boards and a 90 72 PAL/NTSC/SECAM test signal generator at home, so I often can't 91 73 reproduce your problems. This makes debugging very difficult for me. 74 + 92 75 If you have some knowledge and spare time, please try to fix this 93 76 yourself (patches very welcome of course...) You know: The linux 94 77 slogan is "Do it yourself". ··· 111 92 Modprobe options 112 93 ---------------- 113 94 114 - Note: "modinfo <module>" prints various information about a kernel 115 - module, among them a complete and up-to-date list of insmod options. 116 - This list tends to be outdated because it is updated manually ... 95 + .. note:: 117 96 118 - ========================================================================== 119 97 120 - bttv.o 98 + The following argument list can be outdated, as we might add more 99 + options if ever needed. In case of doubt, please check with 100 + ``modinfo <module>``. 121 101 122 - .. code-block:: none 102 + This command prints various information about a kernel 103 + module, among them a complete and up-to-date list of insmod options. 123 104 124 - the bt848/878 (grabber chip) driver 125 105 126 - insmod args: 127 - card=n card type, see CARDLIST for a list. 128 - tuner=n tuner type, see CARDLIST for a list. 129 - radio=0/1 card supports radio 130 - pll=0/1/2 pll settings 131 - 0: don't use PLL 132 - 1: 28 MHz crystal installed 133 - 2: 35 MHz crystal installed 134 106 135 - triton1=0/1 for Triton1 (+others) compatibility 136 - vsfx=0/1 yet another chipset bug compatibility bit 137 - see README.quirks for details on these two. 107 + bttv 108 + The bt848/878 (grabber chip) driver 138 109 139 - bigendian=n Set the endianness of the gfx framebuffer. 140 - Default is native endian. 141 - fieldnr=0/1 Count fields. Some TV descrambling software 142 - needs this, for others it only generates 143 - 50 useless IRQs/sec. default is 0 (off). 144 - autoload=0/1 autoload helper modules (tuner, audio). 145 - default is 1 (on). 146 - bttv_verbose=0/1/2 verbose level (at insmod time, while 147 - looking at the hardware). default is 1. 148 - bttv_debug=0/1 debug messages (for capture). 149 - default is 0 (off). 150 - irq_debug=0/1 irq handler debug messages. 151 - default is 0 (off). 152 - gbuffers=2-32 number of capture buffers for mmap'ed capture. 153 - default is 4. 154 - gbufsize= size of capture buffers. default and 155 - maximum value is 0x208000 (~2MB) 156 - no_overlay=0 Enable overlay on broken hardware. There 157 - are some chipsets (SIS for example) which 158 - are known to have problems with the PCI DMA 159 - push used by bttv. bttv will disable overlay 160 - by default on this hardware to avoid crashes. 161 - With this insmod option you can override this. 162 - no_overlay=1 Disable overlay. It should be used by broken 163 - hardware that doesn't support PCI2PCI direct 164 - transfers. 165 - automute=0/1 Automatically mutes the sound if there is 166 - no TV signal, on by default. You might try 167 - to disable this if you have bad input signal 168 - quality which leading to unwanted sound 169 - dropouts. 170 - chroma_agc=0/1 AGC of chroma signal, off by default. 171 - adc_crush=0/1 Luminance ADC crush, on by default. 172 - i2c_udelay= Allow reduce I2C speed. Default is 5 usecs 173 - (meaning 66,67 Kbps). The default is the 174 - maximum supported speed by kernel bitbang 175 - algorithm. You may use lower numbers, if I2C 176 - messages are lost (16 is known to work on 177 - all supported cards). 110 + insmod args:: 178 111 179 - bttv_gpio=0/1 180 - gpiomask= 181 - audioall= 182 - audiomux= 183 - See Sound-FAQ for a detailed description. 112 + card=n card type, see CARDLIST for a list. 113 + tuner=n tuner type, see CARDLIST for a list. 114 + radio=0/1 card supports radio 115 + pll=0/1/2 pll settings 116 + 117 + 0: don't use PLL 118 + 1: 28 MHz crystal installed 119 + 2: 35 MHz crystal installed 120 + 121 + triton1=0/1 for Triton1 (+others) compatibility 122 + vsfx=0/1 yet another chipset bug compatibility bit 123 + see README.quirks for details on these two. 124 + 125 + bigendian=n Set the endianness of the gfx framebuffer. 126 + Default is native endian. 127 + fieldnr=0/1 Count fields. Some TV descrambling software 128 + needs this, for others it only generates 129 + 50 useless IRQs/sec. default is 0 (off). 130 + autoload=0/1 autoload helper modules (tuner, audio). 131 + default is 1 (on). 132 + bttv_verbose=0/1/2 verbose level (at insmod time, while 133 + looking at the hardware). default is 1. 134 + bttv_debug=0/1 debug messages (for capture). 135 + default is 0 (off). 136 + irq_debug=0/1 irq handler debug messages. 137 + default is 0 (off). 138 + gbuffers=2-32 number of capture buffers for mmap'ed capture. 139 + default is 4. 140 + gbufsize= size of capture buffers. default and 141 + maximum value is 0x208000 (~2MB) 142 + no_overlay=0 Enable overlay on broken hardware. There 143 + are some chipsets (SIS for example) which 144 + are known to have problems with the PCI DMA 145 + push used by bttv. bttv will disable overlay 146 + by default on this hardware to avoid crashes. 147 + With this insmod option you can override this. 148 + no_overlay=1 Disable overlay. It should be used by broken 149 + hardware that doesn't support PCI2PCI direct 150 + transfers. 151 + automute=0/1 Automatically mutes the sound if there is 152 + no TV signal, on by default. You might try 153 + to disable this if you have bad input signal 154 + quality which leading to unwanted sound 155 + dropouts. 156 + chroma_agc=0/1 AGC of chroma signal, off by default. 157 + adc_crush=0/1 Luminance ADC crush, on by default. 158 + i2c_udelay= Allow reduce I2C speed. Default is 5 usecs 159 + (meaning 66,67 Kbps). The default is the 160 + maximum supported speed by kernel bitbang 161 + algorithm. You may use lower numbers, if I2C 162 + messages are lost (16 is known to work on 163 + all supported cards). 164 + 165 + bttv_gpio=0/1 166 + gpiomask= 167 + audioall= 168 + audiomux= 169 + See Sound-FAQ for a detailed description. 184 170 185 171 remap, card, radio and pll accept up to four comma-separated arguments 186 172 (for multiple boards). 187 173 188 - tuner.o 189 - 190 - .. code-block:: none 191 - 174 + tuner 192 175 The tuner driver. You need this unless you want to use only 193 - with a camera or external tuner ... 176 + with a camera or the board doesn't provide analog TV tuning. 194 177 195 - insmod args: 178 + insmod args:: 179 + 196 180 debug=1 print some debug info to the syslog 197 181 type=n type of the tuner chip. n as follows: 198 182 see CARDLIST for a complete list. 199 183 pal=[bdgil] select PAL variant (used for some tuners 200 184 only, important for the audio carrier). 201 185 202 - tvaudio.o 186 + tvaudio 187 + Provide a single driver for all simple i2c audio control 188 + chips (tda/tea*). 203 189 204 - .. code-block:: none 190 + insmod args:: 205 191 206 - new, experimental module which is supported to provide a single 207 - driver for all simple i2c audio control chips (tda/tea*). 208 - 209 - insmod args: 210 192 tda8425 = 1 enable/disable the support for the 211 193 tda9840 = 1 various chips. 212 194 tda9850 = 1 The tea6300 can't be autodetected and is ··· 220 200 the wrong one. 221 201 debug = 1 print debug messages 222 202 223 - insmod args for tda9874a: 224 - tda9874a_SIF=1/2 select sound IF input pin (1 or 2) 225 - (default is pin 1) 226 - tda9874a_AMSEL=0/1 auto-mute select for NICAM (default=0) 227 - Please read note 3 below! 228 - tda9874a_STD=n select TV sound standard (0..8): 229 - 0 - A2, B/G 230 - 1 - A2, M (Korea) 231 - 2 - A2, D/K (1) 232 - 3 - A2, D/K (2) 233 - 4 - A2, D/K (3) 234 - 5 - NICAM, I 235 - 6 - NICAM, B/G 236 - 7 - NICAM, D/K (default) 237 - 8 - NICAM, L 238 - 239 - Note 1: tda9874a supports both tda9874h (old) and tda9874a (new) chips. 240 - Note 2: tda9874h/a and tda9875 (which is supported separately by 241 - tda9875.o) use the same i2c address so both modules should not be 242 - used at the same time. 243 - Note 3: Using tda9874a_AMSEL option depends on your TV card design! 244 - AMSEL=0: auto-mute will switch between NICAM sound 245 - and the sound on 1st carrier (i.e. FM mono or AM). 246 - AMSEL=1: auto-mute will switch between NICAM sound 247 - and the analog mono input (MONOIN pin). 248 - If tda9874a decoder on your card has MONOIN pin not connected, then 249 - use only tda9874_AMSEL=0 or don't specify this option at all. 250 - For example: 251 - card=65 (FlyVideo 2000S) - set AMSEL=1 or AMSEL=0 252 - card=72 (Prolink PV-BT878P rev.9B) - set AMSEL=0 only 253 - 254 - msp3400.o 255 - 256 - .. code-block:: none 257 - 203 + msp3400 258 204 The driver for the msp34xx sound processor chips. If you have a 259 205 stereo card, you probably want to insmod this one. 260 206 261 - insmod args: 207 + insmod args:: 208 + 262 209 debug=1/2 print some debug info to the syslog, 263 210 2 is more verbose. 264 211 simple=1 Use the "short programming" method. Newer ··· 238 251 amsound=1 Audio carrier is AM/NICAM at 6.5 Mhz. This 239 252 should improve things for french people, the 240 253 carrier autoscan seems to work with FM only... 241 - 242 - tea6300.o - OBSOLETE (use tvaudio instead) 243 - 244 - .. code-block:: none 245 - 246 - The driver for the tea6300 fader chip. If you have a stereo 247 - card and the msp3400.o doesn't work, you might want to try this 248 - one. This chip is seen on most STB TV/FM cards (usually from 249 - Gateway OEM sold surplus on auction sites). 250 - 251 - insmod args: 252 - debug=1 print some debug info to the syslog. 253 - 254 - tda8425.o - OBSOLETE (use tvaudio instead) 255 - 256 - .. code-block:: none 257 - 258 - The driver for the tda8425 fader chip. This driver used to be 259 - part of bttv.c, so if your sound used to work but does not 260 - anymore, try loading this module. 261 - 262 - insmod args: 263 - debug=1 print some debug info to the syslog. 264 - 265 - tda985x.o - OBSOLETE (use tvaudio instead) 266 - 267 - .. code-block:: none 268 - 269 - The driver for the tda9850/55 audio chips. 270 - 271 - insmod args: 272 - debug=1 print some debug info to the syslog. 273 - chip=9850/9855 set the chip type. 274 - 275 254 276 255 If the box freezes hard with bttv 277 256 --------------------------------- ··· 259 306 With a hard freeze you probably doesn't find anything in the logfiles. 260 307 The only way to capture any kernel messages is to hook up a serial 261 308 console and let some terminal application log the messages. /me uses 262 - screen. See Documentation/admin-guide/serial-console.rst for details on setting 309 + screen. See :doc:`/admin-guide/serial-console` for details on setting 263 310 up a serial console. 264 311 265 - Read Documentation/admin-guide/bug-hunting.rst to learn how to get any useful 312 + Read :doc:`/admin-guide/bug-hunting` to learn how to get any useful 266 313 information out of a register+stack dump printed by the kernel on 267 314 protection faults (so-called "kernel oops"). 268 315 269 316 If you run into some kind of deadlock, you can try to dump a call trace 270 - for each process using sysrq-t (see Documentation/admin-guide/sysrq.rst). 317 + for each process using sysrq-t (see :doc:`/admin-guide/sysrq`). 271 318 This way it is possible to figure where *exactly* some process in "D" 272 319 state is stuck. 273 320 ··· 396 443 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 397 444 398 445 If you are trying to make a new card work you might find it useful to 399 - know what the other elements in the tvcards array are good for: 400 - 401 - .. code-block:: none 446 + know what the other elements in the tvcards array are good for:: 402 447 403 448 video_inputs - # of video inputs the card has 404 449 audio_inputs - historical cruft, not used any more. ··· 629 678 ~~~~~~~~~~~~~~~~~~~~~~~ 630 679 631 680 These can be CPH, Flyvideo, Pixelview or KNC1 series. 681 + 632 682 Typhoon is the brand of Anubis. 683 + 633 684 Model 50680 got re-used, some model no. had different contents over time. 634 685 635 686 Models: ··· 783 830 on their server are the full data-sheets, but don't ask how I found it. 784 831 785 832 To use the driver I use the following options, the tuner and pll settings might 786 - be different in your country 833 + be different in your country. You can force it via modprobe parameters. 834 + For example:: 787 835 788 - insmod videodev 789 - insmod i2c scan=1 i2c_debug=0 verbose=0 790 - insmod tuner type=1 debug=0 791 - insmod bttv pll=1 radio=1 card=17 836 + modprobe bttv tuner=1 pll=28 radio=1 card=17 837 + 838 + Sets tuner type 1 (Philips PAL_I), PLL with a 28 MHz crystal, enables 839 + FM radio and selects bttv card ID 17 (Leadtek WinView 601). 792 840 793 841 794 842 KNC One ··· 808 854 Provideo 809 855 ~~~~~~~~ 810 856 811 - - PV951 or PV-951 (also are sold as: 857 + - PV951 or PV-951, now named PV-951T 858 + (also are sold as: 812 859 Boeder TV-FM Video Capture Card, 813 860 Titanmedia Supervision TV-2400, 814 861 Provideo PV951 TF, 815 862 3DeMon PV951, 816 863 MediaForte TV-Vision PV951, 817 864 Yoko PV951, 818 - Vivanco Tuner Card PCI Art.-Nr.: 68404, 819 - ) now named PV-951T 865 + Vivanco Tuner Card PCI Art.-Nr.: 68404 866 + ) 820 867 821 868 - Surveillance Series: 822 869