Fix camera, AW9120 back LED strip, full-height dmenu, and preinstall Bantam & gitconfig
- Camera (geminux-camera):
- Auto-configure Media Controller subdevs (hi556 + 1a040000.seninf at 1296x972
SRGGB10_1X10 -> /dev/video0 MBRA), unpack 10-bit packed MTISP Bayer frames,
and run pedestal subtraction, bilinear demosaic, Gray-World AWB, gamma 2.2
LUT, and closed-loop V4L2 AE/AGC with 90-degree rotation and --oneshot JPEG
capture.
- AW9120 cover LED daemon (geminux-leds):
- Drive the back cover multicolor RGB strip (rgb:indicator-1..5, plus
rgb:indicator-6 via led/off) using sysfs multi_intensity + brightness
instead of matching monochrome red/blue names on the inside keyboard
indicator-7 Caps Lock LEDs, and filter netlink uevents to
SUBSYSTEM=power_supply.
- Launcher & dmenu:
- Make dmenu span the full screen height in vertical mode and auto-fill
available item rows in geminux-launcher.
- Preinstalled packages & skel config:
- Package and preinstall Bantam (geminux-bantam @geminux APK) with readline.
- Preinstall sanitized default .gitconfig in /etc/skel (and /root) without
user identity fields.
This commit is contained in:
1 parent
8843558f3b
commit
2706b9a901
36 files changed
+6621
-153
No files matched your search
@@ -35,6 +35,8 @@ C_TEST = r"""
|
||||
#include "geminux-bt-list.h"
|
||||
#include "geminux-audio-parse.h"
|
||||
#include "geminux-tz-valid.h"
|
||||
#include "geminux-cam-bayer.h"
|
||||
#include "geminux-leds-core.h"
|
||||
|
||||
static int count_decision(const geminux_gesture_action_t *a, int mode) {
|
||||
int c = 0;
|
||||
@@ -321,6 +323,69 @@ int main(void) {
|
||||
unlink(okp);
|
||||
unlink(badp);
|
||||
rmdir(tzdir);
|
||||
|
||||
/* MTISP 10-bit packed Bayer unpack + bilinear demosaic (0 and 90 deg) */
|
||||
const uint8_t packed4[5] = {0x40, 0x00, 0x01, 0x04, 0x10};
|
||||
uint16_t unpacked4[4] = {0};
|
||||
geminux_mtisp_unpack_row10(packed4, unpacked4, 4);
|
||||
for (int i = 0; i < 4; i++) assert(unpacked4[i] == 64);
|
||||
|
||||
uint8_t raw8x8[8 * 10];
|
||||
memset(raw8x8, 0, sizeof(raw8x8));
|
||||
for (int y = 0; y < 8; y++) {
|
||||
/* Encode uniform value 512 (pedestal-subtracted 448) across 8 pixels (2 blocks) */
|
||||
for (int blk = 0; blk < 2; blk++) {
|
||||
uint8_t *p = raw8x8 + y * 10 + blk * 5;
|
||||
p[0] = 0x00; p[1] = 0x02; p[2] = 0x08; p[3] = 0x20; p[4] = 0x80;
|
||||
}
|
||||
}
|
||||
geminux_bayer10_isp_t cam_isp;
|
||||
memset(&cam_isp, 0, sizeof(cam_isp));
|
||||
uint16_t raw16[8 * 8];
|
||||
uint8_t rgb[8 * 8 * 3];
|
||||
uint32_t argb[8 * 8];
|
||||
int lin_avg = 0;
|
||||
geminux_bayer10_to_buffers(&cam_isp, raw8x8, 10, 8, 8, true, 0, false, raw16, rgb, argb, &lin_avg);
|
||||
assert(lin_avg > 350);
|
||||
assert(rgb[0] > 150 && rgb[1] > 150 && rgb[2] > 150);
|
||||
geminux_bayer10_to_buffers(&cam_isp, raw8x8, 10, 8, 8, true, 90, false, raw16, rgb, argb, &lin_avg);
|
||||
assert((argb[0] >> 24) == 0xff && rgb[(8 * 8 - 1) * 3 + 1] > 150);
|
||||
|
||||
/* AW9120 multicolor back strip selection, formatting, and power_supply uevent filter */
|
||||
assert(geminux_led_is_back_strip("rgb:indicator-1"));
|
||||
assert(geminux_led_is_back_strip("rgb:indicator-2"));
|
||||
assert(geminux_led_is_back_strip("rgb:indicator-3"));
|
||||
assert(geminux_led_is_back_strip("rgb:indicator-4"));
|
||||
assert(geminux_led_is_back_strip("rgb:indicator-5"));
|
||||
assert(!geminux_led_is_back_strip("rgb:indicator-6"));
|
||||
assert(!geminux_led_is_back_strip("red:indicator-7"));
|
||||
assert(!geminux_led_is_back_strip("blue:indicator-7"));
|
||||
assert(!geminux_led_is_back_strip("input1::capslock"));
|
||||
assert(!geminux_led_is_back_strip(NULL));
|
||||
|
||||
assert(geminux_led_is_cover_rgb("rgb:indicator-6"));
|
||||
assert(!geminux_led_is_cover_rgb("rgb:indicator-7"));
|
||||
assert(!geminux_led_is_cover_rgb("rgb:indicator-0"));
|
||||
assert(!geminux_led_is_cover_rgb("red:indicator-7"));
|
||||
assert(!geminux_led_is_cover_rgb("blue:indicator-7"));
|
||||
|
||||
char ibuf[32];
|
||||
int lbri = -1;
|
||||
assert(geminux_led_format_mc("red green blue\n", 32, 16, 0, ibuf, sizeof(ibuf), &lbri) == 0);
|
||||
assert(strcmp(ibuf, "32 16 0\n") == 0 && lbri == 255);
|
||||
assert(geminux_led_format_mc("blue green red\n", 32, 16, 5, ibuf, sizeof(ibuf), &lbri) == 0);
|
||||
assert(strcmp(ibuf, "5 16 32\n") == 0 && lbri == 255);
|
||||
assert(geminux_led_format_mc("red green blue\n", 0, 0, 0, ibuf, sizeof(ibuf), &lbri) == 0);
|
||||
assert(strcmp(ibuf, "0 0 0\n") == 0 && lbri == 0);
|
||||
assert(geminux_led_format_mc(NULL, -10, 300, 128, ibuf, sizeof(ibuf), &lbri) == 0);
|
||||
assert(strcmp(ibuf, "0 255 128\n") == 0 && lbri == 255);
|
||||
|
||||
const char uev_ps[] = "change@/devices/platform/charger\0SUBSYSTEM=power_supply\0ACTION=change\0";
|
||||
const char uev_in[] = "change@/devices/platform/input\0SUBSYSTEM=input\0ACTION=change\0";
|
||||
const char uev_pfx[] = "change@/devices/platform/charger\0SUBSYSTEM=power_supply2\0";
|
||||
assert(geminux_uevent_is_power_supply(uev_ps, sizeof(uev_ps)));
|
||||
assert(!geminux_uevent_is_power_supply(uev_in, sizeof(uev_in)));
|
||||
assert(!geminux_uevent_is_power_supply(uev_pfx, sizeof(uev_pfx)));
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user