本博客倡导开放源代码,在此公布之程序源代码如无特别声明均采用GNU通用公共 许可证(GPL)

乐在其中

分享学习Linux的乐趣

  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  23 随笔 :: 0 文章 :: 401 评论 :: 0 Trackbacks
定制固件通常都希望能够接收遥控器按键输入,这样就可以通过遥控器来控制某些功能,如启动/停止下载等。目前在各论坛上已经有了一些方法,我在这里介绍一种内核层面的实现方法。

先简单说一下遥控器是如何工作的。内核里有一个红外线接收器驱动程序,它的任务是接收并暂存遥控器按键供应用程序读取。每一个遥控器按键对应一个32位的代码,称为按键码。驱动程序每接收到一次按键,会在缓冲区内存储两个32位整数:第一个是按键码,第二个是重复标志(1表示重复按键,0则不是)。应用程序通过字符设备/dev/venus_irrp来读取遥控器按键码和重复标志。/dev/venus_irrp还支持ioctrl,应用程序可通过ioctrl设置一些驱动程序参数,如遥控器协议类型、驱动模式等。

通过修改红外线接收器驱动程序,可以实现以下功能:

1. 增加一个“影子”设备:/dev/shadow_irrp。所有接收到的按键码都一式两份分别发送到/dev /venus_irrp和/dev/shadow_irrp。
2. 提供一个sysfs接口:/sys/devices/platform/VenusIR/bypass,用于封锁或解锁/dev/venus_irrp。所谓封锁就是遥控器按键码不再发送到/dev/venus_irrp。当然任何时候“影子”设备都能接收到按键码(转发按键除外)。
封锁方法:echo 1 > /sys/devices/platform/VenusIR/bypass
解锁方法:echo 0 > /sys/devices/platform/VenusIR/bypass
3. 提供一个sysfs接口:/sys/devices/platform/VenusIR/fakekey,用于发送“伪造”的按键码到/dev/venus_irrp,从而实现转发。
转发方法,以按键代码“aa557f80”为例:
echo 'aa557f80' > /sys/devices/platform/VenusIR/fakekey

通过新的驱动程序,可以实现两种遥控模式:并行模式和过滤转发模式。

并行模式是指/dev/venus_irrp和/dev/shadow_irrp同时接收相同的按键码,dvdplayer使用vensu_irrp,自己开发的脚本或程序使用shadow_irrp,互不相干。而过滤转发模式则是封锁venus_irrp,按键码只发送到“影子”设备,经过程序过滤以后再转发到vensu_irrp。我们可以根据不同的定制需求选择两者之一,也可以随时在两种模式之间切换。

我们知道接收器的驱动程序在官方固件里是编入内核的,因此要使用新的驱动应该是要替换官方内核的。考虑到替换内核的操作比较复杂,必需重刷固件,而且目前我们手上的内核源码很可能与官方的不同,有潜在的兼容性风险,我们有必要另辟蹊径。我的策略是把新的驱动程序编译成模块,在模块初始化时通过内核符号表查到原驱动程序的退出清理函数venus_ir_cleanup_module()的地址,然后调用这个函数让它完成清理工作,接着新的驱动程序开始初始化,从而完成驱动程序的动态替换。

驱动程序源代码:venus_ir_new.tar.zip
编译好的模块:venus_ir_new.ko.zip

编译源码时需要修改Makefile中的KERNELDIR变量为你的内核源码目录。

注意事项:新的驱动程序模块必需在dvdplayer启动之前加载,否则dvdplayer已经打开了/dev/venus_irrp设备,驱动程序的替换会失败。因此建议将模块加载的命令放在/usr/local/etc/rcS中启动dvdplayer之前。


English Translation Follows:
It is usually desirable that customized firmware is able to interact with the remote control, so that we could  control the customized features from the remote, like starting/stopping download. There were a couple of methods floating around various forums, here I'd like to introduce an implementation at the kernel level.

