emilyst / hid-nx-dkms

Alternative Linux kernel HID driver for Nintendo Switch controllers
GNU General Public License v2.0
40 stars 6 forks source link

Compare between hid_nx and hid_nintendo for 3rd party controller support #10

Closed joshuatam closed 1 year ago

joshuatam commented 1 year ago

Hi, I am not sure whether I should report here, as I would like to get better compatability on a 3rd party switch pro controller, so I am comparing hid_nx with kernel 6.1 hid_nintendo, especially on the issues I found on the right analog default calibration and the buttons mapping.

Right Analog Calibration

Buttons Mapping

Hope this help on making a more usable driver, I am willing to help on anything too :smile:

emilyst commented 1 year ago

Howdy, thanks for leaving this! There’s a lot of detail here. Let me see if I can summarize what you’re saying, and you can correct me if I’ve missed something.

Your description of right analog calibration seems to indicate that hid-nx is behaving properly. That seems good. Am I reading that right?

Your description of the button mappings changing is a bit puzzling. I’ve never used jstest-gtk before, and I don’t have a Linux install handy for use right this moment. (I should probably rectify that.)

I looked up what that reset button does, and it doesn’t appear to respond to any signals at all (other than those set up by default). So it’s just restoring the default configuration saved in the program? I think? In any case, this might be an issue with jstest-gtk rather than the driver. Will you let me know if you are able to reproduce this issue in another tool? (Especially a command-line tool would be ideal.)

I’ll probably close this issue if I don’t get a reproducible test case of something wrong, but I’ll give you some time to offer more information first.

joshuatam commented 1 year ago

@emilyst Yes, the right analog calibration reading is correct. In fact, when I am digging for the reason seems the 3rd party controller will return some values when calling nx_con_request_spi_flash_read, and seems the values are not reasonable so hid_nx ignore those values.

For the button mapping, I also think it might be an issue with jstest-gtk too, do you know any differences between hid_nx and hid_nintendo when dealing with SDL? (Or is it related to SDL?)

emilyst commented 1 year ago

@emilyst Yes, the right analog calibration reading is correct. In fact, when I am digging for the reason seems the 3rd party controller will return some values when calling nx_con_request_spi_flash_read, and seems the values are not reasonable so hid_nx ignore those values.

I patched in a fix for this from the mainline module, so it’s nice to hear it works.

For the button mapping, I also think it might be an issue with jstest-gtk too, do you know any differences between hid_nx and hid_nintendo when dealing with SDL? (Or is it related to SDL?)

This is the first time you’ve mentioned SDL, so I’m not sure what problem you’re experiencing with it. In any case, SDL runs entirely in user space, so that should not be relevant at all.

It sounds as if the issues you’re having are not with the driver module, so I’m going to close this issue unless you have a specific, reproducible problem relevant to the kernel module. If you do, feel free to comment and reopen.