[git:v4l-dvb/v2.6.36] V4L/DVB: IR: put newly ported streamzap driver in proper home
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: put newly ported streamzap driver in proper home Author: Jarod Wilson ja...@redhat.com Date:Mon Aug 2 15:46:03 2010 -0300 Moves drivers/staging/lirc/lirc_streamzap.c to drivers/media/IR/streamzap.c, along with making the requisite Kconfig and Makefile changes. Signed-off-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/Kconfig | 12 + drivers/media/IR/Makefile |1 + drivers/media/IR/streamzap.c | 741 + drivers/staging/lirc/Kconfig |6 - drivers/staging/lirc/Makefile |1 - drivers/staging/lirc/lirc_streamzap.c | 741 - 6 files changed, 754 insertions(+), 748 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=2c1101d5aeddda7bd0dd03bddea7aed6dbf80074 diff --git a/drivers/media/IR/Kconfig b/drivers/media/IR/Kconfig index 999a825..4094490 100644 --- a/drivers/media/IR/Kconfig +++ b/drivers/media/IR/Kconfig @@ -103,3 +103,15 @@ config IR_MCEUSB To compile this driver as a module, choose M here: the module will be called mceusb. + +config IR_STREAMZAP + tristate Streamzap PC Remote IR Receiver + depends on USB_ARCH_HAS_HCD + depends on IR_CORE + select USB + ---help--- + Say Y here if you want to use a Streamzap PC Remote + Infrared Receiver. + + To compile this driver as a module, choose M here: the + module will be called streamzap. diff --git a/drivers/media/IR/Makefile b/drivers/media/IR/Makefile index 2ae4f3a..2566fb4 100644 --- a/drivers/media/IR/Makefile +++ b/drivers/media/IR/Makefile @@ -16,3 +16,4 @@ obj-$(CONFIG_IR_LIRC_CODEC) += ir-lirc-codec.o # stand-alone IR receivers/transmitters obj-$(CONFIG_IR_IMON) += imon.o obj-$(CONFIG_IR_MCEUSB) += mceusb.o +obj-$(CONFIG_IR_STREAMZAP) += streamzap.o diff --git a/drivers/media/IR/streamzap.c b/drivers/media/IR/streamzap.c new file mode 100644 index 000..058e29f --- /dev/null +++ b/drivers/media/IR/streamzap.c @@ -0,0 +1,741 @@ +/* + * Streamzap Remote Control driver + * + * Copyright (c) 2005 Christoph Bartelmus l...@bartelmus.de + * Copyright (c) 2010 Jarod Wilson ja...@wilsonet.com + * + * This driver was based on the work of Greg Wickham and Adrian + * Dewhurst. It was substantially rewritten to support correct signal + * gaps and now maintains a delay buffer, which is used to present + * consistent timing behaviour to user space applications. Without the + * delay buffer an ugly hack would be required in lircd, which can + * cause sluggish signal decoding in certain situations. + * + * Ported to in-kernel ir-core interface by Jarod Wilson + * + * This driver is based on the USB skeleton driver packaged with the + * kernel; copyright (C) 2001-2003 Greg Kroah-Hartman (g...@kroah.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include linux/device.h +#include linux/module.h +#include linux/slab.h +#include linux/usb.h +#include linux/input.h +#include media/ir-core.h + +#define DRIVER_VERSION 1.60 +#define DRIVER_NAMEstreamzap +#define DRIVER_DESCStreamzap Remote Control driver + +#ifdef CONFIG_USB_DEBUG +static int debug = 1; +#else +static int debug; +#endif + +#define USB_STREAMZAP_VENDOR_ID0x0e9c +#define USB_STREAMZAP_PRODUCT_ID 0x + +/* table of devices that work with this driver */ +static struct usb_device_id streamzap_table[] = { + /* Streamzap Remote Control */ + { USB_DEVICE(USB_STREAMZAP_VENDOR_ID, USB_STREAMZAP_PRODUCT_ID) }, + /* Terminating entry */ + { } +}; + +MODULE_DEVICE_TABLE(usb, streamzap_table); + +#define STREAMZAP_PULSE_MASK 0xf0 +#define STREAMZAP_SPACE_MASK 0x0f +#define STREAMZAP_TIMEOUT0xff +#define STREAMZAP_RESOLUTION 256 + +/* number of samples buffered */ +#define SZ_BUF_LEN 128 + +enum StreamzapDecoderState { + PulseSpace, + FullPulse, + FullSpace, + IgnorePulse +}; + +/* structure to hold our device specific stuff */ +struct streamzap_ir { + + /* ir-core */ +
[git:v4l-dvb/v2.6.36] V4L/DVB: IR: put newly ported streamzap driver in proper home
This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree: Subject: V4L/DVB: IR: put newly ported streamzap driver in proper home Author: Jarod Wilson ja...@redhat.com Date:Mon Aug 2 15:46:03 2010 -0300 Moves drivers/staging/lirc/lirc_streamzap.c to drivers/media/IR/streamzap.c, along with making the requisite Kconfig and Makefile changes. Signed-off-by: Jarod Wilson ja...@redhat.com Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com drivers/media/IR/Kconfig | 12 + drivers/media/IR/Makefile |1 + drivers/media/IR/streamzap.c | 741 + drivers/staging/lirc/Kconfig |6 - drivers/staging/lirc/Makefile |1 - drivers/staging/lirc/lirc_streamzap.c | 741 - 6 files changed, 754 insertions(+), 748 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=af1f8533ccb7c5fae7ae4770da81d4c8130b870d diff --git a/drivers/media/IR/Kconfig b/drivers/media/IR/Kconfig index 999a825..4094490 100644 --- a/drivers/media/IR/Kconfig +++ b/drivers/media/IR/Kconfig @@ -103,3 +103,15 @@ config IR_MCEUSB To compile this driver as a module, choose M here: the module will be called mceusb. + +config IR_STREAMZAP + tristate Streamzap PC Remote IR Receiver + depends on USB_ARCH_HAS_HCD + depends on IR_CORE + select USB + ---help--- + Say Y here if you want to use a Streamzap PC Remote + Infrared Receiver. + + To compile this driver as a module, choose M here: the + module will be called streamzap. diff --git a/drivers/media/IR/Makefile b/drivers/media/IR/Makefile index 2ae4f3a..2566fb4 100644 --- a/drivers/media/IR/Makefile +++ b/drivers/media/IR/Makefile @@ -16,3 +16,4 @@ obj-$(CONFIG_IR_LIRC_CODEC) += ir-lirc-codec.o # stand-alone IR receivers/transmitters obj-$(CONFIG_IR_IMON) += imon.o obj-$(CONFIG_IR_MCEUSB) += mceusb.o +obj-$(CONFIG_IR_STREAMZAP) += streamzap.o diff --git a/drivers/media/IR/streamzap.c b/drivers/media/IR/streamzap.c new file mode 100644 index 000..058e29f --- /dev/null +++ b/drivers/media/IR/streamzap.c @@ -0,0 +1,741 @@ +/* + * Streamzap Remote Control driver + * + * Copyright (c) 2005 Christoph Bartelmus l...@bartelmus.de + * Copyright (c) 2010 Jarod Wilson ja...@wilsonet.com + * + * This driver was based on the work of Greg Wickham and Adrian + * Dewhurst. It was substantially rewritten to support correct signal + * gaps and now maintains a delay buffer, which is used to present + * consistent timing behaviour to user space applications. Without the + * delay buffer an ugly hack would be required in lircd, which can + * cause sluggish signal decoding in certain situations. + * + * Ported to in-kernel ir-core interface by Jarod Wilson + * + * This driver is based on the USB skeleton driver packaged with the + * kernel; copyright (C) 2001-2003 Greg Kroah-Hartman (g...@kroah.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include linux/device.h +#include linux/module.h +#include linux/slab.h +#include linux/usb.h +#include linux/input.h +#include media/ir-core.h + +#define DRIVER_VERSION 1.60 +#define DRIVER_NAMEstreamzap +#define DRIVER_DESCStreamzap Remote Control driver + +#ifdef CONFIG_USB_DEBUG +static int debug = 1; +#else +static int debug; +#endif + +#define USB_STREAMZAP_VENDOR_ID0x0e9c +#define USB_STREAMZAP_PRODUCT_ID 0x + +/* table of devices that work with this driver */ +static struct usb_device_id streamzap_table[] = { + /* Streamzap Remote Control */ + { USB_DEVICE(USB_STREAMZAP_VENDOR_ID, USB_STREAMZAP_PRODUCT_ID) }, + /* Terminating entry */ + { } +}; + +MODULE_DEVICE_TABLE(usb, streamzap_table); + +#define STREAMZAP_PULSE_MASK 0xf0 +#define STREAMZAP_SPACE_MASK 0x0f +#define STREAMZAP_TIMEOUT0xff +#define STREAMZAP_RESOLUTION 256 + +/* number of samples buffered */ +#define SZ_BUF_LEN 128 + +enum StreamzapDecoderState { + PulseSpace, + FullPulse, + FullSpace, + IgnorePulse +}; + +/* structure to hold our device specific stuff */ +struct streamzap_ir { + + /* ir-core */ +