https://www.slackwiki.com/api.php?action=feedcontributions&user=Sinyorita&feedformat=atomSlackWiki - User contributions [en]2024-03-28T18:19:45ZUser contributionsMediaWiki 1.40.0https://www.slackwiki.com/index.php?title=DVB&diff=898DVB2014-01-23T03:00:32Z<p>Sinyorita: Undo revision 891 by Count Zero (talk)</p>
<hr />
<div>[[Category:Tutorials]]<br />
<br />
== Introduction ==<br />
I've been a big fan of tv tuner cards for almost as long as I've been in to computers. As soon as my dad bought an HDTV, I knew I had to have it, and the first chance I had was to buy the ATI HDTV Wonder card for my computer. Sure, the picture can be bad sometimes because you are grabbing the signal out of the air with an unamplified antenna, but it is well worth it. When I finally decided to make the jump to Linux a few months ago, I researched ahead of time if it was possible to use my card in Linux, and to my surprise I could. Let me note that it did take me a few months of on and off work to get it running since I was pretty much learning Linux from scratch along the way. The biggest pitfalls I ran in to was the lack of a complete HOWTO to lead me through the steps from start to finish and the lack of a large DVB/HDTV user community to ask for help when I ran in to trouble. I hope that this tutorial gets rid of those two pitfalls and lets you get your HDTV card working without any trouble.<br />
<br />
==Kernel Configuration ==<br />
I'm not sure which kernel exactly began including the necesary modules for the ATI HDTV Wonder card, but I do know that kernel versions 2.6.15 and up have them. In order to use the ATI HDTV Wonder, you need to enable the correct modules in the kernel. You need to enable I2C and the cx88 DVB modules under Device Drivers. If you are new to building your own kernel, see [[Kernel26Compilation]]<br />
<br />
snipped from my .config<br />
#<br />
# I2C support<br />
#<br />
CONFIG_I2C=m<br />
CONFIG_I2C_CHARDEV=m<br />
<br />
#<br />
# I2C Algorithms<br />
#<br />
CONFIG_I2C_ALGOBIT=m<br />
<br />
#<br />
# Video For Linux<br />
#<br />
<br />
#<br />
# Video Adapters<br />
#<br />
CONFIG_VIDEO_CX88=m<br />
CONFIG_VIDEO_CX88_ALSA=m<br />
CONFIG_VIDEO_CX88_DVB=m<br />
CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=n<br />
CONFIG_VIDEO_CX88_VP3054=m<br />
#<br />
# Digital Video Broadcasting Devices<br />
#<br />
CONFIG_DVB=y<br />
CONFIG_DVB_CORE=m<br />
<br />
#<br />
# ATSC (North American/Korean Terresterial DTV) frontends<br />
#<br />
CONFIG_DVB_NXT200X=m<br />
<br />
If you are a less advanced user, it won't hurt anything if you select everything that might remotely deal with DVB as a Module (hit `M`). When you are done, save the configuration and compile the kernel. Before you reboot, you need to download the firmware for the card.<br />
[http://www.propertykita.com/rumah.html Rumah Dijual di Jakarta], [http://www.awanirentcar.com Sewa mobil jakarta], [http://kiosauto.com Aksesoris mobil]<br />
<br />
== Firmware ==<br />
Make sure you are in /usr/src/linux<br />
# pwd<br />
/usr/src/linux<br />
There is a script provided that will download the appropriate firmware driver for you. First, make it executable, then run it.<br />
# chmod +x Documentation/dvb/get_dvb_firmware<br />
# ./Documentation/dvb/get_dvb_firmware nxt2004<br />
Then the firmware file needs to be copied to the directory where hotplug will find it. On Slackware, this directory is /lib/firmware<br />
[http://www.optimaweb.co.id/jasa-seo Jasa seo Jakarta], [http://www.optimaweb.co.id/jasa-seo Jasa seo Bergaransi]<br />
# cp dvb-fe-nxt2004.fw /lib/firmware<br />
Now you can reboot in to your new kernel, and your card should be automatically recognized. You can check to see if the modules loaded with lsmod<br />
$ lsmod | grep cx88<br />
cx88_dvb 8964 0<br />
cx8802 8068 1 cx88_dvb<br />
cx88xx 54180 2 cx88_dvb,cx8802<br />
ir_common 7812 1 cx88xx<br />
btcx_risc 3848 2 cx8802,cx88xx<br />
tveeprom 12304 1 cx88xx<br />
cx88_vp3054_i2c 3456 1 cx88_dvb<br />
i2c_algo_bit 7432 2 cx88xx,cx88_vp3054_i2c<br />
mt352 5380 1 cx88_dvb<br />
or51132 8324 1 cx88_dvb<br />
video_buf_dvb 4228 1 cx88_dvb<br />
video_buf 15364 4 cx88_dvb,cx8802,cx88xx,video_buf_dvb<br />
nxt200x 11524 1 cx88_dvb<br />
cx24123 7684 1 cx88_dvb<br />
lgdt330x 6684 1 cx88_dvb<br />
cx22702 5252 1 cx88_dvb<br />
i2c_core 15248 15 nvidia,w83627hf,eeprom,i2c_isa,i2c_nforce2,cx88_dvb,cx88xx,tveeprom,i2c_algo_bit,mt352,or51132,nxt200x,cx24123,lgdt330x,cx22702<br />
dvb_pll 9220 4 cx88_dvb,or51132,nxt200x,cx22702<br />
<br />
== DVB Apps ==<br />
All that we are really interested in with DVB Apps is scan and azap. I created a SlackBuild script that will create a package from the dvb apps cvs. To use the SlackBuild script, you will first need to create a temporary directory to house the relevant components and then you will need to get the sources from the dvb apps CVS. If you are new to SlackBuild scripts, check out the [[SlackBuild_Scripts]] tutorial. You will log in to the cvs with an empty password.<br />
$ mkdir ~/dvb-apps-build<br />
$ cd ~/dvb-apps-build<br />
$ cvs -d :pserver:anonymous@cvs.linuxtv.org:/cvs/linuxtv login<br />
$ cvs -z3 -d :pserver:anonymous@cvs.linuxtv.org:/cvs/linuxtv co dvb-apps<br />
<br />
== Udev Rules ==<br />
By default, my udev would not create the correct devices nodes, so I found these rules on a website which fixed the problem. I can not remember what site I found them on at the moment, but I will be sure to give credit to that site when I find it again. You will need to create or edit the file /etc/udev/rules.d/010_local.rules and place this information in it:<br />
#create correct dvb devices<br />
KERNEL=="dvb0.dvr*", NAME="dvb/adapter0/dvr%n"<br />
KERNEL=="dvb0.demux*", NAME="dvb/adapter0/demux%n"<br />
KERNEL=="dvb0.frontend*", NAME="dvb/adapter0/frontend%n"<br />
KERNEL=="dvb0.audio*", NAME="dvb/adapter0/audio%n"<br />
KERNEL=="dvb0.ca*", NAME="dvb/adapter0/ca%n"<br />
KERNEL=="dvb0.osd*", NAME="dvb/adapter0/osd%n"<br />
KERNEL=="dvb0.net*", NAME="dvb/adapter0/net%n"<br />
KERNEL=="dvb0.video*", NAME="dvb/adapter0/video%n"<br />
<br />
== Scanning for Channels ==<br />
Once dvb-apps is installed, you can see if everything is working correctly. First, you need to create the ~/.azap directory, then you need to create your channels.conf file. Since my ATI HDTVWonder uses an antenna to grab channels, I used the us-NTSC-center-frequencies-8VSB database file.<br />
$ mkdir ~/.azap<br />
$ touch ~/.azap/channels.conf<br />
$ scan /usr/local/share/dvb/scan/atsc/us-NTSC-center-frequencies-8VSB > ~/.azap/channels.conf<br />
This will take some time and it will give you a lot of "tuning failed" messages, but if it is successful, you will see something like this when it is done:<br />
dumping lists (12 services)<br />
WJZ-DT:617000000:8VSB:49:52:1<br />
WNUV High Def:629000000:8VSB:49:52:3<br />
WNUV - The Tube:629000000:8VSB:65:68:4<br />
Same as the Tube:629000000:8VSB:81:84:5<br />
FOX45 HDTV:665000000:8VSB:49:52:3<br />
FOX45 Digital Television:665000000:8VSB:65:68:4<br />
WMAR-Radar SD-3:701000000:8VSB:81:84:5<br />
WMAR-SD2:701000000:8VSB:65:68:4<br />
WMAR-HD:701000000:8VSB:49:52:3<br />
WMAR-TV:701000000:8VSB:0:0:65535<br />
WBALDT:743000000:8VSB:49:52:1<br />
WBALSD:743000000:8VSB:65:68:2<br />
Done.<br />
You can edit that file to remove channels as you please. If you want to use MPlayer for output, copy the channels.conf over to ~/.mplayer, and, likewise, ~/.xine for using Xine. You can substitute symlinks if you are more comfortable with that, too. Once the file is in ~/.azap, you can test the channels by running something similar to:<br />
$ azap -r WBALDT<br />
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'<br />
tuning to 743000000 Hz<br />
video pid 0x0031, audio pid 0x0034<br />
status 1f | signal 9fb0 | snr 5c32 | ber 00000000 | unc 0000007f | FE_HAS_LOCK<br />
status 1f | signal fbf0 | snr df58 | ber 00000060 | unc 00000000 | FE_HAS_LOCK<br />
status 1f | signal fc20 | snr de9c | ber 00000008 | unc 00000000 | FE_HAS_LOCK<br />
status 1f | signal fb50 | snr db7c | ber 00000018 | unc 00000000 | FE_HAS_LOCK<br />
status 1f | signal fc70 | snr dc66 | ber 00000028 | unc 00000000 | FE_HAS_LOCK<br />
Hit CTRL+C after a few lines to exit out. Those lines above show that everything is working alright. You can also check that everything is o.k. with dmesg:<br />
$ dmesg<br />
...<br />
nxt2004: Waiting for firmware upload (dvb-fe-nxt2004.fw)...<br />
nxt2004: Waiting for firmware upload(2)...<br />
nxt2004: Firmware upload complete<br />
cx88[0]/2: queue is empty - first active<br />
cx88[0]/2: cx8802_start_dma w: 0, h: 0, f: 2<br />
cx88[0]/2: setting the interrupt mask<br />
cx88[0]/2: [f53b9b80/0] cx8802_buf_queue - first active<br />
cx88[0]/2: cx8802_restart_queue<br />
cx88[0]/2: cx8802_restart_queue: queue is empty<br />
<br />
== Setting up MPlayer ==<br />
According to the MPlayer website, the configuration script should detect your DVB card and compile DVB support automatically. That did not work for me. The configure script could not find my dvb include directory, so i had to specify it when I ran configure. I edited Rob Workman's SlackBuild script [[http://slackbuilds.rlworkman.net/MPlayer/]] to allow for DVB support to be compiled. Here is the configure options I used, the rest of the script was left untouched:<br />
./configure \<br />
--prefix=/usr \<br />
--confdir=/etc/mplayer \<br />
--enable-gui \<br />
--enable-menu \<br />
--enable-dvb \<br />
--with-dvbincdir=/usr/src/linux/include \<br />
--enable-xmms \<br />
--with-codecsdir=$CODECSDIR \<br />
--with-win32libdir=$CODECSDIR <br />
<br />
Notice the "--enable-dvb" and "--with-dvbincdir" options. Once I specified those, everything ran fine. Once MPlayer is compiled correctly and installed, make sure you place a copy of channels.conf in ~/.mplayer. When you are done that, you can run MPlayer by either specifying the device or by specifying the channel:<br />
$ mplayer /dev/dvb/adapter0/dvr0<br />
or<br />
$ mplayer dvb://WMARHD<br />
GMPlayer is a GTK frontend that gets installed with MPlayer and can also be used for DVB, but I have not figured out how to get a DVB option in the menus yet. When I figure it out, I will update this accordingly. Right now, you can launch gmplayer using the same lines above by simply substituting mplayer with gmplayer.<br />
<br />
== Setting up Xine ==<br />
According to everything I have read about Xine, it is supposed to compile automatically with DVB support. However, I still can not get it to view my DVB stream. As soon as I figure out how to make it work, I will update this page accordingly.<br />
<br />
== Resources ==<br />
<br />
http://www.mythtv.org/wiki/index.php/ATI_HDTV_Wonder<br />
<br />
http://www.mythtv.org/wiki/index.php/Adding_QAM_Channels_For_HDTV_Tuner_Cards<br />
<br />
http://www.mythtv.org/wiki/index.php/Dvb_Apps<br />
<br />
http://www.linuxtv.org/</div>Sinyoritahttps://www.slackwiki.com/index.php?title=SlackBuild_Scripts&diff=897SlackBuild Scripts2014-01-23T03:00:18Z<p>Sinyorita: </p>
<hr />
<div>SlackBuild scripts are simple shell scripts which can automate the compiling and packaging of a program from source. <br />
<br />
While not necessary to compile and create packages on Slackware, SlackBuilds serve as tools for scripting the compiling and packaging processes, which are often repetitive. Just as importantly, SlackBuilds also act as documentation of compile-time options and configurations for that particular package. For that reason, official Slackware packages come with SlackBuilds bundled with the source code, and the inclusion of a SlackBuild is desirable in third-party packages.<br />
<br />
== Using SlackBuild Scripts ==<br />
In this example I'm going to use the [http://www.pidgin.im Pidgin] slackbuild. First you find on the mirror in the source directory and download the whole directory of Pidgin:<br />
<br />
: <code>mkdir pidgin</code><br />
: <code>cd pidgin</code><br />
: <code>wget --passive-ftp <nowiki>ftp://slackware.at/slackware-12.1/source/xap/pidgin/*</nowiki></code><br />
<br />
This downloads the files needed for Slackware scripts. The same idea applies for SlackBuild scripts from other [http://www.optimaweb.co.id/jasa-seo Jasa seo Profesional]<br />
sources - you generally need to download all of the files in the directory that contains the build script. For example, in the pidgin source directory, you would need the following files:<br />
[http://www.optimaweb.co.id/jasa-seo Jasa seo Bergaransi], [http://www.optimaweb.co.id/jasa-seo Jasa seo Jakarta], [http://www.awanirentcar.com Sewa Mobil Jakarta]<br />
<br />
: <code>pidgin-2.4.1.tar.bz2 pidgin-encryption-3.0.tar.gz pidgin.SlackBuild* slack-desc </code><br />
<br />
There will sometimes be other files, such as doinst.sh, diff.gz patch files, and rc.* scripts in this directory.<br />
[http://www.propertykita.com/rumah.html Rumah Dijual di Depok], [http://www.propertykita.com/rumah.html Rumah Dijual di Jakarta]<br />
<br />
Now, say you want to get the newest version of pidgin? Well, you download the tar.bz2 file (in Pidgin, the script uses tar.bz2). Now you open up pidgin.Slackbuild:<br />
<br />
: <code>VERSION=2.4.1</code><br />
<br />
This is the line we are looking at. Now we can change this to<br />
<br />
: <code>VERSION=2.4.2</code><br />
<br />
Now you can edit the compile flags and other cool things not covered here. Now that we have downloaded and edited the SlackBuild script, let's make it executable:<br />
<br />
: <code>chmod +x pidgin.SlackBuild</code><br />
<br />
Now this is executable, and we want to run as root for permissions and other reasons so we want to become root:<br />
<br />
: <code>su -</code><br />
<br />
Now we start the script, and this will compile Pidgin and make a Slackware package. Depending on how the <br />
script is written, the resulting package will be in /tmp, some directory of /tmp, or perhaps some<br />
other location - have a look at the SlackBuild script for some hints if you can't find the package that<br />
was built. <br />
<br />
Once you find the package, you simply use 'installpkg' to install it normally (and you probably want to<br />
move it somewhere else on your system for safekeeping).<br />
<br />
: <code>./pidgin.SlackBuild</code><br />
<br />
=SlackBuild Archives=<br />
;* http://www.slackbuilds.org<br />
;* http://repository.slacky.eu<br />
;* http://www.slackware.com/~alien/slackbuilds/<br />
<br />
=Other Resources=<br />
For a bit more detailed tutorial, see this entry: [[Writing A SlackBuild Script]]<br />
<br />
<br />
[[Category:Tutorials]]</div>Sinyorita