Buttons via evtest

Talking about OS and emulation core development
Post Reply
User avatar
mad_ady
Posts: 7381
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 359 times
Been thanked: 258 times
Contact:

Buttons via evtest

Unread post by mad_ady » Mon Jan 13, 2020 10:08 pm

Thankfully the buttons on the Go Advance are mapped as a /dev/event device and can be used for other purposes by rebinding them with tools like antimicro, or https://github.com/mad-ady/multibutton

Code: Select all

root@goadvance:/media/boot# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      rk8xx_pwrkey
/dev/input/event1:      rockchip,rk817-codec Headphones
/dev/input/event2:      odroidgo2_joypad
Select the device event number [0-2]: 2
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x101
Input device name: "odroidgo2_joypad"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 304 (BTN_SOUTH)
    Event code 305 (BTN_EAST)
    Event code 307 (BTN_NORTH)
    Event code 308 (BTN_WEST)
    Event code 310 (BTN_TL)
    Event code 311 (BTN_TR)
    Event code 544 (BTN_DPAD_UP)
    Event code 545 (BTN_DPAD_DOWN)
    Event code 546 (BTN_DPAD_LEFT)
    Event code 547 (BTN_DPAD_RIGHT)
    Event code 704 (BTN_TRIGGER_HAPPY1)
    Event code 705 (BTN_TRIGGER_HAPPY2)
    Event code 706 (BTN_TRIGGER_HAPPY3)
    Event code 707 (BTN_TRIGGER_HAPPY4)
    Event code 708 (BTN_TRIGGER_HAPPY5)
    Event code 709 (BTN_TRIGGER_HAPPY6)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value    -37
      Min     -550
      Max      549
      Fuzz      10
      Flat      10
    Event code 1 (ABS_Y)
      Value     -4
      Min     -500
      Max      499
      Fuzz      10
      Flat      10
