A stateless multi-codec V4L2 Linux kernel driver for Amlogic Meson SoCs providing hardware-accelerated video decoding through standard Video4Linux2 APIs.
- Stateless V4L2 Interface: Standard Linux video codec API
- Multi-Codec Support: MPEG1/2, H.264, VP9, HEVC (phased implementation)
- Hardware Acceleration: Direct hardware video decoding units
- Memory-to-Memory Framework: V4L2 M2M framework integration
- Modern Kernel APIs: Uses latest Linux kernel development practices
- Amlogic Meson SoCs with video decoding units
- Tested on: [Hardware testing status to be updated]
drivers/media/platform/amlogic/meson-vdec/ # Main driver implementation
├── meson-vdec-core.c # Core V4L2 M2M framework integration
├── meson-vdec-core.h # Core data structures and interfaces
├── meson-vdec-firmware.c # Firmware management
├── meson-vdec-firmware.h # Firmware interface definitions
├── meson-vdec-regs.h # Hardware register definitions
├── Kconfig # Kernel configuration options
└── Makefile # Build configuration
Documentation/devicetree/bindings/media/ # Device tree bindings
└── amlogic,meson-vdec.yaml # DT schema definition
# Copy driver to kernel source tree
cp -r drivers/ /path/to/linux/
cp Documentation/devicetree/bindings/media/amlogic,meson-vdec.yaml \
/path/to/linux/Documentation/devicetree/bindings/media/
# Configure kernel
make menuconfig
# Enable: Device Drivers -> Multimedia support -> Media drivers ->
# Platform devices -> Amlogic Meson Video Decoder
# Build
make modules# Build against running kernel
make -C /lib/modules/$(uname -r)/build M=$(pwd)/drivers/media/platform/amlogic/meson-vdec modules
# Or build against specific kernel source
make -C /path/to/kernel/source M=$(pwd)/drivers/media/platform/amlogic/meson-vdec modules# Load module
sudo insmod drivers/media/platform/amlogic/meson-vdec/meson-vdec.ko
# Verify device creation
ls -la /dev/video*# Install v4l-utils
sudo apt install v4l-utils
# Run compliance tests
v4l2-compliance -d /dev/video0# Test H.264 decoding
ffmpeg -f v4l2m2m -i input.h264 -f rawvideo output.yuv
# List available formats
ffmpeg -f v4l2m2m -list_formats all -i /dev/video0- V4L2 M2M framework integration
- Hardware abstraction layer
- Firmware management system
- Memory management (Canvas, DMA)
- Device tree bindings
- MPEG1/2 stateless implementation
- V4L2 stateless controls integration
- Hardware decode pipeline
- Buffer management
- H.264 stateless implementation
- DPB (Decoded Picture Buffer) management
- Reference frame handling
- VP9 codec implementation
- HEVC codec implementation
This driver follows Linux kernel coding standards and modern kernel development practices:
- Code Style: Linux kernel coding style (checkpatch.pl clean)
- Resource Management: Uses cleanup.h and devm_ patterns
- Documentation: Kernel-doc format for all public APIs
- Testing: V4L2 compliance and application compatibility
This driver is licensed under the GPL v2, consistent with the Linux kernel.