Skip to content

Make legacy librealsense compatible with recent kernel#3929

Merged
dorodnic merged 3 commits into
realsenseai:legacyfrom
doisyg:recent_kernel_compatibility
Jun 23, 2019
Merged

Make legacy librealsense compatible with recent kernel#3929
dorodnic merged 3 commits into
realsenseai:legacyfrom
doisyg:recent_kernel_compatibility

Conversation

@doisyg

@doisyg doisyg commented May 7, 2019

Copy link
Copy Markdown

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

@vmatare

vmatare commented May 7, 2019

Copy link
Copy Markdown

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
Copy Markdown

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

doisyg commented May 16, 2019

Copy link
Copy Markdown
Author

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

doisyg commented Jun 3, 2019

Copy link
Copy Markdown
Author

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

svenevs commented Jun 6, 2019

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

doisyg commented Jun 6, 2019

Copy link
Copy Markdown
Author

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

Good to know!

@doisyg

doisyg commented Jun 6, 2019

Copy link
Copy Markdown
Author

@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

svenevs commented Jun 6, 2019

Copy link
Copy Markdown
Contributor

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

@dorodnic

dorodnic commented Jun 6, 2019

Copy link
Copy Markdown
Contributor

@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

doisyg commented Jun 6, 2019

Copy link
Copy Markdown
Author

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

@dorodnic

dorodnic commented Jun 22, 2019

Copy link
Copy Markdown
Contributor

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

doisyg commented Jun 23, 2019

Copy link
Copy Markdown
Author

@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
Copy Markdown
Contributor

Thank you!

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

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