Properties:
Testing ... (interrupt to exit)
Event: time 1578920661.962174, type 1 (EV_KEY), code 308 (BTN_WEST), value 1
Event: time 1578920661.962174, -------------- SYN_REPORT ------------
Event: time 1578920662.098353, type 1 (EV_KEY), code 308 (BTN_WEST), value 0
Event: time 1578920662.098353, -------------- SYN_REPORT ------------
Event: time 1578920665.542307, type 1 (EV_KEY), code 307 (BTN_NORTH), value 1
Event: time 1578920665.542307, -------------- SYN_REPORT ------------
Event: time 1578920665.678227, type 1 (EV_KEY), code 307 (BTN_NORTH), value 0
Event: time 1578920665.678227, -------------- SYN_REPORT ------------
Event: time 1578920668.238202, type 1 (EV_KEY), code 305 (BTN_EAST), value 1
Event: time 1578920668.238202, -------------- SYN_REPORT ------------
Event: time 1578920668.358153, type 1 (EV_KEY), code 305 (BTN_EAST), value 0
Event: time 1578920668.358153, -------------- SYN_REPORT ------------
Event: time 1578920670.514318, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 1
Event: time 1578920670.514318, -------------- SYN_REPORT ------------
Event: time 1578920670.658217, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 0
Event: time 1578920670.658217, -------------- SYN_REPORT ------------
Event: time 1578920673.894276, type 1 (EV_KEY), code 544 (BTN_DPAD_UP), value 1
Event: time 1578920673.894276, -------------- SYN_REPORT ------------
Event: time 1578920673.986192, type 1 (EV_KEY), code 544 (BTN_DPAD_UP), value 0
Event: time 1578920673.986192, -------------- SYN_REPORT ------------
Event: time 1578920675.226296, type 1 (EV_KEY), code 545 (BTN_DPAD_DOWN), value 1
Event: time 1578920675.226296, -------------- SYN_REPORT ------------
Event: time 1578920675.314203, type 1 (EV_KEY), code 545 (BTN_DPAD_DOWN), value 0
Event: time 1578920675.314203, -------------- SYN_REPORT ------------
Event: time 1578920677.342327, type 1 (EV_KEY), code 546 (BTN_DPAD_LEFT), value 1
Event: time 1578920677.342327, -------------- SYN_REPORT ------------
Event: time 1578920677.490284, type 1 (EV_KEY), code 546 (BTN_DPAD_LEFT), value 0
Event: time 1578920677.490284, -------------- SYN_REPORT ------------
Event: time 1578920678.046225, type 1 (EV_KEY), code 547 (BTN_DPAD_RIGHT), value 1
Event: time 1578920678.046225, -------------- SYN_REPORT ------------
Event: time 1578920678.162208, type 1 (EV_KEY), code 547 (BTN_DPAD_RIGHT), value 0
Event: time 1578920678.162208, -------------- SYN_REPORT ------------
Event: time 1578920681.234172, type 1 (EV_KEY), code 311 (BTN_TR), value 1
Event: time 1578920681.234172, -------------- SYN_REPORT ------------
Event: time 1578920681.442189, type 1 (EV_KEY), code 311 (BTN_TR), value 0
Event: time 1578920681.442189, -------------- SYN_REPORT ------------
Event: time 1578920682.538396, type 1 (EV_KEY), code 310 (BTN_TL), value 1
Event: time 1578920682.538396, -------------- SYN_REPORT ------------
Event: time 1578920682.746197, type 1 (EV_KEY), code 310 (BTN_TL), value 0
Event: time 1578920682.746197, -------------- SYN_REPORT ------------
Event: time 1578920687.014211, type 1 (EV_KEY), code 704 (BTN_TRIGGER_HAPPY1), value 1
Event: time 1578920687.014211, -------------- SYN_REPORT ------------
Event: time 1578920687.250167, type 1 (EV_KEY), code 704 (BTN_TRIGGER_HAPPY1), value 0
Event: time 1578920687.250167, -------------- SYN_REPORT ------------
Event: time 1578920688.350198, type 1 (EV_KEY), code 705 (BTN_TRIGGER_HAPPY2), value 1
Event: time 1578920688.350198, -------------- SYN_REPORT ------------
Event: time 1578920688.570268, type 1 (EV_KEY), code 705 (BTN_TRIGGER_HAPPY2), value 0
Event: time 1578920688.570268, -------------- SYN_REPORT ------------
Event: time 1578920689.702487, type 1 (EV_KEY), code 706 (BTN_TRIGGER_HAPPY3), value 1
Event: time 1578920689.702487, -------------- SYN_REPORT ------------
Event: time 1578920689.894186, type 1 (EV_KEY), code 706 (BTN_TRIGGER_HAPPY3), value 0
Event: time 1578920689.894186, -------------- SYN_REPORT ------------
Event: time 1578920690.482183, type 1 (EV_KEY), code 707 (BTN_TRIGGER_HAPPY4), value 1
Event: time 1578920690.482183, -------------- SYN_REPORT ------------
Event: time 1578920690.674246, type 1 (EV_KEY), code 707 (BTN_TRIGGER_HAPPY4), value 0
Event: time 1578920690.674246, -------------- SYN_REPORT ------------
Event: time 1578920692.082212, type 1 (EV_KEY), code 708 (BTN_TRIGGER_HAPPY5), value 1
Event: time 1578920692.082212, -------------- SYN_REPORT ------------
Event: time 1578920692.242203, type 1 (EV_KEY), code 708 (BTN_TRIGGER_HAPPY5), value 0
Event: time 1578920692.242203, -------------- SYN_REPORT ------------
Event: time 1578920692.782162, type 1 (EV_KEY), code 709 (BTN_TRIGGER_HAPPY6), value 1
Event: time 1578920692.782162, -------------- SYN_REPORT ------------
Event: time 1578920692.950156, type 1 (EV_KEY), code 709 (BTN_TRIGGER_HAPPY6), value 0
Event: time 1578920692.950156, -------------- SYN_REPORT ------------
Event: time 1578920695.586276, type 3 (EV_ABS), code 0 (ABS_X), value -35
Event: time 1578920695.586276, -------------- SYN_REPORT ------------
Event: time 1578920695.594249, type 3 (EV_ABS), code 0 (ABS_X), value -12
Event: time 1578920695.594249, -------------- SYN_REPORT ------------
Event: time 1578920695.602185, type 3 (EV_ABS), code 0 (ABS_X), value -7
Event: time 1578920695.602185, -------------- SYN_REPORT ------------
Event: time 1578920695.606166, type 3 (EV_ABS), code 0 (ABS_X), value -5
Event: time 1578920695.606166, -------------- SYN_REPORT ------------
Event: time 1578920695.614109, type 3 (EV_ABS), code 0 (ABS_X), value -3
Event: time 1578920695.614109, -------------- SYN_REPORT ------------
Event: time 1578920695.646142, type 3 (EV_ABS), code 0 (ABS_X), value -4
Event: time 1578920695.646142, -------------- SYN_REPORT ------------
Event: time 1578920695.650324, type 3 (EV_ABS), code 0 (ABS_X), value -5
Event: time 1578920695.650324, -------------- SYN_REPORT ------------
Event: time 1578920695.658127, type 3 (EV_ABS), code 0 (ABS_X), value -6
Event: time 1578920695.658127, -------------- SYN_REPORT ------------
Event: time 1578920695.702190, type 3 (EV_ABS), code 0 (ABS_X), value -7
Event: time 1578920695.702190, -------------- SYN_REPORT ------------
Event: time 1578920695.734137, type 3 (EV_ABS), code 0 (ABS_X), value -8
Event: time 1578920695.734137, -------------- SYN_REPORT ------------
Event: time 1578920695.738145, type 3 (EV_ABS), code 0 (ABS_X), value -10
Event: time 1578920695.738145, -------------- SYN_REPORT ------------
Event: time 1578920695.742126, type 3 (EV_ABS), code 0 (ABS_X), value -16
Event: time 1578920695.742126, -------------- SYN_REPORT ------------
Event: time 1578920695.746124, type 3 (EV_ABS), code 0 (ABS_X), value -22
Event: time 1578920695.746124, -------------- SYN_REPORT ------------
Event: time 1578920695.750337, type 3 (EV_ABS), code 0 (ABS_X), value -27
Event: time 1578920695.750337, -------------- SYN_REPORT ------------
Event: time 1578920695.758125, type 3 (EV_ABS), code 0 (ABS_X), value -32
Event: time 1578920695.758125, -------------- SYN_REPORT ------------
Event: time 1578920695.822139, type 3 (EV_ABS), code 1 (ABS_Y), value -5
Event: time 1578920695.822139, -------------- SYN_REPORT ------------
These users thanked the author mad_ady for the post:
kamots (Sat Jan 18, 2020 1:36 pm)