Before we start, let's talk a little bit about how remote control works. There is an IR receiver driver in the kernel, it's job is to receive key press from the remote and buffer it for application to read. Every key on the remote has a 32-bit key code, each time the driver receives a key press, it puts 2 32-bit integers in a buffer(kernel fifo), the 1st int is the key code, the 2nd is a repeat flag(1 means it's a repeated key, 0 otherwise). Application reads the key code and repeat flag from a character device: /dev/venus_irrp. This device supports ioctrl as well, application can set some driver parameters through the ioctrl interface, like the IR protocol, driver mode etc.

By modifying the IR driver, we can:

1. Add a shadow device: /dev/shadow_irrp. Every key code the driver receives is sent to both /dev/venus_irrp and /dev/shadow_irrp.
2. Provide a sysfs interface: /sys/devices/platform/VenusIR/bypass, through which we can select to bypass /dev/venus_irrp or not. Under any circumstance, the shadow device always receives the key codes(except fake keys, which we'll talk about later).
to bypass venus_irrp: echo 1 > /sys/devices/platform/VenusIR/bypass
back to normal: echo 0 > /sys/devices/platform/VenusIR/bypass
3. Provide a sysfs interface: /sys/devices/platform/VenusIR/fakekey, through which we can send fake keys to /dev/venus_irrp, the so called key-forwarding.
Take the key code 'aa557f80' as an example, to forward the key:
echo 'aa557f80' > /sys/devices/platform/VenusIR/fakekey

With the new driver, we can implement 2 remote control modes: Parallel Mode and Key-forwarding Mode

In parallel mode, both /dev/vensu_irrp and /dev/shadow_irrp receive the same key code sequence, the dvdplayer uses vensu_irrp and our own script/application uses shadow_irrp, without interfering each other. While in key-forwarding mode, key codes are only sent to the shadow device, after being processed by our own application, it's at the app's disposition to forward it or not. We can choose to use one of the two modes, or to switching in between at any time.
 
We know that the venus_ir driver was built into the kernel, we may have to replace the whole kernel to use the new driver. However, replacing kernel is a bit complicated for average users, it requires re-flash the firmware, and the kernel source code we have may not be the same as the official one, there is a risk of incompatibility, we have to find some other way. My trick is to compile the new driver as module, when the module initialize itself, it first looks up the kernel symbol table(kallsyms) to find and call the cleanup function of the built-in driver: venus_ir_cleanup_module(), after that it continues its own initialization, thereby the built-in driver is replaced.

new driver source code: venus_ir_new.tar.zip
the compiled kernel module: venus_ir_new.ko.zip

When compiling from source, you may need to modify the KERNELDIR in Makefile to where the kernel source is located.

NOTE: The new driver module must be loaded before starting dvdplayer, otherwise dvdplayer may have already opened /dev/venus_irrp which could prevent the built-in driver from being replaced. You may want to place the module loading command in /usr/local/etc/rcS, just before starting dvdplayer.
posted on 2010-05-14 00:00 gouzhuang 阅读(10829) 评论(38)  编辑 收藏 引用 所属分类: 嵌入式Linux

评论

# re: 完全接管遥控器(Total Remote Control) 2010-05-14 06:50 ogutsua@gmail.com
Could you translate this to english?

It would be of help. I'm not sure but maybe you're doing what i need to do with the remote of the venus realtek system.

Thank you in advance  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-05-14 09:41 老顽童
you can try google translate:-)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Custom Firmware is usually hope to receive the remote control button input, so you can remote to control certain functions such as start / stop downloads. Present in various forums already have a number of ways, I introduced a kernel-level implementation method.

First briefly about how to work the remote control. There is a kernel driver infrared receiver, its task is to receive and buffer the supply of remote control button to read with the procedure. Each remote control button corresponds to a 32-bit code, called the key code. Each driver receives a button, will be stored in the buffer zone of two 32-bit integers: the first is the key code, the second is the repeated symbol (1 for repeat button, 0 is not). Applications through character device /dev/venus_irrp to read the remote control button code and repeat signs. /dev/venus_irrp also supports ioctrl, the application can set the number of drivers ioctrl parameters, such as remote control protocol type, driving mode.

By modifying the IR receiver driver, you can achieve the following functions:

1. Add a "shadow" Device: /dev/shadow_irrp. All the key code is received in duplicate were sent to /dev/venus_irrp and /dev/shadow_irrp.
2. Provides a sysfs interface to: /sys/devices/platform/VenusIR/bypass, used to block or unlock /dev/venus_irrp. The so-called embargo is no longer the remote control key code is sent to /dev/venus_irrp. Of course, any time a "shadow" device can receive the key code (except for forward button).
Blocking method: echo 1> /sys/devices/platform/VenusIR/bypass
Unlock method: echo 0> /sys/devices/platform/VenusIR/ bypass
3. Provides a sysfs interface to: /sys/devices/platform/VenusIR/fakekey, for sending "fake" the key code to the /dev/venus_irrp, in order to achieve forward.
Forward approach to key code "aa557f80" as an example:
echo 'aa557f80'> /sys/devices/platform/VenusIR/fakekey

Through the new driver, you can achieve two remote mode: parallel mode and filter forwarding mode.

Parallel mode is /dev/venus_irrp and /dev/shadow_irrp while receiving the same key code, dvdplayer use vensu_irrp, developed their own script or program to use shadow_irrp, independent of each other. The forward mode filter is blocked venus_irrp, key code is only sent to the "shadow" device, filtered through the program later forwarded to vensu_irrp. We can choose according to different needs of both custom one, you can switch between two modes at any time.

We know that the receiver driver is incorporated into the official firmware in the kernel, so to use the new drive should be to replace official kernel. Consider replacing the kernel more complex operations, need to re-brush the firmware, and we now have in hand the official kernel source is likely different, the compatibility of potential risks, we need to open a new path. My strategy is to compile the new driver module, the module initialization by the kernel symbol table found in the driver out of the original clean-up function venus_ir_cleanup_module () the address, then call this function to clean up it, then the new initialize the driver started to complete the driver of dynamic replacement.

Driver source code: venus_ir_new.tar.zip
Compiled module: venus_ir_new.ko.zip

When compiling source code need to modify the Makefile in the KERNELDIR variable for your kernel source directory.

Note: the new driver module must start before the dvdplayer loads, or dvdplayer has opened /dev/venus_irrp equipment, the replacement driver will fail. Therefore proposed that the module load command on the /usr/local/etc/rcS start dvdplayer before.  回复  更多评论
  

# re: 完全接管遙控器(Total Remote Control)[未登录] 2010-05-14 16:12 初学者
能不能提供一下未修改前的venus_ir.c和venus_ir.h, 方便比较分析, 谢谢.  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-05-14 17:49 gouzhuang
@初学者
修改前的源代码:http://www.cnitblog.com/Files/gouzhuang/venus_ir_orig.tar.zip
来自华硕提供的内核源码
  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-05-16 08:23 ogutsua@gmail.com
Thank you so much.

In fact, you're doing what I needed and I've to say that this is a good work.

I'm trying to recompile this and other modules by myself but when I try to load them the system says to me that symbols disagree with the one in my system.

Problem is that I'm using different kernel sources to recompile.

Could you give a link to the sources you're using? (Your compiled module works well for me, but I would like to be able to recompile it from sources if I need to make modifications)

Thanks again  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-05-16 14:52 gouzhuang
@ogutsua@gmail.com
In fact I had the same "symbols disagree" problem on my first attempt to compile a module. Later I found the key to circumvent it: disable Module versioning support, i.e. unset CONFIG_MODVERSIONS in .config.

I believe the kernel source I have is NOT exactly the same as the player vendor's, I got it from Asus at the following link:
ftp://ftp.asus.com/pub/ASUS/Digital_Media_Player/HDP-R1/SourceCode/OPlay_HDP-R1_GPL_SourceCode.zip  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-05-17 09:04 gouzhuang
@ogutsua@gmail.com
for unknown reason, some of your replies were lost. I have sent a message to the administrator, hoping he/she could help to look into this issue. Anyway, if that happens again, you could send email to gouzhuang (at) gmail.com.  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-05-16 19:53 ogutsua@gmail.com
Thanks again gouzhuang. Will try what you said and if I get some advances in my hacks I'll give you my sources here.

I've an Sveon SPM3000, but in fact is the same system Realtek venus with mipsel arch. Trying to add some basic features to it but I needed the IR one :)
  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-08-20 15:06 易吧软件
谢谢,解决了我一个X6双核心切换难题。  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control)[未登录] 2010-08-26 19:17 Tom
Hello,

