Skip to content
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

Make legacy librealsense compatible with recent kernel #3929

Merged
merged 3 commits into from
Jun 23, 2019

Conversation

doisyg
Copy link

@doisyg doisyg commented May 7, 2019

This should make it work with 4.16+ kernel
Tested with a R200, not sure about the behavior with other cams

@vmatare
Copy link

vmatare commented May 7, 2019

This seems much nicer than what I did in #3749. That was basically just a desperate hack because we needed it to work ASAP. I'd much rather merge this than #3749.

@marcmateumateus
Copy link

Hi,
I have been playing with the modified code, it works fine with R200 and SR300 but it does not work with the ZR300 camera... I have made some modifications to uvc-v4l2.cpp in order for this camera to work.
Modifications:
To add support for ZR300 the same condition "if(sub->is_metastream)" has to be added after the line 781, otherwise it uses one of the metastreams and throws the following error: VIDIOC_S_FMT: 22, and after the line 822 as otherwise it will not add correctly the Fish_eye camera.
Thanks!

@doisyg
Copy link
Author

doisyg commented May 16, 2019

Hi,
I have been playing with the modified code, it works fine with R200 and SR300 but it does not work with the ZR300 camera... I have made some modifications to uvc-v4l2.cpp in order for this camera to work.
Modifications:
To add support for ZR300 the same condition "if(sub->is_metastream)" has to be added after the line 781, otherwise it uses one of the metastreams and throws the following error: VIDIOC_S_FMT: 22, and after the line 822 as otherwise it will not add correctly the Fish_eye camera.
Thanks!

Good to know, please PR

@doisyg
Copy link
Author

doisyg commented Jun 3, 2019

I pushed a small changes which makes multiple R200 works on my side; and also did (I think) the modification that @marcmateumateus suggested for the ZR300 (but without testing it)

@svenevs
Copy link
Contributor

svenevs commented Jun 6, 2019

Add label F200 because it definitely worked for me! I didn't need to make any changes on this branch to compile / use it on linux, kernel 4.18.16 ❤️ Thank you very much for figuring this stuff out @doisyg!

@marcmateumateus
Copy link

Hi, I can confirm that it works with ZR300, sorry for not PRing, i'm kind of new to GitHub and i do not know how...
Thanks @doisyg for the changes.

Add label ZR300 and SR300 as i tested both of them.

@doisyg
Copy link
Author

doisyg commented Jun 6, 2019

Add label ZR300 and SR300 as i tested both of them.

Good to know!

@doisyg
Copy link
Author

doisyg commented Jun 6, 2019

@dorodnic What do you think about merging / realeasing a new version of the legacy driver? Even better releasing a new deb / ros package for librealsense

@svenevs
Copy link
Contributor

svenevs commented Jun 6, 2019

It would probably make sense to remove the #include <iostream> and std::cout now?

@dorodnic
Copy link
Contributor

dorodnic commented Jun 6, 2019

@doisyg - I’m for it. Got some r200s to test home with but didn’t have time yet.
Not sure regarding debians, but will take a look
(We can update the rosdeb branch, but from there I’m not sure what was the flow and if it is still working)

Sent with GitHawk

@doisyg
Copy link
Author

doisyg commented Jun 6, 2019

I am sure @SteveMacenski will be happy to see this merged and released too.

@dorodnic
Copy link
Contributor

dorodnic commented Jun 22, 2019

Tested on 5.0.0.17 with R200, LR200 and the SR300, all working perfectly fine with the patch.
@doisyg please consider removing cout since its quite intrusive for any user app.
Also, I still need to check the ZR300 issue...

@doisyg
Copy link
Author

doisyg commented Jun 23, 2019

@doisyg please consider removing cout since its quite intrusive for any user app.

Done

Also, I still need to check the ZR300 issue...

I think @marcmateumateus confirmed that the issue is now solved:

Hi, I can confirm that it works with ZR300

@dorodnic
Copy link
Contributor

Thank you!

@dorodnic dorodnic merged commit 285cff8 into IntelRealSense:legacy Jun 23, 2019
achirkin pushed a commit to achirkin/librealsense that referenced this pull request Nov 26, 2020
…atibility

Make legacy librealsense compatible with recent kernel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants