Elem, evo skrpljenog rjesenja za slackware 10.1 i lirc-0.7.0 (diff za fajl drivers/lirc_gpio/lirc_gpio.c):
Code:
72,74c72,74
< static unsigned long gpio_mask = 0;
< static unsigned long gpio_enable = 0;
< static unsigned long gpio_lock_mask = 0;
---
> static unsigned long gpio_mask = 0x0ff00;
> static unsigned long gpio_enable = 0x08007;
> static unsigned long gpio_lock_mask = 0x04000;
77c77
< static int sample_rate = 10;
---
> static int sample_rate = 12;
118,120c118
< #ifdef BTTV_KWORLD
< {BTTV_KWORLD, 0, 0x00007f00, 0, 0x0004000, 0, 0, 12, 32},
< #endif
---
> {BTTV_KWORLD, 0, 0x0000ff00, 0x8007, 0x0004000, 0, 0, 12, 32},
162c160
<
---
> static unsigned int gpio_reinitialized = 0;
185a184,202
> dprintk(LOGHEAD "BUSY is %lx\n",card,(unsigned long) gpio_val);
> //MY insert
> if (gpio_reinitialized == 0 ) {
> if (bttv_write_gpio(card, gpio_enable, gpio_enable)) {
> dprintk(LOGHEAD "cannot write to GPIO\n", card);
> return -EIO;
> }
> if (bttv_read_gpio(card, &gpio_val)) {
> dprintk(LOGHEAD "cannot read GPIO\n", card);
> return -EIO;
> }
> if (bttv_write_gpio(card, gpio_enable,0)) {
> dprintk(LOGHEAD "cannot write to GPIO\n", card);
> return -EIO;
> }
> gpio_reinitialized=1;
> }
> //MY end
>
218a236,240
> dprintk(LOGHEAD "Code is %lx\n",card,(unsigned long) codes[0]);
>
> return SUCCESS; // MY RETURN
>
> // Ostatak funkcije se izostavlja
220d241
< dprintk(LOGHEAD "code is %lx\n",card,(unsigned long) codes[0]);
271d291
< #ifdef BTTV_KWORLD
273d292
< #endif
279,293d297
< #if 0
< /* derived from e-tech config file */
< /* 26 + 16 bits */
< /* won't apply it until it's confirmed with a fly98 */
< case BTTV_FLYVIDEO_98:
< case BTTV_FLYVIDEO_98FM:
< codes[4]=codes[0]<<3;
< codes[5]=(~codes[4])&0xff;
<
< codes[0]=0x00;
< codes[1]=0x1A;
< codes[2]=0x1F;
< codes[3]=0x2F;
< break;
< #endif
Uz ove izmjene ide i drugaciji /etc/lircd.conf:
Code:
begin remote
name kworld
bits 8
flags CONST_LENGTH
eps 30
aeps 100
one 0 0
zero 0 0
gap 199911
min_repeat 32
toggle_bit 0
begin codes
power 0x000000000000001E
source 0x0000000000000007
scan 0x000000000000001C
mute 0x0000000000000018
tvfm 0x0000000000000003
fmfreq_up 0x000000000000000C
fmfreq_down 0x0000000000000004
n1 0x0000000000000001
n2 0x000000000000000B
n3 0x000000000000001B
n4 0x0000000000000005
n5 0x0000000000000009
n6 0x0000000000000015
n7 0x0000000000000006
n8 0x000000000000000A
n9 0x0000000000000012
n0 0x0000000000000002
plus 0x0000000000000010
recall 0x0000000000000013
record 0x0000000000000000
stop 0x0000000000000008
play 0x0000000000000011
minimize 0x000000000000000F
zoom 0x0000000000000019
snapshot 0x000000000000001A
mts 0x000000000000000D
ch_up 0x000000000000001F
ch_down 0x0000000000000017
vol_up 0x0000000000000016
vol_down 0x0000000000000014
rew 0x0000000000000004
function 0x000000000000000E
ffd 0x000000000000000C
reset 0x000000000000001D
end codes
end remote
Znaci, sve radi sa
Code:
modprobe lirc_gpio gpio_mask=0x000ff00
Ostala podesavanja kao u ostalim postovima.
Elem, problema ima: rjesenje je krajnje proizvoljno, audio se ukljuci cim nesto pristupi /dev/lirc (irw, irexec, irxevent,...). Ako neko ima vremena da trazi rjesenje - srecno. Ja mogu da zivim sa ovim bagom O:) Naknadni MUTE radi (makar u tvtime-u).