Vtuner for yavdr 0.5.0
As yaVDR is one of most sophisticated vdr installations and works without any intervention, here is how to add vtuner driver and client to this yaVDR system. It is not necessary to have PC with ability to install local DVB card nor have coaxial cable connected to the htpc.
1. Install yaVDR 0.5.0 to PC suitable for yavdr from install CD (image is possible to download from http://www.yavdr.org) and configure the system installed. It is not necessary to have dvb nor vtuner installed at this point.
2. System have to be actualised reg. http://www.yavdr.org/documentation/applying-updates/. After reboot the kernel 3.2.0-33-generic should be active in the system. If there is another version of kernel in the system driver must be compiled again - see the second half of this text.
3. Make working directory and copy the attached archive from viewtopic.php?f=11&t=72 into
4. Untar the archive
5. If kernel version is 3.2.0-33-generic copy driver vtunerc.ko from unpacked archive to directory /lib/modules/3.2.0-33-generic/kernel/drivers/misc/
6. Update dependencies of modules by "depmod -a"
7. Add line "vtunerc" at the end of /etc/modules. If more virtual adapters than one will be used it is necessary to connect them to more vtuner servers. Add parameter to module as "vtunerc devices=N" (for two adapters "vtunerc devices=2")
8. Client from archive (vtunerc.x86_64) copy to the directory /usr/local/bin/
9. For each adapter from point 7 we make symbolic link "vtunercX" to the client file in /usr/local/bin/. For 2 adapters it could be made this way:
cd /usr/local/bin/
sudo ln -s vtunerc.x86_64 vtunerc0
sudo ln -s vtunerc.x86_64 vtunerc1
10. Into the file /etc/init/vdr.conf add follow lines for each of adapters
if [ -e /dev/vtunerc0 ] ; then
/usr/local/bin/vtunerc0 -d /dev/vtunerc0 -f s2:1 > /dev/null 2>&1 &
fi
if [ -e /dev/dvb/adapter0/dvr0 ] ; then
until [ -e /dev/dvb/adapter0/frontend0 ] ; do
sleep 1
done
fi
If install more adapters start the system more quickly by start first all clients and then wait for all frontends, so for two adapters it sould be done this way:
if [ -e /dev/vtunerc0 ] ; then
/usr/local/bin/vtunerc0 -d /dev/vtunerc0 -f s2:1 > /dev/null 2>&1 &
fi
if [ -e /dev/vtunerc1 ] ; then
/usr/local/bin/vtunerc1 -d /dev/vtunerc1 -f s2:2 > /dev/null 2>&1 &
fi
if [ -e /dev/dvb/adapter0/dvr0 ] ; then
until [ -e /dev/dvb/adapter0/frontend0 ] ; do
sleep 1
done
fi
if [ -e /dev/dvb/adapter1/dvr0 ] ; then
until [ -e /dev/dvb/adapter1/frontend0 ] ; do
sleep 1
done
fi
If local DVB card is installed in the system it is necessary to increase the index at /dev/dvb/adapterX by number of local cards.
Driver compiling
If it is necessary to compile kernel module as from reason of another kernel version or need to patch the source here is the procedure:
1. Install necessary packages (kernel-headers, gcc, mercurial ...)
2. Download the source code from internet repositories
hg clone https://code.google.com/p/vtuner.linux-driver/
3. Or use attached patch or change the source file vtunerc_proxyfe.c to the patched file from archive (patch change only this file)
4. Compile driver and client for x86_64
5. Files compiled use as files from archive described above
The client sources could be downloaded this way:
hg clone https://code.google.com/p/vtuner.apps/
Vtuner with yaVDR was tested with MB Asus AT5IONT-I, 4GB RAM, 128GB SSD (OCZ Vertex4), mounted nfs directory for recordings from NAS Synology 211j. As vtuner server was used NessieDVB-2S2 box.