-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add controls ov5640 #76144
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
Add controls ov5640 #76144
Conversation
drivers/video/ov5640.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe these features should be optional? maybe not every platform can afford to link in math?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw many drivers including math.h without constraints, can you please explain why it might be necessary?
18a90b2 to
bd3f125
Compare
|
@ngphibang can you resolve the CI errors? |
|
@ngphibang can you address the CI failures |
bd3f125 to
65eb6a8
Compare
|
Rebase because the PR #76393 is merged |
josuah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grateful for this addition! OV5640 is a complex sensor with a lot of features.
Just waiting the dependency PR to get validated before it: the comments below are informational.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding "DNM" to allow starting the review now and remove it once dependencies are met.
65eb6a8 to
0289426
Compare
|
@loicpoulain @josuah, Can I get your reviews on this PR so we can move it along |
loicpoulain
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ngphibang you should check out-of-bound values in set_ctrl... as nothing is preventing bad values.
josuah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed the rebase from @trunghieulenxp. Thank you for reminding us.
I also did not notice that controls could be done out of bounds.
This could be interesting to introduce in a generic way (i.e. in another PR) for all sensors, once the MIN/MAX can be communicated from the driver to the API.
|
@loicpoulain @josuah : Yes, the ctrl value should be checked. The bigger problem is all control values in the API is defined as (void *) which causes some difficulties for drivers and applications. I am working on defining control types for each CID, will try to find time to finalize and push the PR soon. |
|
@loicpoulain: you are right, I gave my +1 too early. That was counting on this modification to be made but I should be patient. |
Run clang format before making any changes. Signed-off-by: Phi Bang Nguyen <[email protected]>
Add some control IDs: - VIDEO_CID_CAMERA_HUE - VIDEO_CID_POWER_LINE_FREQUENCY - VIDEO_CID_PIXEL_RATE which is needed for changing frame rate Signed-off-by: Phi Bang Nguyen <[email protected]>
Color bar is one type of test patterns. Rename it to VIDEO_CID_CAMERA_TEST_PATTERN to be more generic. Signed-off-by: Phi Bang Nguyen <[email protected]>
Add some minor fixes and optimizations: - Fix coding style - Rename some variables - Use the array variable size directly instead of defining a macro Signed-off-by: Phi Bang Nguyen <[email protected]> Signed-off-by: Trung Hieu Le <[email protected]>
Add support for 4 test pattern modes: - Color bar - Color bar rolling - Square - Square rolling Signed-off-by: Phi Bang Nguyen <[email protected]>
Add some controls: - hue - saturation - brightness - contrast - gain - hflip - vflip - power line frequency filter - pixel rate (read-only) which is needed for changing frame rate Signed-off-by: Farah Fliss <[email protected]> Signed-off-by: Phi Bang Nguyen <[email protected]>
Add support for changing frame rate Signed-off-by: Trung Hieu Le <[email protected]> Signed-off-by: Phi Bang Nguyen <[email protected]>
0289426 to
721ab6b
Compare
josuah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Hi @loicpoulain , could you revisit this ? |
This PR adds to the ov5640 camera driver