[pvrusb2] IR doesn't work
Mike Isely
isely at isely.net
Sat May 17 21:36:10 CDT 2008
On Fri, 16 May 2008, Miguel Sevillano Torrado wrote:
> Hello,
>
> I have a problem with my remote control in my PVR (Wintv-PVR-USB2). I
> have installed the Debian packages (my SO is Debian Linux 4.0) as it is
> described in
> http://www.mythtv.org/wiki/index.php/LIRC_on_Debian_Etch , but it didn't
> work finally. My model is 24029 LF Rev E189 Multi-PAL.
>
> The problem is that when I try irw, or mode2, or cat /dev/lirc/0,
> nothing is detected. I press several buttons on the remote control, but
> the mode2 command returns nothing. How can I solve this? I send you some
> information I think it is useful:
>
> maradona:~# tail /var/log/messages
> May 11 19:26:57 localhost -- MARK --
> May 11 19:46:57 localhost -- MARK --
> May 11 20:06:57 localhost -- MARK --
> May 11 20:26:58 localhost -- MARK --
> May 11 20:32:32 localhost kernel: i2c /dev entries driver
> May 11 20:32:32 localhost kernel: lirc_dev: IR Remote Control driver
> registered, at major 61
> May 11 20:32:32 localhost kernel: lirc_i2c: chip found @ 0x71 (Hauppauge
> IR (PVR150))
> May 11 20:32:32 localhost kernel: lirc_dev: lirc_register_plugin:
> sample_rate: 10
> May 11 20:46:58 localhost -- MARK --
>
>
> maradona:~# lsmod |grep i2c
> lirc_i2c 9092 0
> lirc_dev 13716 1 lirc_i2c
> i2c_dev 8548 0
> i2c_algo_bit 8424 2 cx88xx,bttv
> i2c_i801 7468 0
> i2c_core 19680 11
> lirc_i2c,i2c_dev,cx88xx,bttv,i2c_algo_bit,wm8775,tuner,cx25840,pvrusb2,i2c_i801,tveeprom
>
> maradona:~# dmesg | tail -4
> i2c /dev entries driver
> lirc_dev: IR Remote Control driver registered, at major 61
> lirc_i2c: chip found @ 0x71 (Hauppauge IR (PVR150))
> lirc_dev: lirc_register_plugin: sample_rate: 10
>
> maradona:~# l /dev/lirc*
> srw-rw-rw- 1 root root 0 2008-05-11 20:34 /dev/lircd
>
> /dev/lirc:
> total 0
> crw-rw---- 1 root video 61, 0 2008-05-11 20:32 0
> drwxr-xr-x 2 root root 60 2008-05-11 20:32 .
> drwxr-xr-x 16 root root 4,4K 2008-05-11 20:34 ..
>
>
> When I execute lircd -d /dev/lirc/0 and mode2 -d /dev/lirc/0, then
> I press buttons on my remote, and it prints nothing in the console. Can
> you help me?
Unfortunately there are several versions of the 24xxx device floating
around. Does yours have an IR blaster built in? If it does, then I
think I can explain this. If it does not then I can't suggest a cause.
I had posted an explanation about this a while back, but I will try to
recap here:
The first PVR USB2 device was the 29xxx series. This device contained
an IR receiver that was functionally identical to those found in
ivtv-driven devices at the time. The way the pvrusb2 driver dealt with
this was not to deal with it at all. Rather, all you had to do was
install lirc and let the lirc_i2c driver probe for its IR receiver chip
(via an I2C adapter driver in the pvrusb2 driver) and all would be well.
Then Hauppauge produced a newer device, known as the 24xxx series. This
had a number of hardware changes. I modified the pvrusb2 driver to
adapt accordingly, which is why the driver handles either device just as
well. But one of the changes was the IR receiver. Hauppauge removed
the discrete I2C-hosted IR receiver chip and replaced it with some FPGA
logic, all accessed not by I2C but rather by some additional commands to
the FX2. I really didn't want to get into the business of rolling my
own IR chip driver, so I did something different in the pvrusb2 driver.
For 24xxx series devices, the driver creates a "fake" IR receiver chip
in software - from outside the driver it looks exactly like the chip
found in the 29xxx devices and thus the same lirc_i2c driver can attach
and "operate" it. Internally, the pvrusb2 driver implements the fake
chip by translating operations aimed at it into appropriate commands to
the FPGA logic. (This was almost trivial to emulate because the
interface is very simple.) Problem solved. For now.
Then a while ago Hauppauge changed the device again. This time the
changes were not as pervasive and they kept the model number the same.
Unfortunately however the IR receiver changed again. They added an
internal IR blaster to the device, and in doing so the IR receiver once
again became a "normal" I2C device in the box. However it's a
completely different device now so the lirc_i2c driver can't recognize.
Instead, later versions of lirc (8.1 or later?) contain another IR
receiver driver that you're supposed to use instead. I don't know the
details though because I haven't really tried this. Others have, and
report success. There is a discussion about this in the list archives.
Unfortunately there is a point of confusion though. See Hauppauge
didn't change the model number on this last spin so the pvrusb2 driver
still treats this 3rd variant as the same 24xxx device. Thus the driver
still creates that "fake" IR receiver chip, and then lirc_i2c will
happily probe it and try to use it. But it won't work because the
internal FPGA stuff of course isn't there anymore. So you're left with
what looks like a dead receiver.
There is a module option you can specify to turn off the fake receiver.
I suspect if you turn it off, then lirc_i2c will go away. The option is
"ir_mode"; see here:
http://www.isely.net/pvrusb2/usage.html#Logging
for the description.
So this is why I'm asking if you have the 24xxx model with the IR
blaster. If you do, then you're probably erroneously talking to the
fake receiver and not the real one - which needs a different LIRC
driver. I don't remember the LIRC driver name off the top of my head,
but it's in the archives here and perhaps someone else might add his/her
$0.02 here about that. If you don't have the IR blaster on your device,
then my only comment is that everything you showed above looks correct
and that the problem must be in how you have LIRC itself setup, but
there I can't help you :-(
-Mike
--
Mike Isely
isely @ pobox (dot) com
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8
More information about the pvrusb2
mailing list