hej.luxom
Posts: 10
Joined: Thu Feb 13, 2020 9:56 pm
languages_spoken: english
ODROIDs: Go, advance
Has thanked: 0
Been thanked: 0
Contact:

Re: Buttons via evtest

Unread post by hej.luxom » Sat Feb 15, 2020 4:09 am

Hi, is there any way to disable the analog stick from here?

User avatar
mad_ady
Posts: 7381
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 359 times
Been thanked: 258 times
Contact:

Re: Buttons via evtest

Unread post by mad_ady » Sat Feb 15, 2020 4:28 am

Maybe via editing the dtb. Or You could remove /dev/input/js0 or whatever the node is called...

deerwings
Posts: 113
Joined: Mon Oct 08, 2018 9:11 am
languages_spoken: english
ODROIDs: Odroid Go, Odroid Go Advance
Has thanked: 1 time
Been thanked: 11 times
Contact:

Re: Buttons via evtest

Unread post by deerwings » Sun Feb 16, 2020 5:29 am

Great thing about this, is that it might be helpful when we figure out how to add more shoulder buttons. I'm not as hardware-privy as I'd like to be, but I'm interested in how 'plug and play' adding some shoulder buttons to a daughterboard on the top would be.

ripper121
Posts: 172
Joined: Mon Jan 28, 2019 7:00 pm
languages_spoken: english
Has thanked: 42 times
Been thanked: 22 times
Contact:

