Skip to content

gpio-ir-receiver: fix overlay and add upstream patches #1514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 4, 2016

Conversation

HiassofT
Copy link
Contributor

@HiassofT HiassofT commented Jun 4, 2016

There is a small bug in the gpio-ir overlay, setting gpio_pin also changed the pin pull setting. That fix should also be applied to the 4.6 and 4.7 trees.

A minor nit: the gpio-ir overlay uses a mixture of "-" and underscore in it's parameters (gpio_pin, gpio_pull but rc-map-name), I wonder if we should straighten that up and use either "-" or underscore consistently.

I've also included the gpio-ir-recv timeout fix from kernel 4.5 and up (these are straight cherry-picks). In my tests with a RC5 hauppauge remote they also seemed to help dealing with dropouts (remote not pointing straight to IR receiver).

HiassofT and others added 3 commits June 4, 2016 11:39
A default timeout value of 125 ms should work for all decoders.

Declare a constant to help standardize its' use.

Signed-off-by: Eric Nelson <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Many decoders require a trailing space (period without IR illumination)
to be delivered before completing a decode.

Since the gpio-ir-recv driver only delivers events on gpio transitions,
a single IR symbol (caused by a quick touch on an IR remote) will not
be properly decoded without the use of a timer to flush the tail end
state of the IR receiver.

This patch initializes and uses a timer and the timeout field of rcdev
to complete the stream and allow decode.

The timeout can be overridden through the use of the LIRC_SET_REC_TIMEOUT
ioctl.

Signed-off-by: Eric Nelson <[email protected]>
Acked-by: Sean Young <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
@pelwell pelwell merged commit dc9685d into raspberrypi:rpi-4.4.y Jun 4, 2016
@clivem
Copy link

clivem commented Jun 4, 2016

I assume the merging of this PR is the reason for the stack of compile warnings.....

+ make CROSS_COMPILE=arm-linux-gnu- -s ARCH=arm V=1 -j4 KALLSYMS_EXTRA_PASS=1
In file included from drivers/media/common/siano/smscoreapi.h:40:0,
                 from drivers/media/common/siano/smscoreapi.c:24:
drivers/media/common/siano/smsir.h:33:0: warning: "IR_DEFAULT_TIMEOUT" redefined
 #define IR_DEFAULT_TIMEOUT  100
 ^
In file included from drivers/media/common/siano/smsir.h:31:0,
                 from drivers/media/common/siano/smscoreapi.h:40,
                 from drivers/media/common/siano/smscoreapi.c:24:
include/media/rc-core.h:242:0: note: this is the location of the previous definition
 #define IR_DEFAULT_TIMEOUT MS_TO_NS(125)
 ^
In file included from drivers/media/common/siano/smscoreapi.h:40:0,
                 from drivers/media/common/siano/smscoreapi.c:24:
drivers/media/common/siano/smsir.h:33:0: warning: "IR_DEFAULT_TIMEOUT" redefined
 #define IR_DEFAULT_TIMEOUT  100
 ^

@HiassofT
Copy link
Contributor Author

HiassofT commented Jun 4, 2016

