162306a36Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci==================================
462306a36Sopenharmony_ciHow to get the bt8xx cards working
562306a36Sopenharmony_ci==================================
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciAuthors:
862306a36Sopenharmony_ci	 Richard Walker,
962306a36Sopenharmony_ci	 Jamie Honan,
1062306a36Sopenharmony_ci	 Michael Hunold,
1162306a36Sopenharmony_ci	 Manu Abraham,
1262306a36Sopenharmony_ci	 Uwe Bugla,
1362306a36Sopenharmony_ci	 Michael Krufky
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ciGeneral information
1662306a36Sopenharmony_ci-------------------
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciThis class of cards has a bt878a as the PCI interface, and require the bttv
1962306a36Sopenharmony_cidriver for accessing the i2c bus and the gpio pins of the bt8xx chipset.
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciPlease see Documentation/admin-guide/media/bttv-cardlist.rst for a complete
2262306a36Sopenharmony_cilist of Cards based on the Conexant Bt8xx PCI bridge supported by the
2362306a36Sopenharmony_ciLinux Kernel.
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciIn order to be able to compile the kernel, some config options should be
2662306a36Sopenharmony_cienabled::
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci    ./scripts/config -e PCI
2962306a36Sopenharmony_ci    ./scripts/config -e INPUT
3062306a36Sopenharmony_ci    ./scripts/config -m I2C
3162306a36Sopenharmony_ci    ./scripts/config -m MEDIA_SUPPORT
3262306a36Sopenharmony_ci    ./scripts/config -e MEDIA_PCI_SUPPORT
3362306a36Sopenharmony_ci    ./scripts/config -e MEDIA_ANALOG_TV_SUPPORT
3462306a36Sopenharmony_ci    ./scripts/config -e MEDIA_DIGITAL_TV_SUPPORT
3562306a36Sopenharmony_ci    ./scripts/config -e MEDIA_RADIO_SUPPORT
3662306a36Sopenharmony_ci    ./scripts/config -e RC_CORE
3762306a36Sopenharmony_ci    ./scripts/config -m VIDEO_BT848
3862306a36Sopenharmony_ci    ./scripts/config -m DVB_BT8XX
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ciIf you want to automatically support all possible variants of the Bt8xx
4162306a36Sopenharmony_cicards, you should also do::
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci    ./scripts/config -e MEDIA_SUBDRV_AUTOSELECT
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci.. note::
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci   Please use the following options with care as deselection of drivers which
4862306a36Sopenharmony_ci   are in fact necessary may result in DVB devices that cannot be tuned due
4962306a36Sopenharmony_ci   to lack of driver support.
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ciIf your goal is to just support an specific board, you may, instead,
5262306a36Sopenharmony_cidisable MEDIA_SUBDRV_AUTOSELECT and manually select the frontend drivers
5362306a36Sopenharmony_cirequired by your board. With that, you can save some RAM.
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ciYou can do that by calling make xconfig/qconfig/menuconfig and look at
5662306a36Sopenharmony_cithe options on those menu options (only enabled if
5762306a36Sopenharmony_ci``Autoselect ancillary drivers`` is disabled:
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci#) ``Device drivers`` => ``Multimedia support`` => ``Customize TV tuners``
6062306a36Sopenharmony_ci#) ``Device drivers`` => ``Multimedia support`` => ``Customize DVB frontends``
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ciThen, on each of the above menu, please select your card-specific
6362306a36Sopenharmony_cifrontend and tuner modules.
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ciLoading Modules
6762306a36Sopenharmony_ci---------------
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ciRegular case: If the bttv driver detects a bt8xx-based DVB card, all
7062306a36Sopenharmony_cifrontend and backend modules will be loaded automatically.
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ciExceptions are:
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci- Old TV cards without EEPROMs, sharing a common PCI subsystem ID;
7562306a36Sopenharmony_ci- Old TwinHan DST cards or clones with or without CA slot and not
7662306a36Sopenharmony_ci  containing an Eeprom.
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ciIn the following cases overriding the PCI type detection for bttv and
7962306a36Sopenharmony_cifor dvb-bt8xx drivers by passing modprobe parameters may be necessary.
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ciRunning TwinHan and Clones
8262306a36Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~
8362306a36Sopenharmony_ci
8462306a36Sopenharmony_ciAs shown at Documentation/admin-guide/media/bttv-cardlist.rst, TwinHan and
8562306a36Sopenharmony_ciclones use ``card=113`` modprobe parameter. So, in order to properly
8662306a36Sopenharmony_cidetect it for devices without EEPROM, you should use::
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ci	$ modprobe bttv card=113
8962306a36Sopenharmony_ci	$ modprobe dst
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ciUseful parameters for verbosity level and debugging the dst module::
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci	verbose=0:		messages are disabled
9462306a36Sopenharmony_ci		1:		only error messages are displayed
9562306a36Sopenharmony_ci		2:		notifications are displayed
9662306a36Sopenharmony_ci		3:		other useful messages are displayed
9762306a36Sopenharmony_ci		4:		debug setting
9862306a36Sopenharmony_ci	dst_addons=0:		card is a free to air (FTA) card only
9962306a36Sopenharmony_ci		0x20:	card has a conditional access slot for scrambled channels
10062306a36Sopenharmony_ci	dst_algo=0:		(default) Software tuning algorithm
10162306a36Sopenharmony_ci	         1:		Hardware tuning algorithm
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ciThe autodetected values are determined by the cards' "response string".
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ciIn your logs see f. ex.: dst_get_device_id: Recognize [DSTMCI].
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ciFor bug reports please send in a complete log with verbose=4 activated.
10962306a36Sopenharmony_ciPlease also see Documentation/admin-guide/media/ci.rst.
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ciRunning multiple cards
11262306a36Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ciSee Documentation/admin-guide/media/bttv-cardlist.rst for a complete list of
11562306a36Sopenharmony_ciCard ID. Some examples:
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ci	===========================	===
11862306a36Sopenharmony_ci	Brand name			ID
11962306a36Sopenharmony_ci	===========================	===
12062306a36Sopenharmony_ci	Pinnacle PCTV Sat		 94
12162306a36Sopenharmony_ci	Nebula Electronics Digi TV	104
12262306a36Sopenharmony_ci	pcHDTV HD-2000 TV		112
12362306a36Sopenharmony_ci	Twinhan DST and clones		113
12462306a36Sopenharmony_ci	Avermedia AverTV DVB-T 77:	123
12562306a36Sopenharmony_ci	Avermedia AverTV DVB-T 761	124
12662306a36Sopenharmony_ci	DViCO FusionHDTV DVB-T Lite	128
12762306a36Sopenharmony_ci	DViCO FusionHDTV 5 Lite		135
12862306a36Sopenharmony_ci	===========================	===
12962306a36Sopenharmony_ci
13062306a36Sopenharmony_ci.. note::
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ci   When you have multiple cards, the order of the card ID should
13362306a36Sopenharmony_ci   match the order where they're detected by the system. Please notice
13462306a36Sopenharmony_ci   that removing/inserting other PCI cards may change the detection
13562306a36Sopenharmony_ci   order.
13662306a36Sopenharmony_ci
13762306a36Sopenharmony_ciExample::
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ci	$ modprobe bttv card=113 card=135
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_ciIn case of further problems please subscribe and send questions to
14262306a36Sopenharmony_cithe mailing list: linux-media@vger.kernel.org.
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ciProbing the cards with broken PCI subsystem ID
14562306a36Sopenharmony_ci~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ciThere are some TwinHan cards whose EEPROM has become corrupted for some
14862306a36Sopenharmony_cireason. The cards do not have a correct PCI subsystem ID.
14962306a36Sopenharmony_ciStill, it is possible to force probing the cards with::
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ci	$ echo 109e 0878 $subvendor $subdevice > \
15262306a36Sopenharmony_ci		/sys/bus/pci/drivers/bt878/new_id
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ciThe two numbers there are::
15562306a36Sopenharmony_ci
15662306a36Sopenharmony_ci	109e: PCI_VENDOR_ID_BROOKTREE
15762306a36Sopenharmony_ci	0878: PCI_DEVICE_ID_BROOKTREE_878
158