staging/lirc: port lirc_streamzap to ir-core
Subsystems (3)
PATCH 1/2 staging/lirc: port lirc_streamzap to ir-core
This ports lirc_streamzap.c over to ir-core in-place, to be followed by a patch moving the driver over to drivers/media/IR/streamzap.c and enabling the proper Kconfig bits.
Presently, the in-kernel keymap doesn't work, as the stock Streamzap remote uses an RC-5-like, but not-quite-RC-5 protocol, which the in-kernel RC-5 decoder doesn't cope with. The remote can be used right now with the lirc bridge driver though, and other remotes (at least an RC-6(A) MCE remote) work perfectly with the driver.
I'll take a look at making the existing RC-5 decoder cope with this odd duck, possibly implement another standalone decoder engine, or just throw up my hands and say "meh, use lirc"... But the driver itself should be perfectly sound.
Remaining items on the streamzap TODO list:
- add LIRC_SET_REC_TIMEOUT-alike support
- add LIRC_GET_M{AX,IN}_TIMEOUT-alike support
- add LIRC_GET_REC_RESOLUTION-alike support
All of the above should be trivial to add. There are patches pending to add this support to ir-core from Maxim Levitsky, and I'll take care of these once his patches get integrated. None of them are currently essential though.
--- drivers/media/IR/keymaps/Makefile | 1 + drivers/media/IR/keymaps/rc-rc5-streamzap.c | 81 +++ drivers/staging/lirc/lirc_streamzap.c | 812 ++++++++++++--------------- include/media/rc-map.h | 1 + 4 files changed, 449 insertions(+), 446 deletions(-) create mode 100644 drivers/media/IR/keymaps/rc-rc5-streamzap.c
drivers/media/IR/keymaps/Makefile +1 -0
@@ -57,6 +57,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ rc-purpletv.o \ rc-pv951.o \ rc-rc5-hauppauge-new.o \ + rc-rc5-streamzap.o \ rc-rc5-tv.o \ rc-rc6-mce.o \ rc-real-audio-220-32-keys.o \
drivers/media/IR/keymaps/rc-rc5-streamzap.c new file +81 -0
81 lines not on this page · raw message
drivers/staging/lirc/lirc_streamzap.c +366 -446
1,132 lines not on this page · raw message
include/media/rc-map.h +1 -0
@@ -112,6 +112,7 @@ void rc_map_init(void);#define RC_MAP_PURPLETV "rc-purpletv"#define RC_MAP_PV951 "rc-pv951"#define RC_MAP_RC5_HAUPPAUGE_NEW "rc-rc5-hauppauge-new" +#define RC_MAP_RC5_STREAMZAP "rc-rc5-streamzap"#define RC_MAP_RC5_TV "rc-rc5-tv"#define RC_MAP_RC6_MCE "rc-rc6-mce"#define RC_MAP_REAL_AUDIO_220_32_KEYS "rc-real-audio-220-32-keys"
Signature · 5 lines
1.7.2 -- Jarod Wilson [email protected]
PATCH 2/2 IR: put newly ported streamzap driver in proper home
Moves drivers/staging/lirc/lirc_streamzap.c to drivers/media/IR/streamzap.c, along with making the requisite Kconfig and Makefile changes.
--- 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(-) create mode 100644 drivers/media/IR/streamzap.c delete mode 100644 drivers/staging/lirc/lirc_streamzap.c
drivers/media/IR/Kconfig +12 -0
@@ -102,3 +102,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.
drivers/media/IR/Makefile +1 -0
@@ -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
drivers/media/IR/streamzap.c new file +741 -0
741 lines not on this page · raw message
drivers/staging/lirc/Kconfig +0 -6
@@ -90,12 +90,6 @@ config LIRC_SIR help Driver for the SIR IrDA port -config LIRC_STREAMZAP - tristate "Streamzap PC Receiver" - depends on LIRC_STAGING && USB - help - Driver for the Streamzap PC Receiver - config LIRC_TTUSBIR tristate "Technotrend USB IR Receiver" depends on LIRC_STAGING && USB
drivers/staging/lirc/Makefile +0 -1
@@ -14,7 +14,6 @@ obj-$(CONFIG_LIRC_PARALLEL) += lirc_parallel.o obj-$(CONFIG_LIRC_SASEM) += lirc_sasem.o obj-$(CONFIG_LIRC_SERIAL) += lirc_serial.o obj-$(CONFIG_LIRC_SIR) += lirc_sir.o -obj-$(CONFIG_LIRC_STREAMZAP) += lirc_streamzap.o obj-$(CONFIG_LIRC_TTUSBIR) += lirc_ttusbir.o obj-$(CONFIG_LIRC_WPC8679L) += lirc_wpc8769l.o obj-$(CONFIG_LIRC_ZILOG) += lirc_zilog.o
drivers/staging/lirc/lirc_streamzap.c deleted +0 -741
741 lines not on this page · raw message
Signature · 5 lines
1.7.2 -- Jarod Wilson [email protected]
Quoted 1 line · Jarod Wilson
drivers/media/IR/keymaps/Makefile | 1 +
Uppercase "IR"? Any reason why you all picked that?
Just curious.
greg k-h
Em 02-08-2010 19:35, Greg KH escreveu:
Quoted 4 lines · Jarod Wilson
Quoted 1 line
drivers/media/IR/keymaps/Makefile | 1 +Uppercase "IR"? Any reason why you all picked that?
Infra Red. Well, it were not probably a good idea ;)
Anyway, I intend to rename it to "rc" (for Remote Controller), change lots of internal structures and eventually move it to drivers/ or drivers/input, as the idea is to use the subsystem also to other kinds of remote controllers.
I'll likely do it after finishing the merge of the pending patches, and send upstream during this merge window. It seems better to rename during the merge window.
Quoted 8 lines
Just curious.
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Cheers,
Mauro
Quoted 8 lines · Mauro Carvalho Chehab
Em 02-08-2010 19:35, Greg KH escreveu:
Quoted 4 lines · Jarod Wilson
Quoted 1 line
drivers/media/IR/keymaps/Makefile | 1 +Uppercase "IR"? Any reason why you all picked that?
Infra Red. Well, it were not probably a good idea ;)
Quoted 7 lines
Anyway, I intend to rename it to "rc" (for Remote Controller), change lots of internal structures and eventually move it to
drivers/ordrivers/input, as the idea is to use the subsystem also to other kinds of remote controllers.I'll likely do it after finishing the merge of the pending patches, and send upstream during this merge window. It seems better to rename during the merge window.
Renames are usually good for after -rc1 is out to help everyone sync up better.
thanks,
greg k-h
Quoted 11 lines
Quoted 8 lines
Just curious.
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlCheers,
Mauro