sensor: label vendor by part number, not by which probe matched - #181
Open
widgetii wants to merge 1 commit into
Open
sensor: label vendor by part number, not by which probe matched#181widgetii wants to merge 1 commit into
widgetii wants to merge 1 commit into
Conversation
detect_superpix_sensor() does not probe a vendor, it probes a register
family: 0xFD-paged, 8-bit registers, id at 0x02/0x03. The WillSemi group
(OmniVision + SuperPix since 2018-19) ships that same design under both SP
and OV/OS part numbers, so the probe matches parts from two brands — but
get_sensor_id_i2c() stamped every hit "SuperPix" because the label was
attached to the probe rather than to the id it matched.
Five of the eight ids this function recognises are OmniVision part numbers,
so ipctool emitted self-contradictory output:
vendor: SuperPix
model: OS04B10
That YAML is what `ipctool upload` ships to the OpenIPC cloud, so each
affected camera contributed a wrong vendor/model pairing to the collected
hardware data.
Set the vendor per matched id instead. The rule: the brand that owns the
part number we print — SP numbers are SuperPix, OV/OS numbers are
OmniVision — which is the only assignment that keeps the two fields
consistent with each other.
This also un-comments, legitimately, the override the OS04D10 case already
wanted ("Need to overwrite vendor somehow or move this to OV detect
function") — with the vendor set inside the probe there is now somewhere to
put it that the caller does not clobber.
Model strings are deliberately unchanged; see #180 for the separate question
of whether 0x2735 should print OV2735 or SP2305. Nothing consumes the sensor
vendor field programmatically (getsensoridentity() and getsensorshort()
return the model alone, `ipcinfo -v` is the chip vendor), so this is
output-only and cannot affect firmware sensor-loading scripts.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
widgetii
marked this pull request as ready for review
July 31, 2026 10:47
PR Summary by QodoFix sensor vendor labeling to follow matched part number (SP vs OV/OS)
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTo customize comments, go to the Qodo configuration screen, or learn more in the docs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
detect_superpix_sensor()doesn't probe a vendor — it probes a register family:0xFD-paged 8-bit registers with the id at0x02/0x03. Since the 2018-19 WillSemi acquisitions, OmniVision and SuperPix are the same group and ship that design under both SP and OV/OS part numbers, so this one probe matches parts from two brands.get_sensor_id_i2c()nevertheless stamped every hitSuperPix, because the label was attached to the probe rather than to the id it matched. Five of the eight ids the function recognises are OmniVision part numbers:0x140a0x27350x43080x53020x53030x56020x5304440xfa/0xfbpathso ipctool emitted self-contradictory output:
That YAML is what
ipctool uploadships to the OpenIPC cloud, so every affected camera contributed a wrong vendor/model pairing to the collected hardware data.The
OS04D10case already knew about this — it carried// Need to overwrite vendor somehow or move this to OV detect functionwith a commented-outstrcpy(ctx->vendor, "OmniVision"), which could not work while the caller overwrote the field afterwards.Fix
Set the vendor per matched id, inside the probe, and stop the caller from overriding it. The rule is the brand that owns the part number we print: SP numbers → SuperPix, OV/OS numbers → OmniVision. That's the only assignment which keeps the two emitted fields consistent with each other.
Scope / risk
0x2735should printOV2735orSP2305is a separate question — see fix SP2305 detection #180; the two are the same die and the id cannot distinguish them.getsensoridentity()returnsmodel_control,getsensorshort()returns the model alone, andipcinfo -vis the chip vendor. Firmware sensor-loading scripts (load_hisilicon,load_goke) switch onipcinfo --short-sensor, which this doesn't touch.Testing
Compile-tested only — I don't have any of the affected sensors to hand. Anyone with an OS04B10 / OS02G10 / OS03B10 / OS04D10 / OV2735 board:
ipctoolshould now report the matching OmniVision vendor instead of SuperPix.