LinHES Forums
http://forums.linhes.org/

R5F27 Leadtek Winfast Remote
http://forums.linhes.org/viewtopic.php?f=2&t=16928
Page 1 of 1

Author:  spalVl [ Wed Oct 10, 2007 8:56 pm ]
Post subject:  R5F27 Leadtek Winfast Remote

The box in question has Winfast TV2000XP Deluxe Tuner with IR remote (RM0010).

This machine previously had R5A30.2 auto upgraded to R5D1 then R5F1. Remote worked fine after all upgrades so I am reasonably sure hardware is fine.

For R5F27 I decided to do an Auto Install for unrelated stability problems that had been encountered with Mplayer.

During install chose RM-0010 remote for lirc-reconfig.sh script.


1.
Apparently either udev or bttv changes in the kernel change around how this remote is handled. Instead of using /dev/lirc0 as the device in hardware.conf it should now use /dev/input/event1. (ascertained by cat /proc/bus/input/devices).

2.
Another apparent problem is lirc_gpio modules doesn't seem to be needed anymore and errors out when loading. So removed reference to that module from hardware.conf.

3.
The final change to be made was to change the driver in hardware.conf to "dev/input"
http://bugs.archlinux.org/task/7660?pagenum=11

After the changes to hardware.conf, reboot, tested with irw and recieve no input from remote.

Stopped lirc and attempted to record new remote with

Code:
irrecord -H dev/input -d /dev/input/event1 /etc/lircd.conf
and remote still doesn't register for irrecord.

The best suggestion I can find here http://www.linuxtv.org/v4lwiki/index.ph ... the_remote

Basically the guide above says to patch bttv-input.c in the kernel and recompile.

Anyone have any other suggestions or think I am going down the wrong path?

I found this reference to a similar card http://daniel.saunders.googlepages.com/ ... WithMythTV

System
http://www.mysettopbox.tv/phpBB2/viewto ... highlight=

Thanks in advance

Author:  spalVl [ Mon Dec 10, 2007 9:16 pm ]
Post subject: 

To append progress to this.

I tried installing Mythbuntu to see if they had resolved and they do not.

There are a few threads on Ubuntu forums about this remote not working in Gutsy based releases.

http://ubuntuforums.org/showthread.php?t=578789

And found a thread at Fedora's forums about resolution