Re: Buttons via evtest

Unread post by ripper121 » Mon Feb 17, 2020 12:13 am

Is it possible to use a Ubuntu Desktop with this?
So the Analogstick is a Mouse and A/B Left Right Click?

User avatar
mad_ady
Posts: 7381
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 359 times
Been thanked: 258 times
Contact:

Re: Buttons via evtest

Unread post by mad_ady » Mon Feb 17, 2020 12:45 am

ripper121 wrote:Is it possible to use a Ubuntu Desktop with this?
So the Analogstick is a Mouse and A/B Left Right Click?
Yes! I've configure the joystick + triggers to act as a mouse with antimicro. It takes a bit of time to get used to it...

ripper121
Posts: 172
Joined: Mon Jan 28, 2019 7:00 pm
languages_spoken: english
Has thanked: 42 times
Been thanked: 22 times
Contact:

Re: Buttons via evtest

Unread post by ripper121 » Mon Feb 17, 2020 12:48 am

Cool, could you do a little how to?

User avatar
mad_ady
Posts: 7381
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 359 times
Been thanked: 258 times
Contact:

Re: Buttons via evtest

Unread post by mad_ady » Mon Feb 17, 2020 1:42 am

I'll try to share the config tomorrow.
I started antimicro through ssh with X11 forwarding (ssh -X). I ran the controller setup program and then clicked on the dpad and selected Mouse emulation. Clicked on the triggers and selected left click/right click.

PaulF8080
Posts: 15
Joined: Fri Feb 14, 2020 9:40 am
languages_spoken: english
ODROIDs: go, go advance, xu4
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Buttons via evtest

Unread post by PaulF8080 » Wed Feb 19, 2020 7:21 pm

This is great news for me. SDL uses events and I have an SDL app I want to port.

shanti
Posts: 172
Joined: Fri Feb 15, 2019 3:12 am
languages_spoken: english, spanish
ODROIDs: Odroid N2
Has thanked: 27 times
Been thanked: 42 times
Contact:

Re: Buttons via evtest

Unread post by shanti » Thu Feb 20, 2020 3:17 am

mad_ady wrote:
Mon Jan 13, 2020 10:08 pm
Thankfully the buttons on the Go Advance are mapped as a /dev/event device and can be used for other purposes by rebinding them with tools like antimicro, or https://github.com/mad-ady/multibutton

Code: Select all

root@goadvance:/media/boot# evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      rk8xx_pwrkey
/dev/input/event1:      rockchip,rk817-codec Headphones
/dev/input/event2:      odroidgo2_joypad
Select the device event number [0-2]: 2
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x101
Input device name: "odroidgo2_joypad"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 304 (BTN_SOUTH)
    Event code 305 (BTN_EAST)
    Event code 307 (BTN_NORTH)
    Event code 308 (BTN_WEST)
    Event code 310 (BTN_TL)
    Event code 311 (BTN_TR)
    Event code 544 (BTN_DPAD_UP)
    Event code 545 (BTN_DPAD_DOWN)
    Event code 546 (BTN_DPAD_LEFT)
    Event code 547 (BTN_DPAD_RIGHT)
    Event code 704 (BTN_TRIGGER_HAPPY1)
    Event code 705 (BTN_TRIGGER_HAPPY2)
    Event code 706 (BTN_TRIGGER_HAPPY3)
    Event code 707 (BTN_TRIGGER_HAPPY4)
    Event code 708 (BTN_TRIGGER_HAPPY5)
    Event code 709 (BTN_TRIGGER_HAPPY6)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value    -37
      Min     -550
      Max      549
      Fuzz      10
      Flat      10
    Event code 1 (ABS_Y)
      Value     -4
      Min     -500
      Max      499
      Fuzz      10
      Flat      10