Very nice and impressive work. Just one question by the way: how do you deactivate the original venus_irrp driver that is embedded into the kernel?

Many thanks,
Tom  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-08-27 08:54 gouzhuang
@Tom
Here's the code that does the trick:

--------- CODE BEGIN --------------
typedef void cleanup_fn (void);

static int __init venus_ir_new_init_module(void) {
int result;

struct device_driver *old_driver;
cleanup_fn *venus_ir_cleanup_module;

old_driver = driver_find("VenusIR", &platform_bus_type);
if(old_driver) {
kobject_put(&old_driver->kobj); /* decrease reference count */
printk(KERN_DEBUG "Old VenusIR driver found at %p\n", old_driver);

venus_ir_cleanup_module = (cleanup_fn*)kallsyms_lookup_name("venus_ir_cleanup_module");
if(venus_ir_cleanup_module) {
printk(KERN_DEBUG "Found venus_ir_cleanup_module() @ 0x%p\n", venus_ir_cleanup_module);
(*venus_ir_cleanup_module)();
printk(KERN_DEBUG "venus_ir_cleanup_module() called\n");
} else {
printk(KERN_WARNING "venus_ir_cleanup_module() not found!\n");
return -ENOENT;
}
} else {
printk(KERN_DEBUG "Old VenusIR driver NOT found, no need to clean up\n");
}

/* module initialize code follows */
...
---------- CODE END -------------------

In venus_ir_new_init_module(), I first use driver_find() to search the embedded driver by name, if found, then lookup its cleanup function venus_ir_cleanup_module() in kernel symbol table and call that function to let the old driver cleanup itself. After that, we can go on the normal initialization work.  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control)[未登录] 2010-08-30 16:50 Tom
Hi gouzhuang,

