Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Wake up on IR remote not works

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Wake up on IR remote not works

    Hello guys.
    I have searched many hours the web to find out a solution for the problem but it is still not solved.
    I have a p212 board (S905X) along with android 7.1 amlogic SDK.

    My board does not wake from shutdown or suspend when I press power button on remote.

    I see in uboot/board/amlogic/configs/gxl_p212_v1.h there is CONFIG_IR_REMOTE_POWER_UP_KEY_VAL1 (and some similar defines)
    and I know the syntax. (first byte is inverse logic of key scancode, the second is key_scancode and last 2 bytes are factory codes.)
    #define CONFIG_IR_REMOTE_POWER_UP_KEY_VAL1 0XE51AFB04 //amlogic tv ir --- power
    But the wake up on IR still not working.

    ALSO another weird problem : Repeat key function not works too! (When you hold right key it only moves one step!) I know back when we have Android 6.0 SDK, we used to configure remote via remote.conf. But as you know this does not work for Android 7 and we should handle keymap and other remote configs in kernel. (device tree)

    But I wonder how to set repeat key functioality in device tree or elsewhere!

    Thanks.


    #2
    Hi,
    Please post the Power-Key scancode and factory code from remote.conf. What does your key combination in u-boot configuration file look like? Which u-boot branch do you use?

    Comment


      #3
      Originally posted by bumerc View Post
      Hi,
      Please post the Power-Key scancode and factory code from remote.conf. What does your key combination in u-boot configuration file look like? Which u-boot branch do you use?
      This is my remote.conf : https://paste.ubuntu.com/p/JH8DkGtBTq/

      factory_code = 0x40400001

      and

      key_begin
      ....
      0x4d 116 #Power
      .....
      key_end

      I use Nougat branch. (git checkout Nougat)

      But Excuse me what you mean by "key combination in u-boot configuration file"? Do you mean http://www.denx.de/wiki/publish/U-Bo...Section_1.12.3. ?

      Thank you bumerc

      Comment


        #4
        Hi,
        for p212 use this Branch

        The right key code (combination) in the u-boot would be for you:
        Code:
        0xB24D4040

        Comment


          #5
          Hi again,
          I replaced the branch you said (entire u-boot directory) and also changed the line to:

          #define CONFIG_IR_REMOTE_POWER_UP_KEY_VAL1 0xB24D4040

          But It did not work

          Now the situation is amazing. When I press power key on remote it suspends successfully and the LED on board become blinking between blue(ON state) and red (OFF state) and when you press power key at this point the box turns on. Again if you press power key device will be suspended and pressing power key no longer works!

          Maybe it is due to suspend process that might not done perfectly. isnt it?

          How can I make sure device is suspended correctly?

          I am really confused about wake up on IR remote!

          Thank you bumerc
          Last edited by salehdeh76; 02 September 2018, 20:55.

          Comment


            #6
            Maybe it is due to suspend process that might not done perfectly. isnt it?
            disable HDMI-CEC control in Android or u-boot and try again.

            How can I make sure device is suspended correctly
            you have to create the log via uart interface

            Comment


              #7
              hi bumerc .
              I Disabled CEC via android settings but no efffect. (As I humbly had guessed)

              connwcted via uart and seeing logs shows suspend.

              But still device can not wake up on IR,HID,..!!

              Comment


                #8
                I pasted my suspend log (UART) here:

                Comment


                  #9
                  It's not a full power off mode, it's just sleep. The kernel seems to have problems with it. CEC is still active. Try shutdown command via terminal.

                  Comment


                    #10
                    1.Yes, It's sleep. but the remote should be able to wake up the box from suspend. I compared my suspend log vs a successful log (from here; this is a suspend AND then resume,though) but no special difference. (except for my wifi driver RTL871X logs)

                    From what clue you said "The kernel seems to have problems with it." ? And How I should go around?

                    2.I had disabled CEC and suspend log when disable is here. (CEC cfg:0x0000) but no effect. When it is at sleep, pressing any key produces no log on uart! and the chip seems to be dead. (No response to HID,IR; only unplug&plug wakes it!)

                    3.Also I tried shutdown both via uart terminal (log) and via remote powerkey.(when set the 'Powerkey definition' to shutdown in android setting menu; uart log)
                    -------------------------
                    As you know there is a similar issue in libreelec not resolved yet. I am very wondering why the device is not wake up from any source.

                    Again Thank you for your respect bumerc

                    Comment


                      #11
                      I have a similar problem and i was told it is not a system but a defective adapter, specifically a condenser cover.
                      I have a new original adapter ordered so I can not say yet whether it's true.

                      Comment


                        #12
                        Gante
                        What do you mean by the 'Adapter' exactly?
                        Also I do not understand what is condenser !
                        ​​​​​​​thank you

                        Comment


                          #13
                          It is not a bootloader problem.
                          If you are using nougat kernel, the remote control is running via dt-bindings, have you looked in the dtb file for the errors?

                          Comment


                            #14
                            Originally posted by salehdeh76 View Post
                            Gante
                            What do you mean by the 'Adapter' exactly?
                            Also I do not understand what is condenser !
                            ​​​​​​​thank you

                            Comment


                              #15
                              Originally posted by bumerc View Post
                              It is not a bootloader problem.
                              If you are using nougat kernel, the remote control is running via dt-bindings, have you looked in the dtb file for the errors?
                              Yes. I has configured remote control via devicetree. (Remote section of my device tree(from mesongxl.dtsi) is pasted here). But I don't know whether it has anything to do about wakeup functionality.)

                              Another note I catch this day:
                              I find a p212 board with Mmallow on it. The board works perfectly about remote and wakeup. I get UART log when it suspends and resumes. I find that the box is using remote_main.c driver (not remote_meson.c).

                              The Makefile of amlogic remote driver is

                              Code:
                              #
                              # Makefile for the remote control drivers
                              #
                              
                              # Each configuration option enables a list of files.
                              
                              obj-$(CONFIG_MESON_REMOTE)        += remote.o
                              #remote-objs := remote_main.o remote_func.o
                              
                              remote-objs := remote_core.o remote_meson.o sysfs.o remote_cdev.o remote_raw.o remote_decoder_xmp.o remote_regmap.o
                              I guess its compiler uses first line (despite my SDK which uses 2nd line commenting former one)

                              What is the difference between these drivers? Can I use remote_main with p212?

                              Thank you bumerc

                              Comment

                              Working...
                              X