Date: Fri, 3 Jun 2011 20:47:42 +0200 (CEST) From: Juergen Lock <nox@jelal.kn-bremen.de> To: hselasky@c2i.net Cc: freebsd-multimedia@freebsd.org, kwm@freebsd.org Subject: Re: Pre-release of webcamd [v0.2.4] - testing remotes Message-ID: <201106031847.p53Ilgl3076499@triton8.kn-bremen.de> In-Reply-To: <201105311932.38205.hselasky@c2i.net> References: <201105240020.49377.hselasky@c2i.net> <4DDCF73B.2080200@gmail.com> <201105251442.27159.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <201105311932.38205.hselasky@c2i.net> you write: >Hi, Hi! > >Attaching new patch for ports. Some minor changes. Since this version now provides Linux-like /dev/input/eventX device nodes I tested that a bit and made the following patches: 1. For the new webcamd: http://people.freebsd.org/~nox/dvb/webcamd/0.2.4/pctv452e.c-rc.patch Switch Technotrend S2-3600 and PCVTV 452e dvb-s2 tuner remote handling from .rc.legacy to .rc.core, allowing rc5 scancodes of (some) other remotes to show up on /dev/input/eventX so e.g. an universal remote with more buttons could be used instead of the shipped minimal remote of the PCVTV 452e tuner. (And this also allows repeat to work with the lirc patch below.) http://people.freebsd.org/~nox/dvb/webcamd/0.2.4/patch-input.h.txt Fix EVIOCGKEYCODE and EVIOCGKEYCODE_V2 ioctl definitions in linux/input.h, they need to be _IOWR not _IOR (like with FE_GET_PROPERTY they're wrong on Linux too but there the driver doesn't care.) 2. For multimedia/v4l_compat: http://people.freebsd.org/~nox/dvb/webcamd/0.2.4/v4l_compat-20101027_2.patch Add <linux/input.h> and <linux/uinput.h> headers needed to access /dev/input/eventX that webcamd now can provide. 3. New port multimedia/v4lutils: (preliminary, help wanted, maybe Hans wants to maintain this too like multimedia/libv4l that builds from the same sourcetree?) http://people.freebsd.org/~nox/dvb/webcamd/0.2.4/v4lutils.shar I mainly wanted this for the ir-keytable(1) tool, the other tools are not really tested, and ir-keytable(1) still looks for /sys/class/rc/ which we also don't have. But using that tool you can e.g. check remote events coming in on /dev/input/eventX, ir-keytable -d /dev/input/eventX -t list the current keytable, ir-keytable -d /dev/input/eventX -r or add scancodes on the fly by loading a custom keymap, ir-keytable -d /dev/input/eventX -w keymap.txt (on Linux this can be automated using udev, don't know if we need something like that also...) 4. Update comms/lirc to 0.9.0: http://people.freebsd.org/~nox/dvb/webcamd/0.2.4/lirc-0.9.0.patch This adds the devinput driver (lircd -H devinput ..) and a hack that fixes repeat using it (/dev/input/eventX) by replacing repeated scancodes with repeated key down events for lirc (tested with the pctv452e and mceusb drivers), I've also put that patch here: http://people.freebsd.org/~nox/dvb/lirc/patch-daemons%3a%3ahw_devinput.c.txt Note: the mceusb driver still works with lirc pointed at /dev/lircX and the the shipped mceusb remote but it seems to no longer work properly with lircd (and irrecord) pointed at /dev/lircX at least with some remotes I tested where it worked before with the version in the current (old) webcamd port. But this problem seems(?) to exist on Linux too so it's not webcamd's fault. The mceusb driver does work with the lirc devinput driver i.e. lirc pointed at /dev/input/eventX, then it detects scancodes for several of my remotes I have here, but at least for one remote it (as well as ir-keytable -t) doesn't see repeated scancodes when holding a button, something which did work with the old webcamd with mceusb when pointing lirc at /dev/lircX. Also, some (Linux-centric, so not all of them apply) notes re ir-keytable(1) and the lirc devinput change are here: http://forum.xbmc.org/showthread.php?t=101151 And instead of editing hardware.conf on Linux with our lirc port you can set lircd_flags and lircd_device in rc.conf(5), like: lircd_flags="-H devinput" lircd_device="/dev/input/event0" Happy testing, :) Juergen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106031847.p53Ilgl3076499>