~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/driver-api/media/drivers/bttv-devel.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/driver-api/media/drivers/bttv-devel.rst (Architecture i386) and /Documentation/driver-api/media/drivers/bttv-devel.rst (Architecture ppc)


  1 .. SPDX-License-Identifier: GPL-2.0                 1 .. SPDX-License-Identifier: GPL-2.0
  2                                                     2 
  3 The bttv driver                                     3 The bttv driver
  4 ===============                                     4 ===============
  5                                                     5 
  6 bttv and sound mini howto                           6 bttv and sound mini howto
  7 -------------------------                           7 -------------------------
  8                                                     8 
  9 There are a lot of different bt848/849/878/879      9 There are a lot of different bt848/849/878/879 based boards available.
 10 Making video work often is not a big deal, bec     10 Making video work often is not a big deal, because this is handled
 11 completely by the bt8xx chip, which is common      11 completely by the bt8xx chip, which is common on all boards.  But
 12 sound is handled in slightly different ways on     12 sound is handled in slightly different ways on each board.
 13                                                    13 
 14 To handle the grabber boards correctly, there      14 To handle the grabber boards correctly, there is a array tvcards[] in
 15 bttv-cards.c, which holds the information requ     15 bttv-cards.c, which holds the information required for each board.
 16 Sound will work only, if the correct entry is      16 Sound will work only, if the correct entry is used (for video it often
 17 makes no difference).  The bttv driver prints      17 makes no difference).  The bttv driver prints a line to the kernel
 18 log, telling which card type is used.  Like th     18 log, telling which card type is used.  Like this one::
 19                                                    19 
 20         bttv0: model: BT848(Hauppauge old) [au     20         bttv0: model: BT848(Hauppauge old) [autodetected]
 21                                                    21 
 22 You should verify this is correct.  If it isn'     22 You should verify this is correct.  If it isn't, you have to pass the
 23 correct board type as insmod argument, ``insmo     23 correct board type as insmod argument, ``insmod bttv card=2`` for
 24 example.  The file Documentation/admin-guide/m     24 example.  The file Documentation/admin-guide/media/bttv-cardlist.rst has a list
 25 of valid arguments for card.                       25 of valid arguments for card.
 26                                                    26 
 27 If your card isn't listed there, you might che     27 If your card isn't listed there, you might check the source code for
 28 new entries which are not listed yet.  If ther     28 new entries which are not listed yet.  If there isn't one for your
 29 card, you can check if one of the existing ent     29 card, you can check if one of the existing entries does work for you
 30 (just trial and error...).                         30 (just trial and error...).
 31                                                    31 
 32 Some boards have an extra processor for sound      32 Some boards have an extra processor for sound to do stereo decoding
 33 and other nice features.  The msp34xx chips ar     33 and other nice features.  The msp34xx chips are used by Hauppauge for
 34 example.  If your board has one, you might hav     34 example.  If your board has one, you might have to load a helper
 35 module like ``msp3400`` to make sound work.  I     35 module like ``msp3400`` to make sound work.  If there isn't one for the
 36 chip used on your board:  Bad luck.  Start wri     36 chip used on your board:  Bad luck.  Start writing a new one.  Well,
 37 you might want to check the video4linux mailin     37 you might want to check the video4linux mailing list archive first...
 38                                                    38 
 39 Of course you need a correctly installed sound     39 Of course you need a correctly installed soundcard unless you have the
 40 speakers connected directly to the grabber boa     40 speakers connected directly to the grabber board.  Hint: check the
 41 mixer settings too.  ALSA for example has ever     41 mixer settings too.  ALSA for example has everything muted by default.
 42                                                    42 
 43                                                    43 
 44 How sound works in detail                          44 How sound works in detail
 45 ~~~~~~~~~~~~~~~~~~~~~~~~~                          45 ~~~~~~~~~~~~~~~~~~~~~~~~~
 46                                                    46 
 47 Still doesn't work?  Looks like some driver ha     47 Still doesn't work?  Looks like some driver hacking is required.
 48 Below is a do-it-yourself description for you.     48 Below is a do-it-yourself description for you.
 49                                                    49 
 50 The bt8xx chips have 32 general purpose pins,      50 The bt8xx chips have 32 general purpose pins, and registers to control
 51 these pins.  One register is the output enable     51 these pins.  One register is the output enable register
 52 (``BT848_GPIO_OUT_EN``), it says which pins ar     52 (``BT848_GPIO_OUT_EN``), it says which pins are actively driven by the
 53 bt848 chip.  Another one is the data register      53 bt848 chip.  Another one is the data register (``BT848_GPIO_DATA``), where
 54 you can get/set the status if these pins.  The     54 you can get/set the status if these pins.  They can be used for input
 55 and output.                                        55 and output.
 56                                                    56 
 57 Most grabber board vendors use these pins to c     57 Most grabber board vendors use these pins to control an external chip
 58 which does the sound routing.  But every board     58 which does the sound routing.  But every board is a little different.
 59 These pins are also used by some companies to      59 These pins are also used by some companies to drive remote control
 60 receiver chips.  Some boards use the i2c bus i     60 receiver chips.  Some boards use the i2c bus instead of the gpio pins
 61 to connect the mux chip.                           61 to connect the mux chip.
 62                                                    62 
 63 As mentioned above, there is a array which hol     63 As mentioned above, there is a array which holds the required
 64 information for each known board.  You basical     64 information for each known board.  You basically have to create a new
 65 line for your board.  The important fields are     65 line for your board.  The important fields are these two::
 66                                                    66 
 67   struct tvcard                                    67   struct tvcard
 68   {                                                68   {
 69         [ ... ]                                    69         [ ... ]
 70         u32 gpiomask;                              70         u32 gpiomask;
 71         u32 audiomux[6]; /* Tuner, Radio, exte     71         u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */
 72   };                                               72   };
 73                                                    73 
 74 gpiomask specifies which pins are used to cont     74 gpiomask specifies which pins are used to control the audio mux chip.
 75 The corresponding bits in the output enable re     75 The corresponding bits in the output enable register
 76 (``BT848_GPIO_OUT_EN``) will be set as these p     76 (``BT848_GPIO_OUT_EN``) will be set as these pins must be driven by the
 77 bt848 chip.                                        77 bt848 chip.
 78                                                    78 
 79 The ``audiomux[]`` array holds the data values     79 The ``audiomux[]`` array holds the data values for the different inputs
 80 (i.e. which pins must be high/low for tuner/mu     80 (i.e. which pins must be high/low for tuner/mute/...).  This will be
 81 written to the data register (``BT848_GPIO_DAT     81 written to the data register (``BT848_GPIO_DATA``) to switch the audio
 82 mux.                                               82 mux.
 83                                                    83 
 84                                                    84 
 85 What you have to do is figure out the correct      85 What you have to do is figure out the correct values for gpiomask and
 86 the audiomux array.  If you have Windows and t     86 the audiomux array.  If you have Windows and the drivers four your
 87 card installed, you might to check out if you      87 card installed, you might to check out if you can read these registers
 88 values used by the windows driver.  A tool to      88 values used by the windows driver.  A tool to do this is available
 89 from http://btwincap.sourceforge.net/download.     89 from http://btwincap.sourceforge.net/download.html.
 90                                                    90 
 91 You might also dig around in the ``*.ini`` fil     91 You might also dig around in the ``*.ini`` files of the Windows applications.
 92 You can have a look at the board to see which      92 You can have a look at the board to see which of the gpio pins are
 93 connected at all and then start trial-and-erro     93 connected at all and then start trial-and-error ...
 94                                                    94 
 95                                                    95 
 96 Starting with release 0.7.41 bttv has a number     96 Starting with release 0.7.41 bttv has a number of insmod options to
 97 make the gpio debugging easier:                    97 make the gpio debugging easier:
 98                                                    98 
 99         =================       ==============     99         =================       ==============================================
100         bttv_gpio=0/1           enable/disable    100         bttv_gpio=0/1           enable/disable gpio debug messages
101         gpiomask=n              set the gpioma    101         gpiomask=n              set the gpiomask value
102         audiomux=i,j,...        set the values    102         audiomux=i,j,...        set the values of the audiomux array
103         audioall=a              set the values    103         audioall=a              set the values of the audiomux array (one
104                                 value for all     104                                 value for all array elements, useful to check
105                                 out which effe    105                                 out which effect the particular value has).
106         =================       ==============    106         =================       ==============================================
107                                                   107 
108 The messages printed with ``bttv_gpio=1`` look    108 The messages printed with ``bttv_gpio=1`` look like this::
109                                                   109 
110         bttv0: gpio: en=00000027, out=00000024    110         bttv0: gpio: en=00000027, out=00000024 in=00ffffd8 [audio: off]
111                                                   111 
112         en  =   output _en_able register (BT84    112         en  =   output _en_able register (BT848_GPIO_OUT_EN)
113         out =   _out_put bits of the data regi    113         out =   _out_put bits of the data register (BT848_GPIO_DATA),
114                 i.e. BT848_GPIO_DATA & BT848_G    114                 i.e. BT848_GPIO_DATA & BT848_GPIO_OUT_EN
115         in  =   _in_put bits of the data regis    115         in  =   _in_put bits of the data register,
116                 i.e. BT848_GPIO_DATA & ~BT848_    116                 i.e. BT848_GPIO_DATA & ~BT848_GPIO_OUT_EN
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php