Thanks a lot for the hint!

Regards,
Tom
  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-09-27 09:10 t2000
我的海信801改双核固件后遥控器反应非常缓慢,不知道老大提供的安装包能否解决这个问题?我是菜鸟下载那个文件后也不知道如何安装
谢谢!  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-09-30 10:15 fourcute
请问是否这样加载您的模块
insmod /path-to/module-name.ko

另外请问影子驱动是否适用所有遥控器呢?

能否说说如何操作加载等细节呢,谢谢.  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-09-30 10:47 gouzhuang
@fourcute
可以把下面的命令加入/usr/local/etc/rcS脚本的最前面:
/sbin/insmod /path/to/venus_ir_new.ko

影子驱动是通用的,支持好几种摇控器通讯协议。  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-10-13 23:13 ccbcfan
@gouzhuang
影子驱动是通用的,支持好几种摇控器通讯协议!

想知道:如果换用其他不同厂家1073机器的播放内核(Dvdplayer,遥控器各键的键值码是不一样的),对使用原遥控器操作有更好的办法吗??比如其他方法是建立remote_key文件。  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-10-14 10:20 gouzhuang
@ccbcfan
我不了解remote_key的方法。如果用影子设备,可以这样实现:
1. 搞清楚不同遥控器之间的键码对应关系,也就是准备好一张你的遥控器到要模拟的遥控器之间的键码映射表。
2. 让影子驱动工作在转发模式
echo 1 > /sys/devices/platform/VenusIR/bypass
3. 写一个脚本或程序从影子设备/dev/shadow_irrp读取键码,然后根据映射表转换成新的键码转发到/dev/venus_irrp设备
echo "新键码" > /sys/devices/platform/VenusIR/fakekey  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-10-14 23:36 ccbcfan
@gouzhuang

好的,有时间测试一下!

