https://www.linuxtv.org/wiki/api.php?action=feedcontributions&user=Hakon&feedformat=atomLinuxTVWiki - User contributions [en]2024-04-10T21:20:05ZUser contributionsMediaWiki 1.39.7https://www.linuxtv.org/wiki/index.php?title=TBS_driver_installation&diff=35790TBS driver installation2017-09-19T20:10:39Z<p>Hakon: /* Open-source drivers */</p>
<hr />
<div>A number of capture devices from [[TBS Technologies]] have a common setup process.<br />
<br />
== Open-source drivers==<br />
<br />
The open source driver is available [https://github.com/ljalves/linux_media/wiki here], with a fork [https://github.com/tbsdtv/media_build here] . These instructions are taken directly from those pages, e.g. [https://github.com/tbsdtv/linux_media/wiki tbs' wiki]. Go there for latest official word on build procedure.<br />
<br />
It does not currently support the remote control, but SD and HD reception is working and appears to be stable and quicker to change channels than the official TBS version.<br />
As of 2014-11-27, this driver was tested with success with [http://en.wikipedia.org/wiki/DVB-T DVB-T] transmitters in Europe. And [http://en.wikipedia.org/wiki/DVB-T2 DVB-T2] transmitters in United-Kingdom and France (only experimental DVB-T2 transmitters at Eiffel tower in Paris in France for UHD TV (AAC+HVEC)).<br />
<br />
It does not currently support the [[TBS6205]].<br />
<br />
===Building the Open Source Driver===<br />
<br />
These instructions are taken from [https://github.com/ljalves/linux_media/wiki/Installating here]:<br />
<br />
git clone https://github.com/ljalves/media_build.git<br />
git clone --depth=1 https://github.com/ljalves/linux_media.git -b latest ./media<br />
cd media_build<br />
make dir DIR=../media<br />
make distclean<br />
make<br />
sudo make install<br />
<br />
If your card uses the saa716x_budget kernel module, you need to set up the configuration options for it. You can check if it does using:<br />
<br />
dmesg | grep -i saa716<br />
<br />
You will see something like this if it does:<br />
<br />
[19659.585518] DVB: registering new adapter (SAA716x dvb adapter)<br />
[19660.201340] SAA716x Budget 0000:02:00.0: DVB: registering adapter 0 frontend 0 (Sony CXD2820R)...<br />
[19660.202234] DVB: registering new adapter (SAA716x dvb adapter)<br />
[19660.212991] SAA716x Budget 0000:02:00.0: DVB: registering adapter 1 frontend 0 (Sony CXD2820R)...<br />
<br />
Next check if the configuration has already been added using:<br />
<br />
grep saa716x /etc/modprobe.d/*<br />
<br />
You will see something like this if it is:<br />
<br />
/etc/modprobe.d/saa716x_budget.conf:options saa716x_budget int_type=1<br />
<br />
If it is not there, create a file containing the config:<br />
<br />
sudo sh -c 'echo options saa716x_budget int_type=1 > /etc/modprobe.d/saa716x_budget.conf'<br />
<br />
See also [[TBS_driver_installation#IRQ_Issues]] for module config of the closed source drivers.<br />
<br />
===Loading the Modules===<br />
<br />
The simplest option is to reboot, but if you would rather not, execute these commands:<br />
<br />
sudo make rmmod<br />
sudo modprobe saa716x_budget int_type=1<br />
<br />
===Identification / Check module loaded correctly ===<br />
<br />
Note : "Capabilities" information are only show if you use the root account, else you will have "Capabilities: <access denied>".<br />
<br />
With kernel 3.14.24 and Mageia Linux. <br />
<br />
# lspci -v | grep --after-context=10 7160<br />
<br />
04:00.0 Multimedia controller: Philips Semiconductors SAA7160 (rev 03)<br />
Subsystem: Device 6280:0011<br />
Flags: bus master, fast devsel, latency 0, IRQ 18<br />
Memory at e0300000 (64-bit, non-prefetchable) [size=1M]<br />
Capabilities: [40] MSI: Enable- Count=1/32 Maskable- 64bit+<br />
Capabilities: [50] Express Endpoint, MSI 00<br />
Capabilities: [74] Power Management version 2<br />
Capabilities: [80] Vendor Specific Information: Len=50 <?><br />
Capabilities: [100] Vendor Specific Information: ID=0000 Rev=0 Len=088 <?><br />
Kernel driver in use: SAA716x Budget<br />
Kernel modules: saa716x_budget<br />
<br />
You need to see the 2 following lines that show that the SAA716x driver for the TBS TV card is loaded :<br />
Kernel driver in use: SAA716x Budget<br />
Kernel modules: saa716x_budget <br />
<br />
=== Check if dvb adaptor nodes are created ===<br />
<br />
Now, if the SAA716x driver is loaded, the dvb adaptor nodes should now exist<br />
ls -al /dev/dvb<br />
<br />
drwxr-xr-x 4 root root 80 oct. 23 08:37 ./<br />
drwxr-xr-x 19 root root 4140 oct. 23 08:40 ../<br />
drwxr-xr-x 2 root root 120 oct. 23 08:37 adapter0/<br />
drwxr-xr-x 2 root root 120 oct. 23 08:37 adapter1/<br />
<br />
# lsdvb<br />
<br />
lsdvb: Simple utility to list PCI/PCIe DVB devices<br />
Version: 0.0.4<br />
Copyright (C) Manu Abraham<br />
<br />
SAA716x Budget (1131:7160 6280:11) on PCI Domain:0 Bus:4 Device:0 Function:0<br />
DEVICE:0 ADAPTER:0 FRONTEND:0 (Sony CXD2820R) <br />
FE_OFDM Fmin=48MHz Fmax=864MHz<br />
DEVICE:0 ADAPTER:1 FRONTEND:0 (Sony CXD2820R) <br />
FE_OFDM Fmin=48MHz Fmax=864MHz<br />
<br />
=== Linux kernel modules loaded ===<br />
<br />
* DVB Tuner card part only<br />
<br />
We can saw the driver modules needed by TBS TV card : saa716x_budget, tda18212, cxd2820r. <br />
<br />
# lsmod<br />
<br />
...<br />
tda18212 13180 2 <br />
regmap_i2c 12915 1 tda18212<br />
...<br />
saa716x_budget 34859 0 <br />
tas2101 19952 1 saa716x_budget<br />
cxd2820r 31562 1 saa716x_budget<br />
mb86a16 27647 1 saa716x_budget<br />
cx24117 25174 1 saa716x_budget<br />
saa716x_core 71005 1 saa716x_budget<br />
stv090x 70354 1 saa716x_budget<br />
dvb_core 117590 3 saa716x_core,saa716x_budget,cxd2820r<br />
i2c_mux 12896 1 tas2101<br />
...<br />
i2c_core 40643 19 drm,i2c_i801,i2c_mux,saa716x_core,mb86a16,saa716x_budget,regmap_i2c,tas2101,i2c_algo_bit,stv090x,cxd2820r,nvidia,v4l2_common,tveeprom,tda18212,videode<br />
<br />
===Troubleshooting===<br />
<br />
If you find module load errors like "module has wrong symbol version" means that there still are old modules from your previous media tree installation (usually duplicated modules in two different places).<br />
<br />
sudo rm -rf /lib/modules/`uname -r`/kernel/drivers/media/*<br />
<br />
===Upgrading Sources and Re-installing===<br />
<br />
cd media<br />
git remote update<br />
git pull<br />
cd ../media_build<br />
git remote update<br />
git pull<br />
make<br />
sudo make install<br />
<br />
You should now reboot or unload/reload the modules manually.<br />
<br />
===Supporting the Open Source Driver===<br />
<br />
Any help that you can give to Luis or [https://github.com/crazycat69 crazycat69] (another contributor to the project) through testing, patches or getting the driver merged into the upstream code will (hopefully) be appreciated.<br />
<br />
Luis also has a [https://github.com/ljalves/linux_media/wiki donate link] on github.<br />
<br />
== Closed-source drivers ==<br />
<br />
Proprietary drivers are available from the [http://www.tbsdtv.com/download/ TBS dtv website] or [https://www.tbsiptv.com/downloads TBS iptv website]. <br />
<br />
=== Installing drivers ===<br />
As of 11 September 2017, the latest version is [https://www.tbsiptv.com/download/common/tbs-linux-drivers_v170330.zip 170330]<br />
<br />
Version 170330 compiles cleanly on gentoo linux kernels "gentoo-sources-4.9.<x>" . gentoo-sources-4.11 and newer give missing symbols.<br />
<br />
'''0. Download the drivers''' <br />
<br />
'''1. Extract the ZIP file tbs-linux-drivers_v[VERSION NUMBER].zip.'''<br />
<br />
mkdir tbs-linux-drivers<br />
cd tbs-linux-drivers<br />
unzip ../tbs-linux-drivers_v[VERSION_NUMBER].zip<br />
<br />
<br />
The directory tbs-linux-drivers will now contain README_* for various TBS-cards, check for your options (combinations of DVB-T/T2/S/C wil require various adjustments). The procedure below is a summary of those READMEs, as well as some hints/caveats. The directory will also contain linux-tbs-drivers.tar.bz2 which has v4l modules meant to be compiled out-of-tree from the kernel you are actually running. Source for your currently running kernel should be installed before attempting build. Search the files for the string 'uname -r' if you are not happy with that.<br />
<br />
'''2. Extract linux-tbs-drivers.tar.bz2 archive'''<br />
<br />
bzcat linux-tbs-drivers.tar.bz2 | tar xv<br />
<br />
'''3. Change to driver package directory'''<br />
<br />
cd linux-tbs-drivers<br />
<br />
<br />
'''4. Select platform architecture'''<br />
<br />
This will rename arch-specific blobs to '*.o' so that the module-build will find them.<br />
<br />
for x86 kernel 3.x (x86 32 bit installations of kernel 3.x)<br />
./v4l/tbs-x86_r3.sh<br />
<br />
''or'' for x86 kernel 2.6.x (x86 32 bit installations of kernel 2.6.x)<br />
./v4l/tbs-x86.sh<br />
<br />
''or'' for any x86_64 kernel (x86 64 bit installations of Linux)<br />
./v4l/tbs-x86_64.sh<br />
<br />
You should then receive a message along these lines:<br />
TBS drivers configured for [NAME OF PLATFORM] platform.<br />
<br />
'''5. Build the driver.''' <br />
<br />
Recompiles v4l for a wide range of cards, currently about 500; will take many minutes.<br />
<br />
We're ready to build; add -j3 parameter for make command line for a faster build on a dual core machine, -j5 on a quad core machine, etc.<br />
make<br />
<br />
If you get -bash: make: command not found, then <code>sudo apt-get install build-essential</code><br />
<br />
'''6. Install driver.''' Existing drivers for other v4l related hardware, such as lirc could also get updated.<br />
sudo make install<br />
<br />
'''7. Load newly installed driver'''<br />
sudo modprobe -v tbs62x0fe<br />
<br />
'''8. Check it loaded correctly'''<br />
tail /var/log/syslog<br />
<br />
You should get a message about tainting the kernel. This is fine.<br />
<br />
kernel: tbs62x0fe: module license 'TurboSight Proprietary' taints kernel.<br />
<br />
Running '''<code>dmesg | tail</code>''' should end with something along these lines:<br />
<br />
[ 7330.361868] tbs62x0fe: module license 'TurboSight Proprietary' taints kernel.<br />
[ 7330.361875] Disabling lock debugging due to kernel taint<br />
<br />
dvb adaptor nodes should now exist<br />
ls -al /dev/dvb <br />
<br />
drwxr-xr-x 2 root root 120 Jul 9 21:12 adapter0<br />
drwxr-xr-x 2 root root 120 Jul 9 21:12 adapter1<br />
drwxr-xr-x 2 root root 120 Jul 9 21:12 adapter2<br />
drwxr-xr-x 2 root root 120 Jul 9 21:12 adapter3<br />
<br />
<br />
# lsdvb<br />
lsdvb: Simple utility to list PCI/PCIe DVB devices<br />
Version: 0.0.4<br />
Copyright (C) Manu Abraham<br />
SAA716x TBS (1131:7160 6280:11) on PCI Domain:0 Bus:4 Device:0 Function:0<br />
DEVICE:0 ADAPTER:0 FRONTEND:0 (TurboSight TBS 62x0 DVBT/T2 frontend) <br />
FE_OFDM Fmin=47MHz Fmax=870MHz<br />
DEVICE:0 ADAPTER:1 FRONTEND:0 (TurboSight TBS 62x0 DVBT/T2 frontend) <br />
FE_OFDM Fmin=47MHz Fmax=870MHz<br />
<br />
=== Troubleshooting ===<br />
<br />
====Compilation problems====<br />
<br />
make[3]: *** No rule to make target `tbs8921ctrl.o', needed by `v4l/media.o'. Stop.<br />
<br />
Did you select the correct platform in step 4 above?<br />
<br />
During compilation:<br />
make[1]: *** No rule to make target `.myconfig', needed by `config-compat.h'. Stop.<br />
<br />
Make sure you have the right C header files installed for your Linux kernel version.<br />
<br />
====Problems after kernel update====<br />
Some weeks later your /dev/dvb directory has disappeared? Perhaps your kernel was updated, and your machine rebooted. The driver needs to be recompiled. <br />
<br />
If you just run make, it will try to compile against the old kernel headers, so first run<br />
<br />
make distclean<br />
<br />
Then go back to step 4.<br />
<br />
====Deleting media drivers directory to resolve conflicts====<br />
<br />
<br />
Some users have found that deleting the whole kernel media drivers folder (i.e. /lib/modules/`uname -r`/kernel/drivers/media ) and then compiling can resolve conflicts.<br />
<br />
This process will fix issues resulting in "disagrees about version of symbol dvb_frontend_detach" messages in the dmesg output.<br />
<br />
Normally it should be enough to make sure that you recompile the tbs drivers after every kernel build.<br />
<br />
Instructions for this can be found in [http://www.tbsdtv.com/forum/viewtopic.php?f=47&t=8195 the TBS forum]. They are as follows:<br />
<br />
# First remove the existing media modules:<br />
#: <code>sudo rm -rf /lib/modules/$(uname -r)/kernel/drivers/media/</code><br />
# Then reinstall the modules, following steps 3 and 6 above.<br />
<br />
====Compatibility with other cards====<br />
<br />
As noted above you should remove the kernel's existing media drivers before installing the TBS driver package, I omitted this step when installing the drivers and whilst the card worked fine (Mythtv 0.27/Debian 7) my other DVB-S2 tuner card would fail to initialize on start up. There were no obvious messages in the dmesg output indicating symbol issues, the card simply wouldn't work. Once I removed the media directory before installing the TBS drivers the card worked correctly. (The driver in the v4l tree used by the TBS drivers was actually a different name than the one in the Linux kernel I had installed).<br />
<br />
Fighting with another tuner card in load order at boot time - See http://www.tbsdtv.com/forum/viewtopic.php?f=62&t=7747. Additionally it's worth noting that the TBS drivers don't appear to support the 'adapter_nr' argument.<br />
<br />
Fix UDEV problems : <BR><br />
[http://www.linuxtv.org/wiki/index.php/Device_nodes_and_character_devices Device nodes and character devices] <BR><br />
[http://windycitytech.blogspot.fr/2013/03/notes-for-configuring-udev-rules-for.html Notes for configuring udev rules for em28xx USB capture card] <BR><br />
[http://www.djsadhu.com/software/linux-howto-avoid-video-devices-getting-mixed-up-after-reboot-using-udev-rules/ Linux: howto avoid video devices getting mixed up after reboot, using udev rules] <BR><br />
[https://wiki.archlinux.org/index.php/udev#About_udev_rules About udev rules] <BR><br />
[http://www.thelinuxdaily.com/2010/01/statically-assign-dev-nodes-to-hardware-devices-in-linux/ Statically Assign /dev Nodes to Hardware Devices in Linux] <BR><br />
[http://forums.fedoraforum.org/archive/index.php/t-94775.html /dev/video0 problem] <BR> <br />
<br />
<br />
=== IRQ Issues ===<br />
<br />
After an extended period the combined TBS driver may crash with messages (check using <code>dmesg</code>) such as:<br />
irq 16: nobody cared (try booting with the "irqpoll" option)<br />
...<br />
Disabling IRQ #16<br />
<br />
This will render the device inoperable until rebooting (including IR receiver), meaning it won't be able to record anything.<br />
<br />
This can be resolved by configuring the driver to use MSI instead of IRQ:<br />
sudo sh -c 'echo options saa716x_tbs_dvb int_type=1 > /etc/modprobe.d/tbs.conf'<br />
<br />
If you have a newer TBS card such as a TBS6905, or a mix of older and newer ones, then you need TWO lines in <code>/etc/modprobe.d/tbs.conf</code>:<br />
<br />
options tbs_pcie-dvb tbs_int_type=1<br />
options saa716x_tbs-dvb int_type=1<br />
<br />
See [http://www.tbsdtv.com/forum/viewtopic.php?f=52&t=7631#p24903 this TBS forum thread] and [http://bit.ly/1R4QmbU this blog post] for more details.<br />
<br />
=== Changelog ===<br />
<br />
Old releases for drivers if you have problem with your kernel:<br />
<br />
* v151229<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v151229.zip<br />
<br />
* v141019 (2014-10-19)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v141019.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v141019., which has below updating:<br />
* Fix numerous bugs from the previous release<br />
<br />
* v140707 (2014-07-07)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v140707.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v140707., which has below updating:<br />
* improve work of TBS 5990<br />
* add support for latest hardware revisions of TBS 5220, TBS 5881, TBS 5281<br />
* numerous improvements in bug fixes in drivers for TBS 6221, TBS6281, TBS 6285 and TBS 6290<br />
<br />
* v140425 (2014-04-25)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v140425.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v140425., which has below updating:<br />
* Fixed the TBS6928SE ID problem<br />
<br />
* v140323 (2014-03-23)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v140323.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v140323., which has below updating:<br />
* Add support for 5922SE<br />
* Add proper support for retail version of 6922SE<br />
* Add T2 lite support for latest hardware revision of 6221, 6281, 6285<br />
* Add "ClearQAM" (J83B) US Digital Cable support to DVB-C driver for latest T2 lite hardware revision of 6221, 6281, 6285<br />
<br />
* v140113 (2014-01-13)<br />
http://tbsdtv.com/download/document/common/tbs-linux-drivers_v140113.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v140113, which has below updating: <br />
* Improve compatibility with the upcoming Linux kernel 3.13.x<br />
* Add full support (both DVBT/T2 and DVBC are supported) for TBS 5281 <br />
<br />
* v130927 (2013-09-27)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v130927.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v130927, which has below updating:<br />
* Add DVB-C driver for TBS 6221, 6281, 6285, 5220, 5881<br />
* Finalize DVB-T/T2 driver for TBS 6221, 6281, 6285, 5220, 5881<br />
* Improve software compatibility for all DVB-C products<br />
* Improve software compatibility for all DVB-T/T2 products<br />
* Make power control for TBS 6984 more reliable<br />
<br />
* v130802 (2013-08-02)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v130802.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v130802, which has below updating:<br />
* improve compatibility with Linux kernel version 3.10<br />
* preliminary support for Linux kernel version 3.11<br />
* add support for all revisions of TBS 6982<br />
* add support for all revisions of TBS 6928SE<br />
* add PLP (Physical Layer Pipe) support for 6220, 6280, 6284 (PLP, see http://en.wikipedia.org/wiki/DVB-T2#Technical_details)<br />
* fix bug for DVB-C products (TBS 6618, TBS 6680, TBS 5680 and DVB-C USB Stick): improve performance in some DVB-C networks<br />
<br />
* v130506 (2013-05-06)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v130506.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v130506, which has below updating:<br />
* Further improve compatibility with 32-bit Linux kernels version 3.8.x and 3.9.x.<br />
* Add module parameter "enable_ir" that allows disabling IR support for TBS cards.<br />
<br />
* v121119 (2012-11-19)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v121119.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v121119, which has belowed updating:<br />
* Add support for dBm reporting with TBS 6922.<br />
* Improve performance of TBS 6922 and TBS 6985 in case lock can't be acquired.<br />
<br />
* v120617 (2012-06-17)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120617.zip<br />
Changelog :<br />
TBS6280 linux driver is updated to v120617:<br />
A) Add driver and software downloand for TBS5880.<br />
B) Add DVB-C driver support for TBS6220, TBS6280 and TBS6284.<br />
<br />
* v120503 (2012-05-03)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120503.zip<br />
Changelog :<br />
BS6280 linux driver is updated to v120503:<br />
A) Add driver and software downloand for TBS5880.<br />
B) Add DVB-C driver support for TBS6220, TBS6280 and TBS6284.<br />
<br />
* v120412 (2012-04-12)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120412.zip<br />
Changelog :<br />
TBS6280 linux driver is updated to v120412, any Linux kernel version in the range 2.6.31 to 3.2.x and any Linux distribution is supported.<br />
<br />
* v120216 (2012-02-16)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120216.zip<br />
Changelog :<br />
TBS6280 linux driver is updated to v120216, any Linux kernel version in the range 2.6.31 to 3.2.x and any Linux distribution is supported.</div>Hakonhttps://www.linuxtv.org/wiki/index.php?title=TBS_driver_installation&diff=35789TBS driver installation2017-09-17T19:59:16Z<p>Hakon: /* Open-source drivers */</p>
<hr />
<div>A number of capture devices from [[TBS Technologies]] have a common setup process.<br />
<br />
== Open-source drivers==<br />
<br />
The open source driver is available [https://github.com/ljalves/linux_media/wiki here], with a fork [https://github.com/tbsdtv/media_build here] . These instructions are taken directly from those pages.<br />
<br />
It does not currently support the remote control, but SD and HD reception is working and appears to be stable and quicker to change channels than the official TBS version.<br />
As of 2014-11-27, this driver was tested with success with [http://en.wikipedia.org/wiki/DVB-T DVB-T] transmitters in Europe. And [http://en.wikipedia.org/wiki/DVB-T2 DVB-T2] transmitters in United-Kingdom and France (only experimental DVB-T2 transmitters at Eiffel tower in Paris in France for UHD TV (AAC+HVEC)).<br />
<br />
It does not currently support the [[TBS6205]].<br />
<br />
===Building the Open Source Driver===<br />
<br />
These instructions are taken from [https://github.com/ljalves/linux_media/wiki/Installating here]:<br />
<br />
git clone https://github.com/ljalves/media_build.git<br />
git clone --depth=1 https://github.com/ljalves/linux_media.git -b latest ./media<br />
cd media_build<br />
make dir DIR=../media<br />
make distclean<br />
make<br />
sudo make install<br />
<br />
If your card uses the saa716x_budget kernel module, you need to set up the configuration options for it. You can check if it does using:<br />
<br />
dmesg | grep -i saa716<br />
<br />
You will see something like this if it does:<br />
<br />
[19659.585518] DVB: registering new adapter (SAA716x dvb adapter)<br />
[19660.201340] SAA716x Budget 0000:02:00.0: DVB: registering adapter 0 frontend 0 (Sony CXD2820R)...<br />
[19660.202234] DVB: registering new adapter (SAA716x dvb adapter)<br />
[19660.212991] SAA716x Budget 0000:02:00.0: DVB: registering adapter 1 frontend 0 (Sony CXD2820R)...<br />
<br />
Next check if the configuration has already been added using:<br />
<br />
grep saa716x /etc/modprobe.d/*<br />
<br />
You will see something like this if it is:<br />
<br />
/etc/modprobe.d/saa716x_budget.conf:options saa716x_budget int_type=1<br />
<br />
If it is not there, create a file containing the config:<br />
<br />
sudo sh -c 'echo options saa716x_budget int_type=1 > /etc/modprobe.d/saa716x_budget.conf'<br />
<br />
See also [[TBS_driver_installation#IRQ_Issues]] for module config of the closed source drivers.<br />
<br />
===Loading the Modules===<br />
<br />
The simplest option is to reboot, but if you would rather not, execute these commands:<br />
<br />
sudo make rmmod<br />
sudo modprobe saa716x_budget int_type=1<br />
<br />
===Identification / Check module loaded correctly ===<br />
<br />
Note : "Capabilities" information are only show if you use the root account, else you will have "Capabilities: <access denied>".<br />
<br />
With kernel 3.14.24 and Mageia Linux. <br />
<br />
# lspci -v | grep --after-context=10 7160<br />
<br />
04:00.0 Multimedia controller: Philips Semiconductors SAA7160 (rev 03)<br />
Subsystem: Device 6280:0011<br />
Flags: bus master, fast devsel, latency 0, IRQ 18<br />
Memory at e0300000 (64-bit, non-prefetchable) [size=1M]<br />
Capabilities: [40] MSI: Enable- Count=1/32 Maskable- 64bit+<br />
Capabilities: [50] Express Endpoint, MSI 00<br />
Capabilities: [74] Power Management version 2<br />
Capabilities: [80] Vendor Specific Information: Len=50 <?><br />
Capabilities: [100] Vendor Specific Information: ID=0000 Rev=0 Len=088 <?><br />
Kernel driver in use: SAA716x Budget<br />
Kernel modules: saa716x_budget<br />
<br />
You need to see the 2 following lines that show that the SAA716x driver for the TBS TV card is loaded :<br />
Kernel driver in use: SAA716x Budget<br />
Kernel modules: saa716x_budget <br />
<br />
=== Check if dvb adaptor nodes are created ===<br />
<br />
Now, if the SAA716x driver is loaded, the dvb adaptor nodes should now exist<br />
ls -al /dev/dvb<br />
<br />
drwxr-xr-x 4 root root 80 oct. 23 08:37 ./<br />
drwxr-xr-x 19 root root 4140 oct. 23 08:40 ../<br />
drwxr-xr-x 2 root root 120 oct. 23 08:37 adapter0/<br />
drwxr-xr-x 2 root root 120 oct. 23 08:37 adapter1/<br />
<br />
# lsdvb<br />
<br />
lsdvb: Simple utility to list PCI/PCIe DVB devices<br />
Version: 0.0.4<br />
Copyright (C) Manu Abraham<br />
<br />
SAA716x Budget (1131:7160 6280:11) on PCI Domain:0 Bus:4 Device:0 Function:0<br />
DEVICE:0 ADAPTER:0 FRONTEND:0 (Sony CXD2820R) <br />
FE_OFDM Fmin=48MHz Fmax=864MHz<br />
DEVICE:0 ADAPTER:1 FRONTEND:0 (Sony CXD2820R) <br />
FE_OFDM Fmin=48MHz Fmax=864MHz<br />
<br />
=== Linux kernel modules loaded ===<br />
<br />
* DVB Tuner card part only<br />
<br />
We can saw the driver modules needed by TBS TV card : saa716x_budget, tda18212, cxd2820r. <br />
<br />
# lsmod<br />
<br />
...<br />
tda18212 13180 2 <br />
regmap_i2c 12915 1 tda18212<br />
...<br />
saa716x_budget 34859 0 <br />
tas2101 19952 1 saa716x_budget<br />
cxd2820r 31562 1 saa716x_budget<br />
mb86a16 27647 1 saa716x_budget<br />
cx24117 25174 1 saa716x_budget<br />
saa716x_core 71005 1 saa716x_budget<br />
stv090x 70354 1 saa716x_budget<br />
dvb_core 117590 3 saa716x_core,saa716x_budget,cxd2820r<br />
i2c_mux 12896 1 tas2101<br />
...<br />
i2c_core 40643 19 drm,i2c_i801,i2c_mux,saa716x_core,mb86a16,saa716x_budget,regmap_i2c,tas2101,i2c_algo_bit,stv090x,cxd2820r,nvidia,v4l2_common,tveeprom,tda18212,videode<br />
<br />
===Troubleshooting===<br />
<br />
If you find module load errors like "module has wrong symbol version" means that there still are old modules from your previous media tree installation (usually duplicated modules in two different places).<br />
<br />
sudo rm -rf /lib/modules/`uname -r`/kernel/drivers/media/*<br />
<br />
===Upgrading Sources and Re-installing===<br />
<br />
cd media<br />
git remote update<br />
git pull<br />
cd ../media_build<br />
git remote update<br />
git pull<br />
make<br />
sudo make install<br />
<br />
You should now reboot or unload/reload the modules manually.<br />
<br />
===Supporting the Open Source Driver===<br />
<br />
Any help that you can give to Luis or [https://github.com/crazycat69 crazycat69] (another contributor to the project) through testing, patches or getting the driver merged into the upstream code will (hopefully) be appreciated.<br />
<br />
Luis also has a [https://github.com/ljalves/linux_media/wiki donate link] on github.<br />
<br />
== Closed-source drivers ==<br />
<br />
Proprietary drivers are available from the [http://www.tbsdtv.com/download/ TBS dtv website] or [https://www.tbsiptv.com/downloads TBS iptv website]. <br />
<br />
=== Installing drivers ===<br />
As of 11 September 2017, the latest version is [https://www.tbsiptv.com/download/common/tbs-linux-drivers_v170330.zip 170330]<br />
<br />
Version 170330 compiles cleanly on gentoo linux kernels "gentoo-sources-4.9.<x>" . gentoo-sources-4.11 and newer give missing symbols.<br />
<br />
'''0. Download the drivers''' <br />
<br />
'''1. Extract the ZIP file tbs-linux-drivers_v[VERSION NUMBER].zip.'''<br />
<br />
mkdir tbs-linux-drivers<br />
cd tbs-linux-drivers<br />
unzip ../tbs-linux-drivers_v[VERSION_NUMBER].zip<br />
<br />
<br />
The directory tbs-linux-drivers will now contain README_* for various TBS-cards, check for your options (combinations of DVB-T/T2/S/C wil require various adjustments). The procedure below is a summary of those READMEs, as well as some hints/caveats. The directory will also contain linux-tbs-drivers.tar.bz2 which has v4l modules meant to be compiled out-of-tree from the kernel you are actually running. Source for your currently running kernel should be installed before attempting build. Search the files for the string 'uname -r' if you are not happy with that.<br />
<br />
'''2. Extract linux-tbs-drivers.tar.bz2 archive'''<br />
<br />
bzcat linux-tbs-drivers.tar.bz2 | tar xv<br />
<br />
'''3. Change to driver package directory'''<br />
<br />
cd linux-tbs-drivers<br />
<br />
<br />
'''4. Select platform architecture'''<br />
<br />
This will rename arch-specific blobs to '*.o' so that the module-build will find them.<br />
<br />
for x86 kernel 3.x (x86 32 bit installations of kernel 3.x)<br />
./v4l/tbs-x86_r3.sh<br />
<br />
''or'' for x86 kernel 2.6.x (x86 32 bit installations of kernel 2.6.x)<br />
./v4l/tbs-x86.sh<br />
<br />
''or'' for any x86_64 kernel (x86 64 bit installations of Linux)<br />
./v4l/tbs-x86_64.sh<br />
<br />
You should then receive a message along these lines:<br />
TBS drivers configured for [NAME OF PLATFORM] platform.<br />
<br />
'''5. Build the driver.''' <br />
<br />
Recompiles v4l for a wide range of cards, currently about 500; will take many minutes.<br />
<br />
We're ready to build; add -j3 parameter for make command line for a faster build on a dual core machine, -j5 on a quad core machine, etc.<br />
make<br />
<br />
If you get -bash: make: command not found, then <code>sudo apt-get install build-essential</code><br />
<br />
'''6. Install driver.''' Existing drivers for other v4l related hardware, such as lirc could also get updated.<br />
sudo make install<br />
<br />
'''7. Load newly installed driver'''<br />
sudo modprobe -v tbs62x0fe<br />
<br />
'''8. Check it loaded correctly'''<br />
tail /var/log/syslog<br />
<br />
You should get a message about tainting the kernel. This is fine.<br />
<br />
kernel: tbs62x0fe: module license 'TurboSight Proprietary' taints kernel.<br />
<br />
Running '''<code>dmesg | tail</code>''' should end with something along these lines:<br />
<br />
[ 7330.361868] tbs62x0fe: module license 'TurboSight Proprietary' taints kernel.<br />
[ 7330.361875] Disabling lock debugging due to kernel taint<br />
<br />
dvb adaptor nodes should now exist<br />
ls -al /dev/dvb <br />
<br />
drwxr-xr-x 2 root root 120 Jul 9 21:12 adapter0<br />
drwxr-xr-x 2 root root 120 Jul 9 21:12 adapter1<br />
drwxr-xr-x 2 root root 120 Jul 9 21:12 adapter2<br />
drwxr-xr-x 2 root root 120 Jul 9 21:12 adapter3<br />
<br />
<br />
# lsdvb<br />
lsdvb: Simple utility to list PCI/PCIe DVB devices<br />
Version: 0.0.4<br />
Copyright (C) Manu Abraham<br />
SAA716x TBS (1131:7160 6280:11) on PCI Domain:0 Bus:4 Device:0 Function:0<br />
DEVICE:0 ADAPTER:0 FRONTEND:0 (TurboSight TBS 62x0 DVBT/T2 frontend) <br />
FE_OFDM Fmin=47MHz Fmax=870MHz<br />
DEVICE:0 ADAPTER:1 FRONTEND:0 (TurboSight TBS 62x0 DVBT/T2 frontend) <br />
FE_OFDM Fmin=47MHz Fmax=870MHz<br />
<br />
=== Troubleshooting ===<br />
<br />
====Compilation problems====<br />
<br />
make[3]: *** No rule to make target `tbs8921ctrl.o', needed by `v4l/media.o'. Stop.<br />
<br />
Did you select the correct platform in step 4 above?<br />
<br />
During compilation:<br />
make[1]: *** No rule to make target `.myconfig', needed by `config-compat.h'. Stop.<br />
<br />
Make sure you have the right C header files installed for your Linux kernel version.<br />
<br />
====Problems after kernel update====<br />
Some weeks later your /dev/dvb directory has disappeared? Perhaps your kernel was updated, and your machine rebooted. The driver needs to be recompiled. <br />
<br />
If you just run make, it will try to compile against the old kernel headers, so first run<br />
<br />
make distclean<br />
<br />
Then go back to step 4.<br />
<br />
====Deleting media drivers directory to resolve conflicts====<br />
<br />
<br />
Some users have found that deleting the whole kernel media drivers folder (i.e. /lib/modules/`uname -r`/kernel/drivers/media ) and then compiling can resolve conflicts.<br />
<br />
This process will fix issues resulting in "disagrees about version of symbol dvb_frontend_detach" messages in the dmesg output.<br />
<br />
Normally it should be enough to make sure that you recompile the tbs drivers after every kernel build.<br />
<br />
Instructions for this can be found in [http://www.tbsdtv.com/forum/viewtopic.php?f=47&t=8195 the TBS forum]. They are as follows:<br />
<br />
# First remove the existing media modules:<br />
#: <code>sudo rm -rf /lib/modules/$(uname -r)/kernel/drivers/media/</code><br />
# Then reinstall the modules, following steps 3 and 6 above.<br />
<br />
====Compatibility with other cards====<br />
<br />
As noted above you should remove the kernel's existing media drivers before installing the TBS driver package, I omitted this step when installing the drivers and whilst the card worked fine (Mythtv 0.27/Debian 7) my other DVB-S2 tuner card would fail to initialize on start up. There were no obvious messages in the dmesg output indicating symbol issues, the card simply wouldn't work. Once I removed the media directory before installing the TBS drivers the card worked correctly. (The driver in the v4l tree used by the TBS drivers was actually a different name than the one in the Linux kernel I had installed).<br />
<br />
Fighting with another tuner card in load order at boot time - See http://www.tbsdtv.com/forum/viewtopic.php?f=62&t=7747. Additionally it's worth noting that the TBS drivers don't appear to support the 'adapter_nr' argument.<br />
<br />
Fix UDEV problems : <BR><br />
[http://www.linuxtv.org/wiki/index.php/Device_nodes_and_character_devices Device nodes and character devices] <BR><br />
[http://windycitytech.blogspot.fr/2013/03/notes-for-configuring-udev-rules-for.html Notes for configuring udev rules for em28xx USB capture card] <BR><br />
[http://www.djsadhu.com/software/linux-howto-avoid-video-devices-getting-mixed-up-after-reboot-using-udev-rules/ Linux: howto avoid video devices getting mixed up after reboot, using udev rules] <BR><br />
[https://wiki.archlinux.org/index.php/udev#About_udev_rules About udev rules] <BR><br />
[http://www.thelinuxdaily.com/2010/01/statically-assign-dev-nodes-to-hardware-devices-in-linux/ Statically Assign /dev Nodes to Hardware Devices in Linux] <BR><br />
[http://forums.fedoraforum.org/archive/index.php/t-94775.html /dev/video0 problem] <BR> <br />
<br />
<br />
=== IRQ Issues ===<br />
<br />
After an extended period the combined TBS driver may crash with messages (check using <code>dmesg</code>) such as:<br />
irq 16: nobody cared (try booting with the "irqpoll" option)<br />
...<br />
Disabling IRQ #16<br />
<br />
This will render the device inoperable until rebooting (including IR receiver), meaning it won't be able to record anything.<br />
<br />
This can be resolved by configuring the driver to use MSI instead of IRQ:<br />
sudo sh -c 'echo options saa716x_tbs_dvb int_type=1 > /etc/modprobe.d/tbs.conf'<br />
<br />
If you have a newer TBS card such as a TBS6905, or a mix of older and newer ones, then you need TWO lines in <code>/etc/modprobe.d/tbs.conf</code>:<br />
<br />
options tbs_pcie-dvb tbs_int_type=1<br />
options saa716x_tbs-dvb int_type=1<br />
<br />
See [http://www.tbsdtv.com/forum/viewtopic.php?f=52&t=7631#p24903 this TBS forum thread] and [http://bit.ly/1R4QmbU this blog post] for more details.<br />
<br />
=== Changelog ===<br />
<br />
Old releases for drivers if you have problem with your kernel:<br />
<br />
* v151229<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v151229.zip<br />
<br />
* v141019 (2014-10-19)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v141019.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v141019., which has below updating:<br />
* Fix numerous bugs from the previous release<br />
<br />
* v140707 (2014-07-07)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v140707.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v140707., which has below updating:<br />
* improve work of TBS 5990<br />
* add support for latest hardware revisions of TBS 5220, TBS 5881, TBS 5281<br />
* numerous improvements in bug fixes in drivers for TBS 6221, TBS6281, TBS 6285 and TBS 6290<br />
<br />
* v140425 (2014-04-25)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v140425.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v140425., which has below updating:<br />
* Fixed the TBS6928SE ID problem<br />
<br />
* v140323 (2014-03-23)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v140323.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v140323., which has below updating:<br />
* Add support for 5922SE<br />
* Add proper support for retail version of 6922SE<br />
* Add T2 lite support for latest hardware revision of 6221, 6281, 6285<br />
* Add "ClearQAM" (J83B) US Digital Cable support to DVB-C driver for latest T2 lite hardware revision of 6221, 6281, 6285<br />
<br />
* v140113 (2014-01-13)<br />
http://tbsdtv.com/download/document/common/tbs-linux-drivers_v140113.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v140113, which has below updating: <br />
* Improve compatibility with the upcoming Linux kernel 3.13.x<br />
* Add full support (both DVBT/T2 and DVBC are supported) for TBS 5281 <br />
<br />
* v130927 (2013-09-27)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v130927.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v130927, which has below updating:<br />
* Add DVB-C driver for TBS 6221, 6281, 6285, 5220, 5881<br />
* Finalize DVB-T/T2 driver for TBS 6221, 6281, 6285, 5220, 5881<br />
* Improve software compatibility for all DVB-C products<br />
* Improve software compatibility for all DVB-T/T2 products<br />
* Make power control for TBS 6984 more reliable<br />
<br />
* v130802 (2013-08-02)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v130802.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v130802, which has below updating:<br />
* improve compatibility with Linux kernel version 3.10<br />
* preliminary support for Linux kernel version 3.11<br />
* add support for all revisions of TBS 6982<br />
* add support for all revisions of TBS 6928SE<br />
* add PLP (Physical Layer Pipe) support for 6220, 6280, 6284 (PLP, see http://en.wikipedia.org/wiki/DVB-T2#Technical_details)<br />
* fix bug for DVB-C products (TBS 6618, TBS 6680, TBS 5680 and DVB-C USB Stick): improve performance in some DVB-C networks<br />
<br />
* v130506 (2013-05-06)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v130506.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v130506, which has below updating:<br />
* Further improve compatibility with 32-bit Linux kernels version 3.8.x and 3.9.x.<br />
* Add module parameter "enable_ir" that allows disabling IR support for TBS cards.<br />
<br />
* v121119 (2012-11-19)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v121119.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v121119, which has belowed updating:<br />
* Add support for dBm reporting with TBS 6922.<br />
* Improve performance of TBS 6922 and TBS 6985 in case lock can't be acquired.<br />
<br />
* v120617 (2012-06-17)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120617.zip<br />
Changelog :<br />
TBS6280 linux driver is updated to v120617:<br />
A) Add driver and software downloand for TBS5880.<br />
B) Add DVB-C driver support for TBS6220, TBS6280 and TBS6284.<br />
<br />
* v120503 (2012-05-03)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120503.zip<br />
Changelog :<br />
BS6280 linux driver is updated to v120503:<br />
A) Add driver and software downloand for TBS5880.<br />
B) Add DVB-C driver support for TBS6220, TBS6280 and TBS6284.<br />
<br />
* v120412 (2012-04-12)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120412.zip<br />
Changelog :<br />
TBS6280 linux driver is updated to v120412, any Linux kernel version in the range 2.6.31 to 3.2.x and any Linux distribution is supported.<br />
<br />
* v120216 (2012-02-16)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120216.zip<br />
Changelog :<br />
TBS6280 linux driver is updated to v120216, any Linux kernel version in the range 2.6.31 to 3.2.x and any Linux distribution is supported.</div>Hakonhttps://www.linuxtv.org/wiki/index.php?title=TBS_driver_installation&diff=35754TBS driver installation2017-09-11T16:29:15Z<p>Hakon: /* Closed-source drivers */</p>
<hr />
<div>A number of capture devices from [[TBS Technologies]] have a common setup process.<br />
<br />
== Open-source drivers==<br />
<br />
The open source driver is available [https://github.com/ljalves/linux_media/wiki here]. These instructions are taken directly from those pages.<br />
<br />
It does not currently support the remote control, but SD and HD reception is working and appears to be stable and quicker to change channels than the official TBS version.<br />
As of 2014-11-27, this driver was tested with success with [http://en.wikipedia.org/wiki/DVB-T DVB-T] transmitters in Europe. And [http://en.wikipedia.org/wiki/DVB-T2 DVB-T2] transmitters in United-Kingdom and France (only experimental DVB-T2 transmitters at Eiffel tower in Paris in France for UHD TV (AAC+HVEC)).<br />
<br />
It does not currently support the [[TBS6205]].<br />
<br />
===Building the Open Source Driver===<br />
<br />
These instructions are taken from [https://github.com/ljalves/linux_media/wiki/Installating here]:<br />
<br />
git clone https://github.com/ljalves/media_build.git<br />
git clone --depth=1 https://github.com/ljalves/linux_media.git -b latest ./media<br />
cd media_build<br />
make dir DIR=../media<br />
make distclean<br />
make<br />
sudo make install<br />
<br />
If your card uses the saa716x_budget kernel module, you need to set up the configuration options for it. You can check if it does using:<br />
<br />
dmesg | grep -i saa716<br />
<br />
You will see something like this if it does:<br />
<br />
[19659.585518] DVB: registering new adapter (SAA716x dvb adapter)<br />
[19660.201340] SAA716x Budget 0000:02:00.0: DVB: registering adapter 0 frontend 0 (Sony CXD2820R)...<br />
[19660.202234] DVB: registering new adapter (SAA716x dvb adapter)<br />
[19660.212991] SAA716x Budget 0000:02:00.0: DVB: registering adapter 1 frontend 0 (Sony CXD2820R)...<br />
<br />
Next check if the configuration has already been added using:<br />
<br />
grep saa716x /etc/modprobe.d/*<br />
<br />
You will see something like this if it is:<br />
<br />
/etc/modprobe.d/saa716x_budget.conf:options saa716x_budget int_type=1<br />
<br />
If it is not there, create a file containing the config:<br />
<br />
sudo sh -c 'echo options saa716x_budget int_type=1 > /etc/modprobe.d/saa716x_budget.conf'<br />
<br />
See also [[TBS_driver_installation#IRQ_Issues]] for module config of the closed source drivers.<br />
<br />
===Loading the Modules===<br />
<br />
The simplest option is to reboot, but if you would rather not, execute these commands:<br />
<br />
sudo make rmmod<br />
sudo modprobe saa716x_budget int_type=1<br />
<br />
===Identification / Check module loaded correctly ===<br />
<br />
Note : "Capabilities" information are only show if you use the root account, else you will have "Capabilities: <access denied>".<br />
<br />
With kernel 3.14.24 and Mageia Linux. <br />
<br />
# lspci -v | grep --after-context=10 7160<br />
<br />
04:00.0 Multimedia controller: Philips Semiconductors SAA7160 (rev 03)<br />
Subsystem: Device 6280:0011<br />
Flags: bus master, fast devsel, latency 0, IRQ 18<br />
Memory at e0300000 (64-bit, non-prefetchable) [size=1M]<br />
Capabilities: [40] MSI: Enable- Count=1/32 Maskable- 64bit+<br />
Capabilities: [50] Express Endpoint, MSI 00<br />
Capabilities: [74] Power Management version 2<br />
Capabilities: [80] Vendor Specific Information: Len=50 <?><br />
Capabilities: [100] Vendor Specific Information: ID=0000 Rev=0 Len=088 <?><br />
Kernel driver in use: SAA716x Budget<br />
Kernel modules: saa716x_budget<br />
<br />
You need to see the 2 following lines that show that the SAA716x driver for the TBS TV card is loaded :<br />
Kernel driver in use: SAA716x Budget<br />
Kernel modules: saa716x_budget <br />
<br />
=== Check if dvb adaptor nodes are created ===<br />
<br />
Now, if the SAA716x driver is loaded, the dvb adaptor nodes should now exist<br />
ls -al /dev/dvb<br />
<br />
drwxr-xr-x 4 root root 80 oct. 23 08:37 ./<br />
drwxr-xr-x 19 root root 4140 oct. 23 08:40 ../<br />
drwxr-xr-x 2 root root 120 oct. 23 08:37 adapter0/<br />
drwxr-xr-x 2 root root 120 oct. 23 08:37 adapter1/<br />
<br />
# lsdvb<br />
<br />
lsdvb: Simple utility to list PCI/PCIe DVB devices<br />
Version: 0.0.4<br />
Copyright (C) Manu Abraham<br />
<br />
SAA716x Budget (1131:7160 6280:11) on PCI Domain:0 Bus:4 Device:0 Function:0<br />
DEVICE:0 ADAPTER:0 FRONTEND:0 (Sony CXD2820R) <br />
FE_OFDM Fmin=48MHz Fmax=864MHz<br />
DEVICE:0 ADAPTER:1 FRONTEND:0 (Sony CXD2820R) <br />
FE_OFDM Fmin=48MHz Fmax=864MHz<br />
<br />
=== Linux kernel modules loaded ===<br />
<br />
* DVB Tuner card part only<br />
<br />
We can saw the driver modules needed by TBS TV card : saa716x_budget, tda18212, cxd2820r. <br />
<br />
# lsmod<br />
<br />
...<br />
tda18212 13180 2 <br />
regmap_i2c 12915 1 tda18212<br />
...<br />
saa716x_budget 34859 0 <br />
tas2101 19952 1 saa716x_budget<br />
cxd2820r 31562 1 saa716x_budget<br />
mb86a16 27647 1 saa716x_budget<br />
cx24117 25174 1 saa716x_budget<br />
saa716x_core 71005 1 saa716x_budget<br />
stv090x 70354 1 saa716x_budget<br />
dvb_core 117590 3 saa716x_core,saa716x_budget,cxd2820r<br />
i2c_mux 12896 1 tas2101<br />
...<br />
i2c_core 40643 19 drm,i2c_i801,i2c_mux,saa716x_core,mb86a16,saa716x_budget,regmap_i2c,tas2101,i2c_algo_bit,stv090x,cxd2820r,nvidia,v4l2_common,tveeprom,tda18212,videode<br />
<br />
===Troubleshooting===<br />
<br />
If you find module load errors like "module has wrong symbol version" means that there still are old modules from your previous media tree installation (usually duplicated modules in two different places).<br />
<br />
sudo rm -rf /lib/modules/`uname -r`/kernel/drivers/media/*<br />
<br />
===Upgrading Sources and Re-installing===<br />
<br />
cd media<br />
git remote update<br />
git pull<br />
cd ../media_build<br />
git remote update<br />
git pull<br />
make<br />
sudo make install<br />
<br />
You should now reboot or unload/reload the modules manually.<br />
<br />
===Supporting the Open Source Driver===<br />
<br />
Any help that you can give to Luis or [https://github.com/crazycat69 crazycat69] (another contributor to the project) through testing, patches or getting the driver merged into the upstream code will (hopefully) be appreciated.<br />
<br />
Luis also has a [https://github.com/ljalves/linux_media/wiki donate link] on github.<br />
<br />
== Closed-source drivers ==<br />
<br />
Proprietary drivers are available from the [http://www.tbsdtv.com/download/ TBS dtv website] or [https://www.tbsiptv.com/downloads TBS iptv website]. <br />
<br />
=== Installing drivers ===<br />
As of 11 September 2017, the latest version is [https://www.tbsiptv.com/download/common/tbs-linux-drivers_v170330.zip 170330]<br />
<br />
Version 170330 compiles cleanly on gentoo linux kernels "gentoo-sources-4.9.<x>" . gentoo-sources-4.11 and newer give missing symbols.<br />
<br />
'''0. Download the drivers''' <br />
<br />
'''1. Extract the ZIP file tbs-linux-drivers_v[VERSION NUMBER].zip.'''<br />
<br />
mkdir tbs-linux-drivers<br />
cd tbs-linux-drivers<br />
unzip ../tbs-linux-drivers_v[VERSION_NUMBER].zip<br />
<br />
<br />
The directory tbs-linux-drivers will now contain README_* for various TBS-cards, check for your options (combinations of DVB-T/T2/S/C wil require various adjustments). The procedure below is a summary of those READMEs, as well as some hints/caveats. The directory will also contain linux-tbs-drivers.tar.bz2 which has v4l modules meant to be compiled out-of-tree from the kernel you are actually running. Source for your currently running kernel should be installed before attempting build. Search the files for the string 'uname -r' if you are not happy with that.<br />
<br />
'''2. Extract linux-tbs-drivers.tar.bz2 archive'''<br />
<br />
bzcat linux-tbs-drivers.tar.bz2 | tar xv<br />
<br />
'''3. Change to driver package directory'''<br />
<br />
cd linux-tbs-drivers<br />
<br />
<br />
'''4. Select platform architecture'''<br />
<br />
This will rename arch-specific blobs to '*.o' so that the module-build will find them.<br />
<br />
for x86 kernel 3.x (x86 32 bit installations of kernel 3.x)<br />
./v4l/tbs-x86_r3.sh<br />
<br />
''or'' for x86 kernel 2.6.x (x86 32 bit installations of kernel 2.6.x)<br />
./v4l/tbs-x86.sh<br />
<br />
''or'' for any x86_64 kernel (x86 64 bit installations of Linux)<br />
./v4l/tbs-x86_64.sh<br />
<br />
You should then receive a message along these lines:<br />
TBS drivers configured for [NAME OF PLATFORM] platform.<br />
<br />
'''5. Build the driver.''' <br />
<br />
Recompiles v4l for a wide range of cards, currently about 500; will take many minutes.<br />
<br />
We're ready to build; add -j3 parameter for make command line for a faster build on a dual core machine, -j5 on a quad core machine, etc.<br />
make<br />
<br />
If you get -bash: make: command not found, then <code>sudo apt-get install build-essential</code><br />
<br />
'''6. Install driver.''' Existing drivers for other v4l related hardware, such as lirc could also get updated.<br />
sudo make install<br />
<br />
'''7. Load newly installed driver'''<br />
sudo modprobe -v tbs62x0fe<br />
<br />
'''8. Check it loaded correctly'''<br />
tail /var/log/syslog<br />
<br />
You should get a message about tainting the kernel. This is fine.<br />
<br />
kernel: tbs62x0fe: module license 'TurboSight Proprietary' taints kernel.<br />
<br />
Running '''<code>dmesg | tail</code>''' should end with something along these lines:<br />
<br />
[ 7330.361868] tbs62x0fe: module license 'TurboSight Proprietary' taints kernel.<br />
[ 7330.361875] Disabling lock debugging due to kernel taint<br />
<br />
dvb adaptor nodes should now exist<br />
ls -al /dev/dvb <br />
<br />
drwxr-xr-x 2 root root 120 Jul 9 21:12 adapter0<br />
drwxr-xr-x 2 root root 120 Jul 9 21:12 adapter1<br />
drwxr-xr-x 2 root root 120 Jul 9 21:12 adapter2<br />
drwxr-xr-x 2 root root 120 Jul 9 21:12 adapter3<br />
<br />
<br />
# lsdvb<br />
lsdvb: Simple utility to list PCI/PCIe DVB devices<br />
Version: 0.0.4<br />
Copyright (C) Manu Abraham<br />
SAA716x TBS (1131:7160 6280:11) on PCI Domain:0 Bus:4 Device:0 Function:0<br />
DEVICE:0 ADAPTER:0 FRONTEND:0 (TurboSight TBS 62x0 DVBT/T2 frontend) <br />
FE_OFDM Fmin=47MHz Fmax=870MHz<br />
DEVICE:0 ADAPTER:1 FRONTEND:0 (TurboSight TBS 62x0 DVBT/T2 frontend) <br />
FE_OFDM Fmin=47MHz Fmax=870MHz<br />
<br />
=== Troubleshooting ===<br />
<br />
====Compilation problems====<br />
<br />
make[3]: *** No rule to make target `tbs8921ctrl.o', needed by `v4l/media.o'. Stop.<br />
<br />
Did you select the correct platform in step 4 above?<br />
<br />
During compilation:<br />
make[1]: *** No rule to make target `.myconfig', needed by `config-compat.h'. Stop.<br />
<br />
Make sure you have the right C header files installed for your Linux kernel version.<br />
<br />
====Problems after kernel update====<br />
Some weeks later your /dev/dvb directory has disappeared? Perhaps your kernel was updated, and your machine rebooted. The driver needs to be recompiled. <br />
<br />
If you just run make, it will try to compile against the old kernel headers, so first run<br />
<br />
make distclean<br />
<br />
Then go back to step 4.<br />
<br />
====Deleting media drivers directory to resolve conflicts====<br />
<br />
<br />
Some users have found that deleting the whole kernel media drivers folder (i.e. /lib/modules/`uname -r`/kernel/drivers/media ) and then compiling can resolve conflicts.<br />
<br />
This process will fix issues resulting in "disagrees about version of symbol dvb_frontend_detach" messages in the dmesg output.<br />
<br />
Normally it should be enough to make sure that you recompile the tbs drivers after every kernel build.<br />
<br />
Instructions for this can be found in [http://www.tbsdtv.com/forum/viewtopic.php?f=47&t=8195 the TBS forum]. They are as follows:<br />
<br />
# First remove the existing media modules:<br />
#: <code>sudo rm -rf /lib/modules/$(uname -r)/kernel/drivers/media/</code><br />
# Then reinstall the modules, following steps 3 and 6 above.<br />
<br />
====Compatibility with other cards====<br />
<br />
As noted above you should remove the kernel's existing media drivers before installing the TBS driver package, I omitted this step when installing the drivers and whilst the card worked fine (Mythtv 0.27/Debian 7) my other DVB-S2 tuner card would fail to initialize on start up. There were no obvious messages in the dmesg output indicating symbol issues, the card simply wouldn't work. Once I removed the media directory before installing the TBS drivers the card worked correctly. (The driver in the v4l tree used by the TBS drivers was actually a different name than the one in the Linux kernel I had installed).<br />
<br />
Fighting with another tuner card in load order at boot time - See http://www.tbsdtv.com/forum/viewtopic.php?f=62&t=7747. Additionally it's worth noting that the TBS drivers don't appear to support the 'adapter_nr' argument.<br />
<br />
Fix UDEV problems : <BR><br />
[http://www.linuxtv.org/wiki/index.php/Device_nodes_and_character_devices Device nodes and character devices] <BR><br />
[http://windycitytech.blogspot.fr/2013/03/notes-for-configuring-udev-rules-for.html Notes for configuring udev rules for em28xx USB capture card] <BR><br />
[http://www.djsadhu.com/software/linux-howto-avoid-video-devices-getting-mixed-up-after-reboot-using-udev-rules/ Linux: howto avoid video devices getting mixed up after reboot, using udev rules] <BR><br />
[https://wiki.archlinux.org/index.php/udev#About_udev_rules About udev rules] <BR><br />
[http://www.thelinuxdaily.com/2010/01/statically-assign-dev-nodes-to-hardware-devices-in-linux/ Statically Assign /dev Nodes to Hardware Devices in Linux] <BR><br />
[http://forums.fedoraforum.org/archive/index.php/t-94775.html /dev/video0 problem] <BR> <br />
<br />
<br />
=== IRQ Issues ===<br />
<br />
After an extended period the combined TBS driver may crash with messages (check using <code>dmesg</code>) such as:<br />
irq 16: nobody cared (try booting with the "irqpoll" option)<br />
...<br />
Disabling IRQ #16<br />
<br />
This will render the device inoperable until rebooting (including IR receiver), meaning it won't be able to record anything.<br />
<br />
This can be resolved by configuring the driver to use MSI instead of IRQ:<br />
sudo sh -c 'echo options saa716x_tbs_dvb int_type=1 > /etc/modprobe.d/tbs.conf'<br />
<br />
If you have a newer TBS card such as a TBS6905, or a mix of older and newer ones, then you need TWO lines in <code>/etc/modprobe.d/tbs.conf</code>:<br />
<br />
options tbs_pcie-dvb tbs_int_type=1<br />
options saa716x_tbs-dvb int_type=1<br />
<br />
See [http://www.tbsdtv.com/forum/viewtopic.php?f=52&t=7631#p24903 this TBS forum thread] and [http://bit.ly/1R4QmbU this blog post] for more details.<br />
<br />
=== Changelog ===<br />
<br />
Old releases for drivers if you have problem with your kernel:<br />
<br />
* v151229<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v151229.zip<br />
<br />
* v141019 (2014-10-19)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v141019.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v141019., which has below updating:<br />
* Fix numerous bugs from the previous release<br />
<br />
* v140707 (2014-07-07)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v140707.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v140707., which has below updating:<br />
* improve work of TBS 5990<br />
* add support for latest hardware revisions of TBS 5220, TBS 5881, TBS 5281<br />
* numerous improvements in bug fixes in drivers for TBS 6221, TBS6281, TBS 6285 and TBS 6290<br />
<br />
* v140425 (2014-04-25)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v140425.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v140425., which has below updating:<br />
* Fixed the TBS6928SE ID problem<br />
<br />
* v140323 (2014-03-23)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v140323.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v140323., which has below updating:<br />
* Add support for 5922SE<br />
* Add proper support for retail version of 6922SE<br />
* Add T2 lite support for latest hardware revision of 6221, 6281, 6285<br />
* Add "ClearQAM" (J83B) US Digital Cable support to DVB-C driver for latest T2 lite hardware revision of 6221, 6281, 6285<br />
<br />
* v140113 (2014-01-13)<br />
http://tbsdtv.com/download/document/common/tbs-linux-drivers_v140113.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v140113, which has below updating: <br />
* Improve compatibility with the upcoming Linux kernel 3.13.x<br />
* Add full support (both DVBT/T2 and DVBC are supported) for TBS 5281 <br />
<br />
* v130927 (2013-09-27)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v130927.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v130927, which has below updating:<br />
* Add DVB-C driver for TBS 6221, 6281, 6285, 5220, 5881<br />
* Finalize DVB-T/T2 driver for TBS 6221, 6281, 6285, 5220, 5881<br />
* Improve software compatibility for all DVB-C products<br />
* Improve software compatibility for all DVB-T/T2 products<br />
* Make power control for TBS 6984 more reliable<br />
<br />
* v130802 (2013-08-02)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v130802.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v130802, which has below updating:<br />
* improve compatibility with Linux kernel version 3.10<br />
* preliminary support for Linux kernel version 3.11<br />
* add support for all revisions of TBS 6982<br />
* add support for all revisions of TBS 6928SE<br />
* add PLP (Physical Layer Pipe) support for 6220, 6280, 6284 (PLP, see http://en.wikipedia.org/wiki/DVB-T2#Technical_details)<br />
* fix bug for DVB-C products (TBS 6618, TBS 6680, TBS 5680 and DVB-C USB Stick): improve performance in some DVB-C networks<br />
<br />
* v130506 (2013-05-06)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v130506.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v130506, which has below updating:<br />
* Further improve compatibility with 32-bit Linux kernels version 3.8.x and 3.9.x.<br />
* Add module parameter "enable_ir" that allows disabling IR support for TBS cards.<br />
<br />
* v121119 (2012-11-19)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v121119.zip<br />
Changelog :<br />
TBS6280 Linux Driver is updated to v121119, which has belowed updating:<br />
* Add support for dBm reporting with TBS 6922.<br />
* Improve performance of TBS 6922 and TBS 6985 in case lock can't be acquired.<br />
<br />
* v120617 (2012-06-17)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120617.zip<br />
Changelog :<br />
TBS6280 linux driver is updated to v120617:<br />
A) Add driver and software downloand for TBS5880.<br />
B) Add DVB-C driver support for TBS6220, TBS6280 and TBS6284.<br />
<br />
* v120503 (2012-05-03)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120503.zip<br />
Changelog :<br />
BS6280 linux driver is updated to v120503:<br />
A) Add driver and software downloand for TBS5880.<br />
B) Add DVB-C driver support for TBS6220, TBS6280 and TBS6284.<br />
<br />
* v120412 (2012-04-12)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120412.zip<br />
Changelog :<br />
TBS6280 linux driver is updated to v120412, any Linux kernel version in the range 2.6.31 to 3.2.x and any Linux distribution is supported.<br />
<br />
* v120216 (2012-02-16)<br />
http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v120216.zip<br />
Changelog :<br />
TBS6280 linux driver is updated to v120216, any Linux kernel version in the range 2.6.31 to 3.2.x and any Linux distribution is supported.</div>Hakonhttps://www.linuxtv.org/wiki/index.php?title=Saa7134-alsa&diff=19467Saa7134-alsa2007-03-09T04:26:19Z<p>Hakon: /* ALSA audio with other applications */</p>
<hr />
<div>=== How to use alsa or oss with saa7134 ===<br />
<br />
Starting with kernel 2.6.15, the module saa7134-alsa lets you use ALSA to get sound directly from your capture card. From 2.6.16 you can use this module with more than one capture card. <br />
<br />
In kernel 2.6.16, the saa7134-oss module is also separated out, and the two modules are treated in much the same way; you can build both and switch between them, though both cannot be loaded at once.<br />
<br />
=== Insmod parameters ===<br />
<br />
Now that both alsa and oss DMA sound have been separated out as distinct modules, it is no longer necessary (though it is not forbidden) to include the insmod parameter "alsa=1" or "oss=1".<br />
<br />
On the other hand, on the 2.6.16 kernel, it's not safe to use the parameter "disable_ir=1" to turn off the infrared system for the remote -- that caused an oops. This is fixed in 2.6.17.<br />
<br />
In the case of more than one card, you can use something like this:<br />
<br />
saa7134 card=2,2,2,2 tuner=43,43,43,43 video_nr=1,2,3,4 vbi_nr=1,2,3,4 radio_nr=1,2,3,4 <br />
<br />
In dmesg, you should see this type of content murmuring:<br />
<br />
<pre><br />
input: saa7134 IR (LifeView FlyVIDEO30 as /class/input/input5<br />
tuner 5-0061: chip found @ 0xc2 (saa7133[3])<br />
tuner 5-0061: type set to 43 (Philips NTSC MK3 (FM1236MK3 or FM1236/F))<br />
tuner 5-0063: chip found @ 0xc6 (saa7133[3])<br />
saa7133[3]: i2c eeprom 00: 69 51 38 01 10 28 ff ff ff ff ff ff ff ff ff ff<br />
saa7133[3]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br />
saa7133[3]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br />
saa7133[3]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br />
saa7133[3]: i2c eeprom 40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br />
saa7133[3]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br />
saa7133[3]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br />
saa7133[3]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff<br />
saa7133[3]: registered device video4 [v4l2]<br />
saa7133[3]: registered device vbi4<br />
saa7133[3]: registered device radio4<br />
</pre><br />
<br />
To then load the new driver that lets you get sound off the PCI bus via ALSA or OSS, you would normally just issue "sudo modprobe saa7134-alsa" or "sudo modprobe saa7134-oss". You can also deliberately assign the enumeration; for instance, for four cards, do this for alsa:<br />
<br />
sudo modprobe saa7134-alsa index=1,2,3,4<br />
<br />
Again, dmesg approves:<br />
<br />
<pre><br />
saa7134 ALSA driver for DMA sound loaded<br />
saa7133[0]/alsa: saa7133[0] at 0xf5006000 irq 19 registered as card 1<br />
saa7133[1]/alsa: saa7133[1] at 0xf5007000 irq 20 registered as card 2<br />
saa7133[2]/alsa: saa7133[2] at 0xf5004000 irq 21 registered as card 3<br />
saa7133[3]/alsa: saa7133[3] at 0xf5005000 irq 22 registered as card 4 <br />
</pre><br />
<br />
If instead you use OSS, issue this to determine enumeration:<br />
<br />
sudo modprobe saa7134-oss dsp_nr=1,2,3,4 mixer_nr=1,2,3,4<br />
<br />
You should see this in dmesg:<br />
<br />
<pre><br />
saa7134 OSS driver for DMA sound loaded<br />
saa7133[0]: registered device dsp1<br />
saa7133[0]: registered device mixer1<br />
saa7133[1]: registered device dsp2<br />
saa7133[1]: registered device mixer2<br />
saa7133[2]: registered device dsp3<br />
saa7133[2]: registered device mixer3<br />
saa7133[3]: registered device dsp4<br />
saa7133[3]: registered device mixer4<br />
</pre><br />
<br />
Note that if you use saa7134-oss in Debian, and build your kernel with ALSA as modules, you may need to add saa7134 to the OSS-module-list to keep your OSS emulation under ALSA (cf. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=359851 #359851]):<br />
<br />
echo saa7134 >> /usr/share/linux-sound-base/OSS-module-list<br />
<br />
If OSS emulation is not working, some applications (such as VLC) that expect ALSA sound devices won't be able to find the legacy OSS devices created by saa7134-oss.<br />
<br />
If your ALSA is built into the kernel rather than as modules, you won't need to worry about this.<br />
<br />
===Insert modules on boot===<br />
<br />
To insert the modules with these parameters on boot, you can create a file called /etc/modprobe.d/saa7134 with the following lines (adjust card and tuner numbers as required):<br />
<br />
options saa7134 card=2,2,2,2 tuner=43,43,43,43 video_nr=1,2,3,4 vbi_nr=1,2,3,4 radio_nr=1,2,3,4 <br />
install saa7134 /sbin/modprobe --ignore-install saa7134; /sbin/modprobe saa7134-alsa<br />
options saa7134-alsa index=1,2,3,4<br />
<br />
Your distribution may require you to put these lines into /etc/modprobe.conf; this is not a good idea in Debian, since the files in /etc/modprobe.d will then be ignored.<br />
<br />
If instead you use OSS, these lines will load the modules for four cards:<br />
<br />
options saa7134 card=2,2,2,2 tuner=43,43,43,43 video_nr=1,2,3,4 vbi_nr=1,2,3,4 radio_nr=1,2,3,4 <br />
install saa7134 /sbin/modprobe --ignore-install saa7134; /sbin/modprobe saa7134-oss<br />
options saa7134-oss dsp_nr=1,2,3,4 mixer_nr=1,2,3,4<br />
<br />
Note that once you've entered this information inside /etc/modprobe.d, your subsequent manual insertions will also make use of this information. Scripts, for instance, need not repeat it.<br />
<br />
These instructions are of course specific to kernels 2.6.16 and later, as earlier kernels do not have separate DMA modules. <br />
<br />
For kernels before 2.6.16, DMA sound via OSS is activated simply by the insmod parameter "oss=1".<br />
<br />
=== Set permissions ===<br />
<br />
Make sure your users are added to the group "audio" to get access to them -- in Debian, if your user name is "tv", you would use<br />
<br />
adduser tv audio<br />
<br />
=== List your capture devices ===<br />
<br />
To get a list of your alsa capture devices, issue<br />
<br />
arecord -l<br />
<br />
You should see your regular sound card and the capture card(s):<br />
<br />
<pre><br />
**** List of CAPTURE Hardware Devices ****<br />
card 0: CK8S [NVidia CK8S], device 0: Intel ICH [NVidia CK8S]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 0: CK8S [NVidia CK8S], device 1: Intel ICH - MIC ADC [NVidia CK8S - MIC ADC]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 1: SAA7134 [SAA7134], device 0: SAA7134 PCM [SAA7134 PCM]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 2: SAA7134_1 [SAA7134], device 0: SAA7134 PCM [SAA7134 PCM]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 3: SAA7134_2 [SAA7134], device 0: SAA7134 PCM [SAA7134 PCM]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
card 4: SAA7134_3 [SAA7134], device 0: SAA7134 PCM [SAA7134 PCM]<br />
Subdevices: 1/1<br />
Subdevice #0: subdevice #0<br />
</pre><br />
<br />
=== Configure the cards to record ===<br />
<br />
Set the cards to record on channel 1 and max volume, using for instance<br />
<br />
alsamixergui -c 1<br />
<br />
for each of the cards.<br />
<br />
=== Watch with mplayer ===<br />
<br />
You should now be ready to watch live tv with mplayer, using something like this:<br />
<br />
These are for rf connections:<br />
<br />
US broadcast or satellite:<br />
mplayer tv://$channel -tv driver=v4l2:device=/dev/video0:chanlist=us-bcast:alsa:\<br />
adevice=hw.1,0:amode=1:audiorate=32000:forceaudio:volume=100:immediatemode=0:norm=NTSC<br />
<br />
If you're using a satellite box, $channel should probably be set to 3 or 4. If that doesn't work, try the US cable TV setup below. <br />
If you're getting your broadcast off the air, you can run the scantv utility to detect stations and set $channel to the local channel for your area.<br />
<br />
US cable:<br />
mplayer tv://"insert channel" -tv driver=v4l2:device=/dev/video0:chanlist=us-cable:alsa:\<br />
adevice=hw.1,0:amode=1:audiorate=32000:forceaudio:volume=100:immediatemode=0:norm=NTSC<br />
<br />
Here again you can run the scantv utility to detect the channels available from your provider, or you can use your provider's channel table. <br />
<br />
If "adevice=hw.1,0" doesn't work, try simply "adevice=hw.1". Some tuners require "adevice=hw.2" -- for instance, on a board with nforce 3 250/gb chipsets. If others experiance this with other boards, please update.<br />
<br />
<br />
=== Record with mencoder ===<br />
<br />
It may be simpler to get sound during recording than during playback. I get good sound using this, where $DEV is the number of the device node:<br />
<br />
mencoder -tv driver=v4l2:device=/dev/video$DEV:fps=30000/1001:chanlist=us-bcast:\<br />
audiorate=32000:alsa:adevice=hw.$DEV:input=0:amode=1:normid=4:width=576:height=432 \<br />
-ovc x264 -x264encopts threads=2:bitrate=500:bframes=2:subq=1:me=1:frameref=4:8x8dct \<br />
-oac mp3lame -lameopts cbr:br=64 -endpos $TIM -o $DIR/$FIL.avi tv:// > /dev/null<br />
<br />
So the alsa device is simply called hw.1 -- not hw.1,0. The line is taken from the [[channel script]]. You may find you need to use hw.2 instead, depending on the audio hardware on your system.<br />
<br />
Neither ffmpeg nor transcode as yet have ALSA support.<br />
<br />
Because so many applications still appear to have difficulties accessing ALSA's odd device enumeration, the OSS module for DMA sound continues to be useful. You can also use ALSA's OSS emulation with saa7134-alsa to get /dev/dspX devices for OSS-aware applications.<br />
<br />
=== ALSA audio with other applications ===<br />
<br />
To hear the audio through ALSA using tvtime (or other programs that don't support it directly), run the following command after starting tvtime:<br />
<br />
arecord -D hw:1,0 -r 32000 -c 2 -f S16_LE | aplay -<br />
<br />
It basically records at 32kHz Stereo from the SAA7134 ALSA source (hw:1,0 or change accordingly), and plays it through your default ALSA output. Look at the options from aplay to change your output.<br />
<br />
There might be a delay between the video and the audio. To avoid it, specify a device for aplay (not the 'default' device):<br />
<br />
arecord -D hw:1,0 -r 32000 -c 2 -f S16_LE | aplay -D surround41<br />
<br />
In order to get full surround sound from the stereo TV audio output, edit your /etc/asound.conf or ~/.asoundrc file as described in ALSA FAQ028 (http://alsa.opensrc.org/FAQ028) and use this device:<br />
<br />
arecord -D hw:1,0 -r 32000 -c 2 -f S16_LE | aplay -D ch51dup<br />
<br />
I don't know how to use ALSA directly with xawtv, motv, kdtv, tvtime, or zapping; if you do, please add it in here!<br />
<br />
If using arecord still causes a delay between the video and the audio, try using sox:<br />
<br />
sox -r 32000 -w -t alsa hw:1,0 -t alsa hw:0,0<br />
<br />
Sox might get you mono sound, while all the alsa solutions cause delays. A combination has been known to work:<br />
<br />
arecord -D hw:1,0 -r 32000 -c 2 -f S16_LE | sox -q -c 2 -r 32000 -w -t wav - -t alsa hw:0,0</div>Hakon