diff -urN lirc-0.7.0-clean/configure lirc-0.7.0/configure --- lirc-0.7.0-clean/configure 2004-11-08 00:38:20.000000000 +1100 +++ lirc-0.7.0/configure 2005-01-14 17:00:23.303125344 +1100 @@ -194,8 +194,8 @@ none, any, act200l, animax, atilibusb, atiusb, audio, avermedia, avermedia_vdomate, avermedia98, bestbuy, bestbuy2, breakoutbox, - bte, caraca, chronos, comX, - creative_infracd, dsp, cph03x, cph06x, + bte, caraca, chronos, comX, creative_infracd, + dsp, dvico, cph03x, cph06x, creative, devinput, exaudio, flyvideo, gvbctv5pci, hauppauge, hauppauge_dvb, hercules_smarttv_stereo, igorplugusb, irdeo, @@ -7991,10 +7991,10 @@ echo "$ac_t""" 1>&6 possible_drivers="(none) (bte) (creative_infracd) (devinput) (dsp) \ - (exaudio) (irreal) (livedrive_midi) (livedrive_seq) (logitech) \ - (mediafocusI) (mp3anywhere) (pcmak) (pcmak_usb) (pctv) \ - (remotemaster) (silitek) (slinke) (tira) (uirt2) (uirt2_raw) \ - (udp)" + (dvico) (exaudio) (irreal) (livedrive_midi) (livedrive_seq) \ + (logitech) (mediafocusI) (mp3anywhere) (pcmak) (pcmak_usb) \ + (pctv) (remotemaster) (silitek) (slinke) (tira) (uirt2) \ + (uirt2_raw) (udp)" if test x${no_kernel} != xyes; then possible_drivers="${possible_drivers} (lirc_dev) (lirc_dev lirc_atiusb) \ @@ -8396,6 +8396,9 @@ dsp) hw_module="${hw_module} hw_dsp.o receive.o" ;; + dvico) + hw_module="${hw_module} hw_dvico.o" + ;; exaudio) ;; irman) @@ -8969,6 +8972,12 @@ HW_DEFAULT="hw_uirt2_raw" fi +if test "$driver" = "dvico"; then + lirc_driver="none" + hw_module="hw_dvico.o" + HW_DEFAULT="hw_dvico" +fi + #END HARDWARE HEURISTIC cat >> confdefs.h < + * + * Distribute under GPL version 2 or later. + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#include + +#include "hardware.h" +#include "ir_remote.h" +#include "lircd.h" +#include "receive.h" + + +static ir_code lastcode, code; +struct timeval last,now; +int repeating; +lirc_t gap; + +int dvico_init() +{ + logprintf(LOG_INFO, "initializing '%s'", hw.device); + + if ((hw.fd = open(hw.device, O_RDONLY)) < 0) { + logprintf(LOG_ERR, "unable to open '%s'", hw.device); + return 0; + } + + return 1; +} + + +int dvico_deinit(void) +{ + logprintf(LOG_INFO, "closing '%s'", hw.device); + close(hw.fd); + hw.fd=-1; + return 1; +} + + +int dvico_decode(struct ir_remote *remote, + ir_code *prep, ir_code *codep, ir_code *postp, + int *repeat_flagp, lirc_t *remaining_gapp) +{ + *prep = 0; + *codep = code & ~0x008000; + *postp = 0; + *repeat_flagp = repeating; + *remaining_gapp = 0; + + return 1; +} + +char *dvico_rec(struct ir_remote *remotes) +{ + unsigned char b[8]; + int rd; + +reread: + rd = read(hw.fd, b, 8); + if (rd != sizeof(b)) { + logprintf(LOG_ERR, "error reading '%s'", hw.device); + return 0; + } + + /* Check prefix */ + if (b[0] != 0x46 || b[1] != 0x00 || b[2] != 0x01 || b[3] != 0x00) + return 0; + + /* Record the code */ + code = (b[4] << 16) + (b[5] << 8) + (b[6] << 0); + + /* Determine if we are repeating */ + if (! (code & 0x008000)) { + // first touch of code we've seen + gettimeofday(&last, NULL); + repeating = 0; + } else if ((lastcode & ~0x008000) == (code & ~0x008000)) { + gettimeofday(&now, NULL); + gap=(now.tv_sec-last.tv_sec)*1000000+ + now.tv_usec-last.tv_usec; + if (gap > 250000) { + /* Repeat without start seen? */ + goto reread; + } + last = now; + repeating = 1; + } else { + gettimeofday(&last, NULL); + repeating = 0; + } + lastcode = code; + + return decode_all(remotes); +} + + + +struct hardware hw_dvico= +{ + "/dev/usb/hiddev0", /* "device" */ + -1, /* fd (device) */ + LIRC_CAN_REC_LIRCCODE, /* features */ + 0, /* send_mode */ + LIRC_MODE_LIRCCODE, /* rec_mode */ + 32, /* code_length */ + dvico_init, /* init_func */ + NULL, /* config_func */ + dvico_deinit, /* deinit_func */ + NULL, /* send_func */ + dvico_rec, /* rec_func */ + dvico_decode, /* decode_func */ + NULL, /* readdata */ + "dvico" +}; \ No newline at end of file diff -urN lirc-0.7.0-clean/remotes/dvico/fusionhdtv-dvbt1 lirc-0.7.0/remotes/dvico/fusionhdtv-dvbt1 --- lirc-0.7.0-clean/remotes/dvico/fusionhdtv-dvbt1 1970-01-01 10:00:00.000000000 +1000 +++ lirc-0.7.0/remotes/dvico/fusionhdtv-dvbt1 2005-01-14 17:19:42.310929376 +1100 @@ -0,0 +1,62 @@ +# +# contributed by Chris Pascoe +# +# brand: DVICO +# model no. of remote control: DVB-T +# devices being controlled by this remote: +# + +begin remote + + name DVICO + bits 32 + eps 0 + aeps 0 + + one 0 0 + zero 0 0 + pre_data_bits 0 + gap 195755 + post_data_bits 0 + toggle_bit 17 + + begin codes + 1 0x0000000000F91100 + 2 0x0000000000F91200 + 3 0x0000000000F91300 + 4 0x0000000000F91400 + 5 0x0000000000F91500 + 6 0x0000000000F91600 + 7 0x0000000000F91700 + 8 0x0000000000F91800 + 9 0x0000000000F91900 + 0 0x0000000000F91000 + power 0x0000000000F90A00 + pcoff 0x0000000000F90C00 + camera 0x0000000000F91A00 + record 0x0000000000F91B00 + chup 0x0000000000F90000 + chdown 0x0000000000F90100 + voldown 0x0000000000F90300 + volup 0x0000000000F90200 + playpause 0x0000000000F91F00 + rew 0x0000000000F91C00 + stop 0x0000000000F91E00 + ff 0x0000000000F91D00 + folder 0x0000000000F94000 + atvdtv 0x0000000000F90600 + dvhs 0x0000000000F94100 + menu 0x0000000000F90800 + aspect 0x0000000000F90700 + zoom 0x0000000000F90400 + epg 0x0000000000F90B00 + mute 0x0000000000F90D00 + back 0x0000000000F90E00 + hd 0x0000000000F90F00 + red 0x0000000000F90500 + green 0x0000000000F90900 + yellow 0x0000000000F94200 + blue 0x0000000000F94300 + end codes + +end remote \ No newline at end of file diff -urN lirc-0.7.0-clean/setup-driver.sh lirc-0.7.0/setup-driver.sh --- lirc-0.7.0-clean/setup-driver.sh 2004-11-08 00:38:22.000000000 +1100 +++ lirc-0.7.0/setup-driver.sh 2005-01-14 17:31:59.202904768 +1100 @@ -224,30 +224,32 @@ elif test "$1" = "8"; then dialog --clear --backtitle "$BACKTITLE" \ --title "Select your driver" \ - --menu "$CONFIG_DRIVER_TEXT" 16 74 9 \ + --menu "$CONFIG_DRIVER_TEXT" 16 74 10 \ \ 1 "ATI/NVidia/X10 I & II RF Remote" \ 2 "ATI/NVidia/X10 RF Remote (userspace)" \ - 3 "Dign HV5 HTPC IR/VFD Module" \ - 4 "Home Electronics Tira USB device" \ - 5 "Igor Cesko's USB IR Receiver" \ - 6 "PCMAK USB receiver" \ - 7 "Sasem OnAir Remocon-V" \ - 8 "Sound Blaster Extigy USB sound card" \ - 9 "Windows Media Center Remotes" 2> $TEMP + 3 "DVICO FusionHDTV USB Remote" \ + 4 "Dign HV5 HTPC IR/VFD Module" \ + 5 "Home Electronics Tira USB device" \ + 6 "Igor Cesko's USB IR Receiver" \ + 7 "PCMAK USB receiver" \ + 8 "Sasem OnAir Remocon-V" \ + 9 "Sound Blaster Extigy USB sound card" \ + a "Windows Media Center Remotes" 2> $TEMP if test "$?" = "0"; then { set `cat $TEMP` if false; then : elif test "$1" = "1"; then LIRC_DRIVER=atiusb; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; elif test "$1" = "2"; then LIRC_DRIVER=atilibusb; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; - elif test "$1" = "3"; then LIRC_DRIVER=sasem; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; - elif test "$1" = "4"; then LIRC_DRIVER=tira; DRIVER_PARAMETER=ttyUSB1; DRIVER_PARAM_TYPE=ttyUSB; - elif test "$1" = "5"; then LIRC_DRIVER=igorplugusb; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; - elif test "$1" = "6"; then LIRC_DRIVER=pcmak_usb; DRIVER_PARAMETER=ttyUSB1; DRIVER_PARAM_TYPE=ttyUSB; - elif test "$1" = "7"; then LIRC_DRIVER=sasem; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; - elif test "$1" = "8"; then LIRC_DRIVER=exaudio; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; - elif test "$1" = "9"; then LIRC_DRIVER=mceusb; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; + elif test "$1" = "3"; then LIRC_DRIVER=dvico; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; + elif test "$1" = "4"; then LIRC_DRIVER=sasem; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; + elif test "$1" = "5"; then LIRC_DRIVER=tira; DRIVER_PARAMETER=ttyUSB1; DRIVER_PARAM_TYPE=ttyUSB; + elif test "$1" = "6"; then LIRC_DRIVER=igorplugusb; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; + elif test "$1" = "7"; then LIRC_DRIVER=pcmak_usb; DRIVER_PARAMETER=ttyUSB1; DRIVER_PARAM_TYPE=ttyUSB; + elif test "$1" = "8"; then LIRC_DRIVER=sasem; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; + elif test "$1" = "9"; then LIRC_DRIVER=exaudio; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; + elif test "$1" = "a"; then LIRC_DRIVER=mceusb; DRIVER_PARAMETER=none; DRIVER_PARAM_TYPE=none; fi } else