另:
无意中发现1073机器中存在以下几个驱动模块,应该分别是usb鼠标、usb键盘等驱动模块,难道1073本来是可以支持usb鼠标和键盘的?只是未启用? 听说1283是支持的!

/lib/modules/2.6.12.6-VENUS/kernel/drivers/usb/input/usbhid.ko
/lib/modules/2.6.12.6-VENUS/kernel/drivers/usb/input/usbkbd.ko
/lib/modules/2.6.12.6-VENUS/kernel/drivers/usb/input/usbmouse.ko

我测试过,插入usb鼠标后,lsmod 显示成功自动加载了usbmouse.ko,说明内核驱动正常,但电视界面没出现鼠标,鼠标各项操作也没反应。准备再找个USB键盘试试。
从你跟老玩童的交流中了解到1283与1073是使用相同的内核吧?
如果这样驱动跟程序也基本可通用喽,有个思路:将1283的相关程序放到1073机器去运行会是什么结果呢?当然前提是先解决好遥控器的问题!
从台湾卡巴熊网站了解到的信息显示:Realtek SDK4 for 1073DD / C+ 1283DD /C+ / 1085 将支持Opera瀏覽器、Flash, 估计肯定会加上USB键鼠的支持!!不知你有兴趣先研究一下吗?

  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-10-27 15:14 ccbcfan
@gouzhuang
remote_key的方法就是将第二播放内核Dvdplayer文件中的/dev/venus_irrp修改为不存在的/tmp/venus_irrp ,然后利用remote_key根据遥控器的按键码直接转换成模拟键盘按键管道输出到Dvdplayer!好处是不需要知道第二内核遥控器键码,可以应对各种不同的内核遥控;但存在反应较慢和管道容易断开的问题。我现在使用用这种管道方法就存在比较严重的按键重复情况,即按一次键,有时会连续反应二-三次!还没找到有效的解决办法!
管道输出:/usr/local/etc/remote_key| ./RootApp DvdPlayer&
remote_key :
#!/opt/bin/bash
while :
do
key=`dd if=/dev/venus_irrp bs=4 count=1 2> /dev/null | hexdump -e '"%02x"'`

if [ "$key" != "$last_key" ] ; then
last_key=$key

QUERY_STRING=
#1 数字键1
if [ "$key" = "f6096b86" ] ; then
QUERY_STRING="1"
.........
#42 系统设置
elif [ "$key" = "a05f6b86" ] ; then
QUERY_STRING="/"
fi
fi

echo "$QUERY_STRING"
done



  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-10-27 17:03 gouzhuang
@ccbcfan
准备写一个通用的遥控器跨厂仿真程序,读入一个按键映射表文件然后按这个映射进行翻译。希望对大家有帮助。

另外你说的Realtek SDK,没找到哪里可以下载,似乎并非免费提供的。  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-10-28 23:16 ygao
@gouzhuang
写一个通用的遥控器跨厂仿真程序,
如果能把捕捉的按键,然后进行调用脚本,就太好了.
  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-11-09 09:43 Tim
请问在 console 怎样模拟遥控发送代码到 /dev/venus_irrp?
以下指令可以吗?

#f40bbd00 QUERY_STRING="W"
printf "\x00\xbd\x0b\xf4\n" >> /dev/venus_irrp

or

printf "W" >> /dev/venus_irrp

还有其他方法吗?  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-11-09 09:54 Tim
@gouzhuang

请问在 console 怎样模拟遥控发送代码到 /dev/venus_irrp?
以下指令可以吗?

#f40bbd00 QUERY_STRING="W"
printf "\x00\xbd\x0b\xf4\n" >> /dev/venus_irrp

or

printf "W" >> /dev/venus_irrp

还有其他方法吗?   回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-11-12 09:08 gouzhuang
@Tim
venus_irrp根本就不支持写操作,所以这种方法行不通。
如果用本文提供的驱动程序,可以这样实现:
echo "0xf40bbd00" > /sys/devices/platform/VenusIR/fakekey  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-11-12 10:27 Tim
@gouzhuang