Oops, sorry, I totally missed that during testing :(

This is already fixed in upstream 4.5, #1515 should fix that.

@clivem thanks for reporting!

@HiassofT HiassofT deleted the gpio-ir-fix branch June 4, 2016 23:28
@clivem
Copy link

clivem commented Jun 4, 2016

LOL. Sorry if it seemed like I was throwing a grenade in your direction because I noticed a couple of compiler warnings..... Just figured it must be as a result of this PR, didn't investigate any further and just thought I'd flag it up.

@HiassofT
Copy link
Contributor Author

HiassofT commented Jun 4, 2016

No problem at all and you were spot on with your report - reporting issues, even if they are minor ones is always a good thing!

pelwell added a commit that referenced this pull request Jun 5, 2016
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jun 8, 2016
kernel: Add ads1015 overlay
See: raspberrypi/linux#1520

kernel: brcmfmac: change rx_seq check log from error print to debug print
See: raspberrypi/linux#1313

kernel: brcmfmac: use ndev->needed_headroom to reserve additional header space
See: raspberrypi/linux#1357

kernel: brcmfmac: revise SDIO error message in brcmf_sdio_drivestrengthinit

kernel: BCM270X_DT: Make i2c-gpio usable by other overlays

kernel: BCM270X_DT: Fix rpi-dac overlay
See: http://forum.kodi.tv/showthread.php?tid=269814&pid=2349776#pid2349776

kernel: Implement a wakeup-source option for the i2c-rtc DeviceTree overlay
See: raspberrypi/linux#1511

kernel: gpio-ir-receiver: fix overlay and add upstream patches
See: raspberrypi/linux#1514

firmware: Tuner: Disable unused ACLS tuner, and improve logging
firmware: imx219: Remove static variable
firmware: ISP Tuners: Make DPF parsing thread safe

firmware: audioplus: Allow passthrough dma priority to be overridden in same way as pcm
firmware: di_adv: Remove delay uniform
firmeare: di_adv: Enable limiter and tweak axi priorities
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Jun 8, 2016
kernel: Add ads1015 overlay
See: raspberrypi/linux#1520

kernel: brcmfmac: change rx_seq check log from error print to debug print
See: raspberrypi/linux#1313

kernel: brcmfmac: use ndev->needed_headroom to reserve additional header space
See: raspberrypi/linux#1357

kernel: brcmfmac: revise SDIO error message in brcmf_sdio_drivestrengthinit

kernel: BCM270X_DT: Make i2c-gpio usable by other overlays

kernel: BCM270X_DT: Fix rpi-dac overlay
See: http://forum.kodi.tv/showthread.php?tid=269814&pid=2349776#pid2349776

kernel: Implement a wakeup-source option for the i2c-rtc DeviceTree overlay
See: raspberrypi/linux#1511

kernel: gpio-ir-receiver: fix overlay and add upstream patches
See: raspberrypi/linux#1514

firmware: Tuner: Disable unused ACLS tuner, and improve logging
firmware: imx219: Remove static variable
firmware: ISP Tuners: Make DPF parsing thread safe

firmware: audioplus: Allow passthrough dma priority to be overridden in same way as pcm
firmware: di_adv: Remove delay uniform
firmeare: di_adv: Enable limiter and tweak axi priorities
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this pull request Feb 27, 2017
kernel: Add ads1015 overlay
See: raspberrypi/linux#1520

kernel: brcmfmac: change rx_seq check log from error print to debug print
See: raspberrypi/linux#1313

kernel: brcmfmac: use ndev->needed_headroom to reserve additional header space
See: raspberrypi/linux#1357

kernel: brcmfmac: revise SDIO error message in brcmf_sdio_drivestrengthinit

kernel: BCM270X_DT: Make i2c-gpio usable by other overlays

kernel: BCM270X_DT: Fix rpi-dac overlay
See: http://forum.kodi.tv/showthread.php?tid=269814&pid=2349776#pid2349776

kernel: Implement a wakeup-source option for the i2c-rtc DeviceTree overlay
See: raspberrypi/linux#1511

kernel: gpio-ir-receiver: fix overlay and add upstream patches
See: raspberrypi/linux#1514

firmware: Tuner: Disable unused ACLS tuner, and improve logging
firmware: imx219: Remove static variable
firmware: ISP Tuners: Make DPF parsing thread safe

firmware: audioplus: Allow passthrough dma priority to be overridden in same way as pcm
firmware: di_adv: Remove delay uniform
firmeare: di_adv: Enable limiter and tweak axi priorities
popcornmix pushed a commit that referenced this pull request Feb 26, 2019
commit da21535 ("ASoC: simple-card: merge simple-scu-card")
merged simple-card and simple-scu-card. Then it had refcount
underflow bug. This patch fixup it.
We will get below error without this patch.

	OF: ERROR: Bad of_node_put() on /sound
	CPU: 3 PID: 237 Comm: kworker/3:1 Not tainted 5.0.0-rc6+ #1514
	Hardware name: Renesas H3ULCB Kingfisher board based on r8a7795 ES2.0+ (DT)
	Workqueue: events deferred_probe_work_func
	Call trace:
	 dump_backtrace+0x0/0x150
	 show_stack+0x24/0x30
	 dump_stack+0xb0/0xec
	 of_node_release+0xd0/0xd8
	 kobject_put+0x74/0xe8
	 of_node_put+0x24/0x30
	 __of_get_next_child+0x50/0x70
	 of_get_next_child+0x40/0x68
	 asoc_simple_card_probe+0x604/0x730
	 platform_drv_probe+0x58/0xa8
	 ...
Reported-by: Vicente Bergas <[email protected]>
Signed-off-by: Kuninori Morimoto <[email protected]>

Signed-off-by: Mark Brown <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants