How to get remote control working on PixelView PlayTV Pro TV Tuner card.

 

After endless hours of debugging and reckless spending on coffee, here is how to get the remote control working. The remote control on PlayTV Pro is not connected to any particular device. Unlike other devices, where we have a parallel or serial port, this one has a special socket which the lirc drivers try to emulate as a serial port (afaik)

 

Steps:

Use a fresh kernel 2.4.7 (RedHat kernel will also suffice) Enable i2c/sound/multimedia(v4l)/ppp/IrDA support. PPP is not required for the remote but for establishing dialup connection. Rebuild the kernel and boot into the new kernel.

 

Untar lirc-0.6.6.tar.gz (downloaded from lirc.org)

./configure

Select TV Hardware -> PixelView PlayTV Pro (card = 37)

Exit -> Then select 3rd option.

The script will check for various environments/compilers/sources. If it says, cannot find kernel sources, then the IrDA option has not been enabled in the kernel and you _will_ have to enable it.

 

If successful, make && make install

Add the following line in /etc/ld.so.conf

/usr/local/lib

Save and exit.

 

#depmod -a

If it gives you something as unresolved symbols, then you probably have a mismatched kernel version and lirc version. This will happen only if you are not using a fresh kernel.

 

If there are no errors, then proceed:

Insert the following lines in /etc/modules.conf

#vi /etc/modules.conf

#i2c

alias char-major-88 i2c-dev

options i2c-core i2c_debug=1

options i2c algo bit bit_test=1

#bttv

alias char-major-81 videodev

alias char-major-81-0 bttv

options bttv card=37 pll=1 radio=1

options tuner type=5 debug=1 pal=b

 

Save the file and exit.

Inserting the above lines is mandatory. Whenever one tries to insert a module, the kernel checks its alias in /etc/modules.conf If the above two lines are not inserted, then you will get an error similar to the following:

----

/lib/modules/2.4.7/misc/lirc_gpio.o: init_module: Invalid request code

Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters

/lib/modules/2.4.7/misc/lirc_gpio.o: insmod /lib/modules/2.4.7/misc/lirc_gpio.o

failed

/lib/modules/2.4.7/misc/lirc_gpio.o: insmod lirc_gpio failed

----

Once changes have been made to /etc/modules.conf

#depmod -a <--Shouldn't give any error.

#modprobe lirc_gpio <--Shouldn't give any error

#lsmod <--Should show the output given below.

lirc_gpio               5184   0  (unused)

tuner                   4336   1  (autoclean)

bttv                   55344   0  [lirc_gpio]

videodev                5568   3  [bttv]

i2c-algo-bit            7264   1  [bttv]

i2c-core               13664   0  [tuner bttv i2c-algo-bit]

lirc_dev                8256   1  [lirc_gpio]

 

modprobe lirc_gpio by default will load up all the required modules, including bttv and tuner :) Next, #lircd /etc/lircd.conf  <-- This is the configuration file pertaining to the remote. #lircmd /etc/lirmd.conf <-- This makes your remote to act as a mouse, inclusive of movements and mouse clicks. #chmod 666 /dev/lirc* Mandatory as all users need access to this file.

 

#cp /lirc-0.6.6/remotes/pixelview/lircrc.playtv_pro /home/brainless or any other persons home directory.

 

Login as user <brainless>

#mv lircrc.playtv_pro .lircrc

#irexec &

 

~Voila~! Press the power button on your remote and xawtv will pop up :)

 

Thats how simple it is to get remote control working :)

 

-Regards Anurag