http://forums.fedoraforum.org/showthrea ... ge=1&pp=15
(Dr. Death's post)

So it appears bttv kernel module may need to be patched and then module reconfigured.

Author:  bleskone [ Thu Jan 03, 2008 6:19 am ]
Post subject: 

hello, want to show my progress, using R5F27 and Winfast TV2000XP RM

Quote:
The best suggestion I can find here http://www.linuxtv.org/v4lwiki/index.ph ... the_remote

Basically the guide above says to patch bttv-input.c in the kernel and recompile.


i went that way.., without success

1. downloaded patch (diff file) from

http://marc.info/?l=linux-video&m=116099140716390&w=2

2.downloaded and untar kernel source following this guide, thanks to sparks

http://mysettopbox.tv/phpBB2/viewtopic.php?t=16730&highlight=compile+bttv
until make command

3. tried to appply patch to /usr/src/linux-source-2.6.18-chw-13/drivers/media/video/bt8xx/bttv-input.c with

Code:
patch bttv-input.c diff


there was some errors - so i changed bttv-input.c manually: add row
if (btv->c.type == BTTV_BOARD_WINFAST2000) ir_input_keydown(ir->dev,&ir->ir,data,data);
under 67 row

and changed 317 row to
ir->mask_keycode = 0x0f8;

4. did make command from compiling guide - waited for some time, and new bttv.ko module was created, which i copied in place of original (which was backuped before)

original bttv.ko size 163924 b
new bttv.ko size 157512 b

after
rmmod bttv
modprobe bttv

i got
...
Jan 3 11:02:47 mythtv kernel: bttv: driver version 0.9.16 loaded
Jan 3 11:02:47 mythtv kernel: bttv: using 8 buffers with 2080k (520 pages) each for capture
Jan 3 11:02:47 mythtv kernel: bttv: Bt8xx card found (0).
Jan 3 11:02:47 mythtv kernel: bttv0: Bt878 (rev 17) at 0000:00:09.0, irq: 20, latency: 32, mmio: 0xfa001000
Jan 3 11:02:47 mythtv kernel: bttv0: detected: Leadtek TV 2000 XP [card=34], PCI subsystem ID is 107d:6609
Jan 3 11:02:47 mythtv kernel: bttv0: using: Leadtek WinFast 2000/ WinFast 2000 XP [card=34,insmod option]
Jan 3 11:02:47 mythtv kernel: bttv0: gpio: en=00000000, out=00000000 in=003ff502 [init]
Jan 3 11:02:47 mythtv kernel: tuner 1-0061: chip found @ 0xc2 (bt878 #0 [sw])
Jan 3 11:02:47 mythtv kernel: bttv0: using tuner=38
Jan 3 11:02:47 mythtv kernel: tuner-simple 1-0061: type set to 38 (Philips PAL/SECAM multi (FM1216ME MK3))
Jan 3 11:02:47 mythtv kernel: tuner 1-0061: type set to Philips PAL/SECAM multi (FM1216ME MK3)
Jan 3 11:02:47 mythtv kernel: bttv0: i2c: checking for MSP34xx @ 0x80... not found
Jan 3 11:02:47 mythtv kernel: bttv0: i2c: checking for TDA9875 @ 0xb0... not found
Jan 3 11:02:47 mythtv kernel: bttv0: i2c: checking for TDA7432 @ 0x8a... not found
Jan 3 11:02:47 mythtv kernel: bttv0: i2c: checking for TDA9887 @ 0x86... not found
Jan 3 11:02:47 mythtv kernel: bttv0: registered device video1
Jan 3 11:02:47 mythtv kernel: BUG: unable to handle kernel paging request at virtual address 000031c7
Jan 3 11:02:47 mythtv kernel: printing eip:
Jan 3 11:02:47 mythtv kernel: c01b1222
Jan 3 11:02:47 mythtv kernel: *pde = 00000000
Jan 3 11:02:47 mythtv kernel: Oops: 0000 [#1]
Jan 3 11:02:47 mythtv kernel: PREEMPT SMP
Jan 3 11:02:47 mythtv kernel: Modules linked in: bttv nvidia autofs4 ipv6 lirc_dev af_packet fuse parport_pc 8250_pnp 8250 serial_core parport pcmcia yenta_socket rsrc_nonstatic pcmcia_core video thermal sbs processor i2c_ec fan container button battery ac unionfs usb_storage ohci_hcd cx88_vp3054_i2c cx8802 cx88xx saa7134_dvb video_buf_dvb tda1004x nvram dvb_core radio_maestro tsdev usbhid snd_es1968 snd_via82xx gameport tuner tea5767 tda8290 tuner_simple mt20xx snd_ac97_codec snd_ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_mpu401_uart snd_seq_dummy snd_seq_oss snd_seq_midi snd_seq_midi_event snd_seq snd_timer snd_rawmidi snd_seq_device amd64_agp firmware_class agpgart i2c_viapro i2c_algo_bit ehci_hcd snd saa7134 btcx_risc video_buf compat_ioctl32 ir_kbd_i2c tveeprom uhci_hcd i2c_core serio_raw shpchp evdev ir_common videodev v4l2_common v4l1_compat soundcore pci_hotplug usbcore sbp2 ohci1394 ieee1394
Jan 3 11:02:47 mythtv kernel: CPU: 1
Jan 3 11:02:47 mythtv kernel: EIP: 0060:[<c01b1222>] Tainted: P VLI
Jan 3 11:02:47 mythtv kernel: EFLAGS: 00210286 (2.6.18-chw-13 #1)
Jan 3 11:02:47 mythtv kernel: EIP is at sysfs_add_file+0x12/0x70
Jan 3 11:02:47 mythtv kernel: eax: 00000124 ebx: f9354ed0 ecx: f7aac9c0 edx: 00000000
Jan 3 11:02:47 mythtv kernel: esi: 0000316f edi: ffffffff ebp: f935c9a0 esp: f0ad7db8
Jan 3 11:02:47 mythtv kernel: ds: 007b es: 007b ss: 0068
Jan 3 11:02:47 mythtv kernel: Process modprobe (pid: 3859, ti=f0ad6000 task=e68a88d0 task.ti=f0ad6000)
Jan 3 11:02:47 mythtv kernel: Stack: f7aac800 c01b12ac f072b4b0 f8d96b80 f9354ed0 f935c9a0 ffffffff f935c9a0
Jan 3 11:02:47 mythtv kernel: c01b12ac 0000316f f9354ed0 00000004 000000ab f9343272 f7aac9c0 f9354ed0
Jan 3 11:02:47 mythtv kernel: f934c4fc 00000000 00000001 00000001 00000001 209c9000 c19c9000 c19c9000
Jan 3 11:02:47 mythtv kernel: Call Trace:
Jan 3 11:02:47 mythtv kernel: [<c01b12ac>] sysfs_create_file+0x2c/0x40
Jan 3 11:02:47 mythtv kernel: [<c01b12ac>] sysfs_create_file+0x2c/0x40
Jan 3 11:02:47 mythtv kernel: [<f9343272>] bttv_probe+0x4d2/0x7c0 [bttv]
Jan 3 11:02:47 mythtv kernel: [<c0304932>] pci_device_probe+0x42/0x60
Jan 3 11:02:47 mythtv kernel: [<c035a5cb>] driver_probe_device+0x3b/0xa0
Jan 3 11:02:47 mythtv kernel: [<c035a6a0>] __driver_attach+0x0/0x70
Jan 3 11:02:47 mythtv kernel: [<c035a706>] __driver_attach+0x66/0x70
Jan 3 11:02:47 mythtv kernel: [<c0359fe9>] bus_for_each_dev+0x49/0x70
Jan 3 11:02:47 mythtv kernel: [<c035a525>] driver_attach+0x15/0x20
Jan 3 11:02:47 mythtv kernel: [<c035a6a0>] __driver_attach+0x0/0x70
Jan 3 11:02:47 mythtv kernel: [<c0359c0b>] bus_add_driver+0x6b/0x130
Jan 3 11:02:47 mythtv kernel: [<c0304aaf>] __pci_register_driver+0x5f/0x90
Jan 3 11:02:47 mythtv kernel: [<f933fdd1>] bttv_init_module+0x91/0xe0 [bttv]
Jan 3 11:02:47 mythtv kernel: [<c013fe73>] sys_init_module+0x133/0x1ba0
Jan 3 11:02:47 mythtv kernel: [<c015dd7d>] __handle_mm_fault+0x23d/0x950
Jan 3 11:02:47 mythtv kernel: [<c0119cd1>] do_page_fault+0x141/0x5a8
Jan 3 11:02:47 mythtv kernel: [<c01031f7>] syscall_call+0x7/0xb
Jan 3 11:02:47 mythtv kernel: Code: 85 c0 75 b2 57 e8 7f 7a fd ff 31 ff 58 eb a7 8d 76 00 8d bc 27 00 00 00 00 55 57 56 53 83 ec 10 8b 5c 24 28 8b 74 24 24 8b 43 08 <8b> 6e 58 66 89 04 24 8b 46 10 83 c0 7c e8 7c 27 37 00 8b 3b 57
Jan 3 11:02:47 mythtv kernel: EIP: [<c01b1222>] sysfs_add_file+0x12/0x70 SS:ESP 0068:f0ad7db8

i am probably going to not solve this at this time (will use my remote from second Lifeview card .... until get some inspiration)


bleskone

Author:  spalVl [ Sat Jan 12, 2008 7:46 pm ]
Post subject: 

To update got this issue resolved on Mythbuntu (which didn't work out of box either)

The fix ended up being to make the change to bttv-input.c and recompile the kernel.

Here is link to relevant post on Ubuntu forums (post #49 has resolution)

http://ubuntuforums.org/showthread.php? ... ost4124768

Here are my config files


# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Winfast TV2000/XP (card=34)"

# Arguments which will be used when launching lircd
LIRCD_ARGS=""

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="dev/input"
# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
# automatically used instead
DEVICE="/dev/input/event3"
MODULES=""

# Default configuration files for your hardware if any
LIRCD_CONF="/etc/lirc/lircd.conf"
LIRCMD_CONF=""


-------------------------------------------


#/etc/lirc/lircd.conf
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.8.3-CVS(dev/input) on Sat Jan 12 17:04:54 2008
#
# contributed by: Mike Treichler
#
# brand: LeadTek
# model no. of remote control: Y0400046 (bundled with Winfast 2000XP Deluxe)
# devices being controlled by this remote: LeadTek Winfast 2000XP Deluxe

# brand: Leadtek
# model: Y0400052 (bundeled with Winfast PVR2000 TV-card)
#
# Note: Only CH_UP, CH_DOWN, VOL_UP and VOL_DOWN will repeat. This
# seems to be a limitation of the remote control.

begin remote

name Leadtek-RM0010
bits 16
eps 30
aeps 100

one 0 0
zero 0 0
pre_data_bits 16
pre_data 0x8001
gap 423871
toggle_bit_mask 0x0

begin codes
POWER 0x0074
MTS 0x0188
TV/FM 0x0182
VIDEO 0x0189
DISPLAY 0x0166
CH_UP 0x0192
CH_DOWN 0x0193
VOL_DOWN 0x0072
VOL_UP 0x0073
FULLSCREEN 0x0174
TELETEXT 0x0184
SLEEP 0x008E
BOSSKEY 0x0163
MUTE 0x0071
RED 0x018E
GREEN 0x018F
YELLOW 0x0190
BLUE 0x0191
1 0x0002
2 0x0003

3 0x0004
4 0x0005
5 0x0006
6 0x0007
7 0x0008
8 0x0009
9 0x000A
0 0x000B
. 0x0034
FINETUNE+ 0x004E
FINETUNE- 0x004A
PIP 0x00E2
ENTER 0x001C
RECALL 0x0195
BACK 0x019C
PLAY 0x00A4
NEXT 0x0197
TIMESHIFTING 0x0169
STOP 0x0080
REC 0x00A7
SNAPSHOT 0x00EA
end codes

end remote


It is suggested a full Kernel recompile may not be need, this is not my box so I can't test that theory.

Author:  TVBox [ Sun Jan 13, 2008 3:39 am ]
Post subject: 

/usr/local/share/knoppmyth/remotes/Leadtek_0010
your seem to be missing lircrc file

Author:  bleskone [ Thu Jan 17, 2008 2:57 pm ]
Post subject: 

hmm, nice to see that it works on Mythbuntu, but back to knoppmyth .. :-),

i found that downloaded kernel sources have inside 0.9.16 version of bttv and compiled iso R5F27 - have 0.9.17 version.

there is probably need to download newer v4l sources: http://linuxtv.org/hg/v4l-dvb/archive/1387dc197077.tar.bz2

i havent time to try to recompile bttv in theese days but will give it a try.

Author:  bleskone [ Sat Mar 22, 2008 8:20 am ]
Post subject: 

hmm, looks like it works ...

I got patched and compiled bttv.ko and working Leadtek Winfast RM remote control

following is the procedure from the begining:
probably every part was inspired by people like from mysettopbox.tv Forum and others (cannot name all :-) ) thaanks.

Login as root
Code:
$su


Download the kernel-source

Code:
$wget ftp://knoppmyth.net/R5/linux-source-2.6.18-chw-13_2.6.18-chw-13-10.00.Custom_all.deb
$dpkg -i linux-source-2.6.18-chw-13_2.6.18-chw-13-10.00.Custom_all.deb
$cd /usr/src
$tar xjvf linux-source<tab>
$cd /usr/src/linux-source-2.6.18-chw-13
$cp /boot/config-2.6.18-chw-13 .config


Download this v4l source

Code:
$cd /root
$wget http://linuxtv.org/hg/v4l-dvb/archive/1387dc197077.tar.bz2
$tar xjvf 1387dc197077.tar.bz2


correct /root/v4l-dvb-1387dc197077/linux/drivers/media/video/bt8xx/bttv-input.c with your text editor

after 71 row insert

Code:
if (btv->c.type == BTTV_BOARD_WINFAST2000) ir_input_keydown(ir->dev,&ir->ir,data,data);


it should look

Code:
} else {
    if (btv->c.type ==BTTV_BOARD_WINFAST2000) ir_input_keydown(ir->dev,&ir->ir,data,data);
    ir_input_nokey(ir->dev,&ir->ir);
}



change row 245 from

Code:
ir->mask_keycode = 0x1f8;


to

Code:
ir->mask_keycode = 0x8f8;


it should look

Code:
                case BTTV_BOARD_WINFAST2000:
                       ir_codes = ir_codes_winfast;
                       ir->mask_keycode = 0x8f8;
                break;
       


save, ok, or you can download it :-) bttv-input.c. sometimes it need 0x0f8 as in spalVl post and link to mythbuntu, when i use it - it works but some button was doubled and some not work.

now going to compile

Code:
$cd /root/v4l-dvb-1387dc197077
$make kernel-links
$make


after minute we have compiled bttv.ko in /root/v4l-dvb-1387dc197077/v4l/bttv.ko , or you can download it :-) bttv.ko
it is litle bit bigger than original - above 1 MB - i dont know exactly why, maybe some kind of hardlinking, it is beyond my scope now

we can unload old bttv.ko module (in my case also bt878 and dvb_bt8xx)
Code:
$rmmod bt878
$rmmod dvb_bt8xx
$rmmod bttv


backup old and copy new module

Code:
$cd /lib/modules/2.6.18-chw-13/kernel/drivers/media/video/bt8xx/
$mv bttv.ko bttv.ko.bak
$cp /root/v4l-dvb-1387dc197077/v4l/bttv.ko bttv.ko


ok, we are at the end, will try to load module

Code:
$modprobe bttv


if our terminal window is alive without any kernel oops maybe you are successfull... :-))
you can check /var/log/syslog to be sure and of course remote control..

there are other configurations need to be made which i only note

lircd.conf for CoolCommand WinFast y04g0033 from http://lircconfig.commandir.com/lircd.c ... remote=451 or from spalVl post

hardware.conf
i have /dev/rc_lead set up with udev to point always the correct /dev/input/eventX

only raw, basic /home/mythtv/.mythtv/lircrc taken from Hauppage lircrc

bleskone

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/