Properties:
Testing ... (interrupt to exit)
Event: time 1578920661.962174, type 1 (EV_KEY), code 308 (BTN_WEST), value 1
Event: time 1578920661.962174, -------------- SYN_REPORT ------------
Event: time 1578920662.098353, type 1 (EV_KEY), code 308 (BTN_WEST), value 0
Event: time 1578920662.098353, -------------- SYN_REPORT ------------
Event: time 1578920665.542307, type 1 (EV_KEY), code 307 (BTN_NORTH), value 1
Event: time 1578920665.542307, -------------- SYN_REPORT ------------
Event: time 1578920665.678227, type 1 (EV_KEY), code 307 (BTN_NORTH), value 0
Event: time 1578920665.678227, -------------- SYN_REPORT ------------
Event: time 1578920668.238202, type 1 (EV_KEY), code 305 (BTN_EAST), value 1
Event: time 1578920668.238202, -------------- SYN_REPORT ------------
Event: time 1578920668.358153, type 1 (EV_KEY), code 305 (BTN_EAST), value 0
Event: time 1578920668.358153, -------------- SYN_REPORT ------------
Event: time 1578920670.514318, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 1
Event: time 1578920670.514318, -------------- SYN_REPORT ------------
Event: time 1578920670.658217, type 1 (EV_KEY), code 304 (BTN_SOUTH), value 0
Event: time 1578920670.658217, -------------- SYN_REPORT ------------
Event: time 1578920673.894276, type 1 (EV_KEY), code 544 (BTN_DPAD_UP), value 1
Event: time 1578920673.894276, -------------- SYN_REPORT ------------
Event: time 1578920673.986192, type 1 (EV_KEY), code 544 (BTN_DPAD_UP), value 0
Event: time 1578920673.986192, -------------- SYN_REPORT ------------
Event: time 1578920675.226296, type 1 (EV_KEY), code 545 (BTN_DPAD_DOWN), value 1
Event: time 1578920675.226296, -------------- SYN_REPORT ------------
Event: time 1578920675.314203, type 1 (EV_KEY), code 545 (BTN_DPAD_DOWN), value 0
Event: time 1578920675.314203, -------------- SYN_REPORT ------------
Event: time 1578920677.342327, type 1 (EV_KEY), code 546 (BTN_DPAD_LEFT), value 1
Event: time 1578920677.342327, -------------- SYN_REPORT ------------
Event: time 1578920677.490284, type 1 (EV_KEY), code 546 (BTN_DPAD_LEFT), value 0
Event: time 1578920677.490284, -------------- SYN_REPORT ------------
Event: time 1578920678.046225, type 1 (EV_KEY), code 547 (BTN_DPAD_RIGHT), value 1
Event: time 1578920678.046225, -------------- SYN_REPORT ------------
Event: time 1578920678.162208, type 1 (EV_KEY), code 547 (BTN_DPAD_RIGHT), value 0
Event: time 1578920678.162208, -------------- SYN_REPORT ------------
Event: time 1578920681.234172, type 1 (EV_KEY), code 311 (BTN_TR), value 1
Event: time 1578920681.234172, -------------- SYN_REPORT ------------
Event: time 1578920681.442189, type 1 (EV_KEY), code 311 (BTN_TR), value 0
Event: time 1578920681.442189, -------------- SYN_REPORT ------------
Event: time 1578920682.538396, type 1 (EV_KEY), code 310 (BTN_TL), value 1
Event: time 1578920682.538396, -------------- SYN_REPORT ------------
Event: time 1578920682.746197, type 1 (EV_KEY), code 310 (BTN_TL), value 0
Event: time 1578920682.746197, -------------- SYN_REPORT ------------
Event: time 1578920687.014211, type 1 (EV_KEY), code 704 (BTN_TRIGGER_HAPPY1), value 1
Event: time 1578920687.014211, -------------- SYN_REPORT ------------
Event: time 1578920687.250167, type 1 (EV_KEY), code 704 (BTN_TRIGGER_HAPPY1), value 0
Event: time 1578920687.250167, -------------- SYN_REPORT ------------
Event: time 1578920688.350198, type 1 (EV_KEY), code 705 (BTN_TRIGGER_HAPPY2), value 1
Event: time 1578920688.350198, -------------- SYN_REPORT ------------
Event: time 1578920688.570268, type 1 (EV_KEY), code 705 (BTN_TRIGGER_HAPPY2), value 0
Event: time 1578920688.570268, -------------- SYN_REPORT ------------
Event: time 1578920689.702487, type 1 (EV_KEY), code 706 (BTN_TRIGGER_HAPPY3), value 1
Event: time 1578920689.702487, -------------- SYN_REPORT ------------
Event: time 1578920689.894186, type 1 (EV_KEY), code 706 (BTN_TRIGGER_HAPPY3), value 0
Event: time 1578920689.894186, -------------- SYN_REPORT ------------
Event: time 1578920690.482183, type 1 (EV_KEY), code 707 (BTN_TRIGGER_HAPPY4), value 1
Event: time 1578920690.482183, -------------- SYN_REPORT ------------
Event: time 1578920690.674246, type 1 (EV_KEY), code 707 (BTN_TRIGGER_HAPPY4), value 0
Event: time 1578920690.674246, -------------- SYN_REPORT ------------
Event: time 1578920692.082212, type 1 (EV_KEY), code 708 (BTN_TRIGGER_HAPPY5), value 1
Event: time 1578920692.082212, -------------- SYN_REPORT ------------
Event: time 1578920692.242203, type 1 (EV_KEY), code 708 (BTN_TRIGGER_HAPPY5), value 0
Event: time 1578920692.242203, -------------- SYN_REPORT ------------
Event: time 1578920692.782162, type 1 (EV_KEY), code 709 (BTN_TRIGGER_HAPPY6), value 1
Event: time 1578920692.782162, -------------- SYN_REPORT ------------
Event: time 1578920692.950156, type 1 (EV_KEY), code 709 (BTN_TRIGGER_HAPPY6), value 0
Event: time 1578920692.950156, -------------- SYN_REPORT ------------
Event: time 1578920695.586276, type 3 (EV_ABS), code 0 (ABS_X), value -35
Event: time 1578920695.586276, -------------- SYN_REPORT ------------
Event: time 1578920695.594249, type 3 (EV_ABS), code 0 (ABS_X), value -12
Event: time 1578920695.594249, -------------- SYN_REPORT ------------
Event: time 1578920695.602185, type 3 (EV_ABS), code 0 (ABS_X), value -7
Event: time 1578920695.602185, -------------- SYN_REPORT ------------
Event: time 1578920695.606166, type 3 (EV_ABS), code 0 (ABS_X), value -5
Event: time 1578920695.606166, -------------- SYN_REPORT ------------
Event: time 1578920695.614109, type 3 (EV_ABS), code 0 (ABS_X), value -3
Event: time 1578920695.614109, -------------- SYN_REPORT ------------
Event: time 1578920695.646142, type 3 (EV_ABS), code 0 (ABS_X), value -4
Event: time 1578920695.646142, -------------- SYN_REPORT ------------
Event: time 1578920695.650324, type 3 (EV_ABS), code 0 (ABS_X), value -5
Event: time 1578920695.650324, -------------- SYN_REPORT ------------
Event: time 1578920695.658127, type 3 (EV_ABS), code 0 (ABS_X), value -6
Event: time 1578920695.658127, -------------- SYN_REPORT ------------
Event: time 1578920695.702190, type 3 (EV_ABS), code 0 (ABS_X), value -7
Event: time 1578920695.702190, -------------- SYN_REPORT ------------
Event: time 1578920695.734137, type 3 (EV_ABS), code 0 (ABS_X), value -8
Event: time 1578920695.734137, -------------- SYN_REPORT ------------
Event: time 1578920695.738145, type 3 (EV_ABS), code 0 (ABS_X), value -10
Event: time 1578920695.738145, -------------- SYN_REPORT ------------
Event: time 1578920695.742126, type 3 (EV_ABS), code 0 (ABS_X), value -16
Event: time 1578920695.742126, -------------- SYN_REPORT ------------
Event: time 1578920695.746124, type 3 (EV_ABS), code 0 (ABS_X), value -22
Event: time 1578920695.746124, -------------- SYN_REPORT ------------
Event: time 1578920695.750337, type 3 (EV_ABS), code 0 (ABS_X), value -27
Event: time 1578920695.750337, -------------- SYN_REPORT ------------
Event: time 1578920695.758125, type 3 (EV_ABS), code 0 (ABS_X), value -32
Event: time 1578920695.758125, -------------- SYN_REPORT ------------
Event: time 1578920695.822139, type 3 (EV_ABS), code 1 (ABS_Y), value -5
Event: time 1578920695.822139, -------------- SYN_REPORT ------------

