USB-UIRT wake from S3 fix

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

USB-UIRT wake from S3 fix

Aaron Thompson
Hello LIRC devs,

There's a known issue that the USB-UIRT will not trigger wakeup from S3 after it has been opened by lircd. I found out that explicitly setting the mode back to UIR on deinit fixes the issue, and I've included the patch. I've tested the fix with a USB-UIRT version 0905 and LIRC versions 0.9.0 (Ubuntu Xenial) and 0.9.4pre2 (git).

Thanks,
-- Aaron

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
Reply | Threaded
Open this post in threaded view
|

[PATCH] uirt2_raw: Set UIR mode on deinit.

Aaron Thompson
If the UIRT is left in RAW mode, it does not trigger wake from S3.
Setting the UIRT back to UIR mode on deinit allows wake from S3 to
work properly.
---
 plugins/uirt2_raw.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/plugins/uirt2_raw.c b/plugins/uirt2_raw.c
index 8df1364..8ccaf4c 100644
--- a/plugins/uirt2_raw.c
+++ b/plugins/uirt2_raw.c
@@ -278,8 +278,12 @@ static int uirt2_raw_deinit(void)
 {
  int version;
 
+ if (uirt2_setmodeuir(dev) < 0)
+ log_warn("uirt2_raw: could not set uir mode");
+
  if (uirt2_getversion(dev, &version) >= 0 && version >= 0x0905)
  tty_setdtr(drv.fd, 1);
+
  uirt2_uninit(dev);
  dev = NULL;
  close(drv.fd);
--
2.7.4


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] uirt2_raw: Set UIR mode on deinit.

Aaron Thompson
Just a reminder of this patch in case it was overlooked.

Thanks,
-- Aaron


On Fri, May 20, 2016 at 2:02 AM, Aaron Thompson <[hidden email]> wrote:
If the UIRT is left in RAW mode, it does not trigger wake from S3.
Setting the UIRT back to UIR mode on deinit allows wake from S3 to
work properly.
---
 plugins/uirt2_raw.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/plugins/uirt2_raw.c b/plugins/uirt2_raw.c
index 8df1364..8ccaf4c 100644
--- a/plugins/uirt2_raw.c
+++ b/plugins/uirt2_raw.c
@@ -278,8 +278,12 @@ static int uirt2_raw_deinit(void)
 {
        int version;

+       if (uirt2_setmodeuir(dev) < 0)
+               log_warn("uirt2_raw: could not set uir mode");
+
        if (uirt2_getversion(dev, &version) >= 0 && version >= 0x0905)
                tty_setdtr(drv.fd, 1);
+
        uirt2_uninit(dev);
        dev = NULL;
        close(drv.fd);
--
2.7.4



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e