Repository navigation
Conversation
PR Summary by QodoAdd opt-in Ingenic T23 capture, Helix encoding, and ALSA support
AI Description
Merge Risk
|
Code Review by Qodo
1. Second downscaled stream is fed wrong-sized frames
|
e55bbad to
47259be
Compare
|
Updated the PR commits (
Verification:
|
Allow external build systems such as Buildroot to pass link-only libraries (e.g. -lasound) via LDFLAGS without passing them to compile-only steps. Signed-off-by: Difan Zhang <alex@osqdu.org>
Linking divinus with -rdynamic exports compat stubs into the dynamic symbol table. On uClibc targets, stubs like __assert, __ctype_b, __ctype_tolower, __pthread_register_cancel, __pthread_unregister_cancel, and __fgetc_unlocked shadow uClibc's own symbols in dynamically linked libraries. Signed-off-by: Difan Zhang <alex@osqdu.org>
Unwind partially initialized audio resources (audRing, HAL audio backend, shine MP3 encoder, and thread attributes) if audio init, shine setup, or pthread_create fails before HAL_ERROR returns. Signed-off-by: Difan Zhang <alex@osqdu.org>
…eanup Use integer tv_nsec math from CLOCK_REALTIME for RFC 3550 RTCP SR NTP wall-clock timestamps, initialize rtcp_tick/rtcp_tick_org for TCP-interleaved tracks in PLAY without binding UDP sockets or sending a premature SR, skip unsetup tracks in __rtcp_poll, and dup() client_fd for fp_tcp_read/fp_tcp_write with full error-path descriptor cleanup. Signed-off-by: Difan Zhang <alex@osqdu.org>
47259be to
d5e7045
Compare
|
Rebased onto
|
|
@wberube - can you take a look at this CL? |
|
Hi Mr. Zhang, Thank you for your patience. Because I currently develop and maintain Divinus on my own, review times can be long—and I take full responsibility for that. The project has reached a point where clear contributor guidelines are needed, and I haven't put those in place yet. When a pull request spans multiple subsystems—especially shared code across platforms—I have to be extra cautious with integration, as is the case with the T23 changes. Too often, changes to components like compatibility shims are written with a single platform in mind, which ends up introducing regressions and breaking support for other targets. As for the RTSP server, everyone has their own approach, and reconciling them quickly becomes a burden. Combined with the rise of AI-assisted submissions, reviewing and keeping the codebase cohesive has become increasingly difficult to manage. Going forward, I would strongly prefer PRs to be scoped to one component at a time—for instance, keeping a HAL platform integration separate from unrelated or unrequested changes to shared code. Ultimately, however, licensing is currently a hard blocker: Divinus is MIT-licensed, and your contribution is GPL-2.0, so I am unable to integrate it as-is. That said, if the licensing can be changed to MIT, I would be able to accept it. Thank you very much for your understanding, and kudos for the V4L2 integration, this is really something we needed! |
|
I totally understand the burdens (as I am basically on the same boat). The license can definitely be changed to MIT. Going forward, I will try to keep the CL's scoped for easier review and integration. Will update the codebase soon to reflect the license updates. |
Add an opt-in HAL for Ingenic T23 boards running mainline-style V4L2/Media Controller ISP capture, zero-copy Helix DMABUF video encoding (H.264/JPEG/MJPEG), and ALSA audio capture. Walk upstream Media Controller links from t23-isp-core0 until locating the CAMERA_SENSOR entity, assign independent MSCA scaler capture nodes (scaled0 / scaled0.1) so concurrent downscaled streams and snapshots match their Helix encoder dimensions, pass snapshot dimensions and quality with realloc buffer reuse, verify exact ALSA sample-rate negotiation, and recover Helix M2M queues on encode timeouts or DQBUF errors. Guard the backend under -DDIVINUS_T23 so standard builds (including inge-t31 in CI) compile minimal stubs with no ALSA or post-3.10 UAPI header dependencies. Signed-off-by: Difan Zhang <alex@osqdu.org>
d5e7045 to
6a51939
Compare
|
@wberube Updated |
Adds an opt-in Ingenic T23 backend (
-DDIVINUS_T23) for OpenIPC's vendor-SDK-free T23 Linux 6.12 CIP port (OpenIPC/linux#261).Unlike single-node V4L2 pipelines (#72), T23's in-kernel
tx-isppipeline is Media Controller-centric (V4L2_CAP_IO_MC), exposing a sensor →t23-isp-core0→ capture/MSCA/meta/OSD subdevice graph alongside theingenic-helixstateful V4L2 M2M encoder.What it adds
src/hal/inge/t23_hal.c): Discovers thetx-ispgraph viaMEDIA_IOC_G_TOPOLOGY(walking upstream data links fromt23-isp-core0to theMEDIA_ENT_F_CAM_SENSORsubdevice overtx-isp's pre-enabled links and querying active sensor dimensions viaVIDIOC_SUBDEV_G_FMT), allocates downscaled streams and snapshots across both"T23 scaled0"and"T23 scaled0.1"hardware MSCA scaler outputs so concurrent sub streams and snapshots match their encoder dimensions, honors requested snapshot width/height/quality withreallocbuffer reuse, and recovers Helix M2M queues on encode timeouts orDQBUFerrors.VIDIOC_EXPBUF(V4L2_MEMORY_DMABUF) directly intoingenic-helixM2M instances for H.264 (with CBR/VBR/QP controls, IDR insertion, and runtime reconfiguration) and JPEG/MJPEG snapshots.DIVINUS_ALSA_DEVICE, defaulthw:0,0) with exact sample-rate verification into Divinus's existing audio pipeline.#ifndeffallbacks for post-3.10 Media Controller v2 and V4L2 stateful encoder UAPI definitions, and skips the 32-bit-offsetcompat.cmmapwrapper whenDIVINUS_T23is enabled solibasounduses libcoff_tcleanly under OpenIPC's existingtoolchain.ingenic-t31musl toolchain.Impact on other platforms
None when
-DDIVINUS_T23is not set:t23_hal.ccompiles down to minimal stubs,hal_identify()on MIPS falls straight through tot31_system_identify(), and all existing CI targets (inge-t31included) build unchanged withoutalsa-lib.Commits
build: honor LDFLAGS when linking divinuscompat: avoid shadowing native uClibc symbols under -rdynamicmedia: unwind audio resources on audio startup failurertsp: fix RTCP SR NTP timestamp, TCP rtcp_tick init, and client_fd cleanup(overlaps with Sending RTCP sender reports at the set interval on interleaved tracks #99 on TCPrtcp_tick; happy to rebase once Sending RTCP sender reports at the set interval on interleaved tracks #99 lands)hal: inge: add opt-in T23 V4L2/MC + Helix DMABUF + ALSA HALTesting
./test.sh --allpasses (8/8), and non-T23 MIPS builds (without-DDIVINUS_T23) compile cleanly with the#elsestubs.-DDIVINUS_T23 -lasoundagainsttoolchain.ingenic-t31.tgz) and verified end-to-end inopenipc-qemu-bench(qemu-system-mipsel -M t23,sensor=gc2053) withOpenIPC/linux#261+t23-ipa:1920x1080NV12 capture -> DMABUF -> Helix M2M encoding./image.jpgHTTP snapshots (1920x1080JPEG)./stream=0) decoded cleanly withffmpeg -err_detect explode(0 errors) alongside ALSA audio capture (t23-audio).