I see the headphone jack is handled as a input

/dev/input/event1: rockchip,rk817-codec Headphones

Does this mean that every-time I insert/remove my headphones something gets triggered here? if this is the case it can be helpful to create an automatic switch for the speaker/headphones

User avatar
mad_ady
Posts: 7381
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 359 times
Been thanked: 258 times
Contact:

Re: Buttons via evtest

Unread post by mad_ady » Thu Feb 20, 2020 3:51 am

Yes, it should, though I haven't tested it.

PaulF8080
Posts: 15
Joined: Fri Feb 14, 2020 9:40 am
languages_spoken: english
ODROIDs: go, go advance, xu4
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Buttons via evtest

Unread post by PaulF8080 » Thu Feb 20, 2020 4:13 am

shanti wrote:
Thu Feb 20, 2020 3:17 am

I see the headphone jack is handled as a input

/dev/input/event1: rockchip,rk817-codec Headphones

Does this mean that every-time I insert/remove my headphones something gets triggered here? if this is the case it can be helpful to create an automatic switch for the speaker/headphones
I've seen that done in hardware. The jack may have a single pole double throw switch that routes the audio to the speakers or phones.

shanti
Posts: 172
Joined: Fri Feb 15, 2019 3:12 am
languages_spoken: english, spanish
ODROIDs: Odroid N2
Has thanked: 27 times
Been thanked: 42 times
Contact:

Re: Buttons via evtest

Unread post by shanti » Thu Feb 20, 2020 4:28 am

Yeah, but AFAIK the OGOA does not have that, it has to be done by software... Not sure why they didn't just included a jack like that along with a volume slider, it would make it much easier

Atomizer_Zero
Posts: 10
Joined: Thu Feb 20, 2020 5:10 am
languages_spoken: english
ODROIDs: odroid go advance
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Buttons via evtest

Unread post by Atomizer_Zero » Thu Feb 20, 2020 5:12 am

The RetroArena image mutes the speaker output when headphones are plugged in. Sound is nice and loud through the jack too.

PaulF8080
Posts: 15
Joined: Fri Feb 14, 2020 9:40 am
languages_spoken: english
ODROIDs: go, go advance, xu4
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Buttons via evtest

Unread post by PaulF8080 » Thu Feb 20, 2020 9:18 am

OOPs Missed the part about the phone jack event.

I am looking doing the Rockbox MP3 player SDL port. I already did it on the Raspberry Pi. I'm hoping the Advance uses the same ARM ABI so I can compile on the Pi.

I'm getting a new LCD and need a WiFi dongle so I'm off the air for now.

http://forums.rockbox.org/index.php/topic,53117.0.html

Post Reply

Return to “Platform development”

Who is online

Users browsing this forum: No registered users and 2 guests