Thanks  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control)[未登录] 2010-11-18 22:27 c
@gouzhuang
请问海信800h如何使用组合键?移植其他播放程序后有些键位没法实现,如暂停这些重要的键位。  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2010-11-19 09:55 gouzhuang
@c
我不了解如何使用组合键(恐怕遥控器并不支持),你可以用4个彩色键之一来替代。  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2011-02-09 17:50 interdev
相当不错的模块,正是我所需要的。用你的模块我成功实现了重启键的定制,开关机键改成切换开关dvdplayer程序,把播放器变成永不关机的nas~~~
感谢大神的研究和无私贡献~~


请问大神有没有研究出在电视上输出该怎么调用脚本呢?
比如说我想按一下遥控器的某个键,显示 ps 命令的结果到TV上,该怎么写脚本呢,RK有没有开放这样的API或脚本调用的接口?

  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2011-02-10 10:41 gouzhuang
@interdev
Reaktek确实没有公开API。不过我知道有一个开源项目正在开发中:http://sourceforge.net/projects/ketlaer/。它的目标是实现一个开源的媒体播放器,目前已经有了可用的雏形。它的GUI是基于华硕发布的二进制库的,因此底层的硬件控制部分是没有源码的。有兴趣可以研究一下。  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2011-02-11 11:32 interdev
@gouzhuang


不知道输出控制设备调用的是/dev/ 里哪个设备?
bootloader 是一断很小的代码,开机进度信息和升级进度信息就可以显示在tv上...,我觉得找到输出设备是哪个就可以实现输出了。但我现在还没找到......


  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2011-05-17 22:29 那年17岁
我的播放器是迪优美特S9刷了美如画R5固件后遥控器失灵 想学习遥控器跨厂移植 谁能帮我 谢谢
加我QQ:249931209  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2011-06-15 22:59 max32002
ir source code:
\linux-2.6.12\arch\mips\realtek-boards\drivers\venus_ir.c

GPL-source Code-RTD1185 download URL:
http://download.fantec.de/SourceCode/GPL-source%20Code-RTD1185.rar

When the linuxKernel is jupiter, irfake not work.

additional information:
linuxKernel: jupiter
CPU: realtek 1185 (500 mhz)  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control)[未登录] 2011-07-19 00:09 kk
你好,我的是1185芯片机型,为什么我运行时会出现 Error to open device: /sys/devices/platform/VenusIR/powerkey_irrp_new   回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2011-09-08 23:32 Nike
不错的模块 感谢share Realtek SDK4 for 1073DD / C+ 1283DD /C+ / 1085 将支持Opera瀏覽器、Flash, 估计肯定会加上USB键鼠的支持  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2012-01-05 02:24 galpal
Hi gouzhuang,
I have a player that is poorly supported, and I use the firmware from another player (SoC RTD1283). Unfortunately this firmware does not support front panel buttons.
Do you know which kernal module is responsible for the analysis of these buttons and send the codes to the DVDPlayer application?
Is there any possibility to enable this functionality in some clever way?  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2012-01-05 13:23 gouzhuang
@galpal
It's the venus_vfd module. source code path: arch/mips/realtek-boards/drivers. My mplayer doesn't have a front panel, so I don't have a chance to test it.  回复  更多评论
  

# re: 完全接管遥控器(Total Remote Control) 2012-01-06 02:34 galpal
@gouzhuang
I installed the original firmware with support for the front panel buttons. I added irfake and activated monitoring by irfake4 -c command.
On the console were displayed only the codes from the IR.
Then I turned normal mode: irfake4 -f ./Irfake.conf
In config file I inserted only one line with one IR code.
DVDPlayer respond to all keys from the front panel and the only one defined in the config.
This may indicate that support for these front buttons isn't implemented in venus_IR. Could it be a separate module that scans the state of keys?
I assume that DVDPlayer does not it.
What else can I check ?
Is the source taken from another player may not contain the button module?
Or rather, the SDK contains everything, and only to configure before compiling?
  回复  更多评论
  

只有注册用户登录后才能发表评论。