Skip to content

config, main, data: key camera profiles on sysfs sensor name ([sensor:imx958-uw]) - #14

Open
astaff wants to merge 1 commit into
aurora-silicon:mainfrom
astaff:j616c-board-profile
Open

astaff wants to merge 1 commit into
aurora-silicon:mainfrom
astaff:j616c-board-profile

Conversation

@astaff

@astaff astaff commented Nov 18, 2026 •

Copy link
Copy Markdown

Pair with aurora-silicon/linux#2216 (apple-isp device/sensor sysfs attribute) to select camera low-light thresholds and framing capabilities by sensor module rather than per-board lists:

  • Replace [apple,j616s] in data/boards.conf with [sensor:imx958-uw], covering J614s, J616s, J614c, J616c, and other 12 MP Center Stage IMX958 ultra-wide machines from a single section while keeping [<compatible>] (such as [apple,j700]) as fallback when device/sensor is absent or has no sensor-specific section.
  • Check /sys/class/video4linux/<dev>/device/sensor at startup, on PipeWire V4L2 node discovery, and when input streaming begins (so deferred_start ISPs that return -ENODATA until apple_isp_start_camera() runs upgrade cleanly to [sensor:...] on first stream).
  • Add unit tests in tests/test_config.c covering [sensor:imx958-uw] precedence, user denoise.conf overrides, driver symlink filtering, and deferred sensor population.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for bringing the J616c up and for checking the stream live on it.

One thing about where the values live. data/boards.conf keys the denoise thresholds by the machine compatible, but the numbers describe the sensor: the new [apple,j616c] block repeats the [apple,j616s] values for the same IMX958 ultra-wide module, as its own comment says. Each new Mac with that module would need another copy, and a Mac nobody has added gets no tuning at all even though its sensor is known.

We would rather key these profiles by the sensor module the camera driver reports (the ISP's sensor identity), so every Mac with an IMX958 picks up the same block and only a genuinely different module needs a new entry. We'll look at exposing that key from the daemon side; if you'd like to take it on instead, a section name like [sensor:imx958-uw] with a lookup from the ISP's reported sensor would cover the J614c/J616c/J614s/J616s at once. Happy to run it on our M4 Pro and A18 Pro.

Replace per-board [apple,j616s] / [apple,j616c] entries in boards.conf
with [sensor:imx958-uw], covering J614s, J616s, J614c, J616c, and other
12 MP Center Stage IMX958 ultra-wide machines from a single section.

Read /sys/class/video4linux/<dev>/device/sensor at startup, on V4L2 node
discovery, and once streaming begins (handling deferred-start ISPs that
return -ENODATA until the first stream), falling back to [<compatible>]
when the sensor attribute is absent or has no sensor-specific section.

Signed-off-by: Artyom Astafurov <artyom.astafurov@gmail.com>
@astaff
astaff force-pushed the j616c-board-profile branch from 84e9529 to e321770 Compare November 19, 2026 18:10
@astaff astaff changed the title data: add [apple,j616c] board profile for MacBook Pro 16" (M4 Max) config, main, data: key camera profiles on sysfs sensor name ([sensor:imx958-uw]) Nov 19, 2026
@astaff

astaff commented Nov 19, 2026

Copy link
Copy Markdown
Author

Makes complete sense — thank you! Paired this 1:1 with b4018aeb078d on aurora-silicon/linux#2216 (media: apple: isp: expose detected camera sensor name in sysfs, exposing /sys/class/video4linux/videoX/device/sensor from isp_setfiles[] and returning -ENODATA until camera_detected is set on deferred_start SoCs):

  1. Replaced [apple,j616s] and [apple,j616c] in data/boards.conf with a single [sensor:imx958-uw] section covering J614s/J616s/J614c/J616c together, keeping [<compatible>] ([apple,j700]) fallback when device/sensor is absent or has no matching [sensor:...] section.
  2. Updated config.c and main.c (e321770) to read /sys/class/video4linux/<dev>/device/sensor at startup, at PipeWire V4L2 source discovery, and when the input stream enters STREAMING (handling deferred_start hardware where sensor detection happens inside apple_isp_start_camera()).
  3. Added unit tests in tests/test_config.c covering [sensor:imx958-uw] precedence over board compatibles, user denoise.conf overrides, driver symlink filtering, and deferred -ENODATA -> "imx958-uw" upgrade.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thank you for taking this on, including the kernel side: one [sensor:imx958-uw] section with a compatible fallback is exactly what we had in mind. We'll run it on our M4 Pro once aurora-silicon/linux#2216 is in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants