at 23.11-beta 1.6 kB view raw
1{ config, lib, ... }: 2 3with lib; 4 5let 6 7 cfg = config.hardware.mwProCapture; 8 9 kernelPackages = config.boot.kernelPackages; 10 11in 12 13{ 14 15 options.hardware.mwProCapture.enable = mkEnableOption (lib.mdDoc "Magewell Pro Capture family kernel module"); 16 17 config = mkIf cfg.enable { 18 19 boot.kernelModules = [ "ProCapture" ]; 20 21 environment.systemPackages = [ kernelPackages.mwprocapture ]; 22 23 boot.extraModulePackages = [ kernelPackages.mwprocapture ]; 24 25 boot.extraModprobeConfig = '' 26 # Set the png picture to be displayed when no input signal is detected. 27 options ProCapture nosignal_file=${kernelPackages.mwprocapture}/res/NoSignal.png 28 29 # Set the png picture to be displayed when an unsupported input signal is detected. 30 options ProCapture unsupported_file=${kernelPackages.mwprocapture}/res/Unsupported.png 31 32 # Set the png picture to be displayed when an loking input signal is detected. 33 options ProCapture locking_file=${kernelPackages.mwprocapture}/res/Locking.png 34 35 # Message signaled interrupts switch 36 #options ProCapture disable_msi=0 37 38 # Set the debug level 39 #options ProCapture debug_level=0 40 41 # Force init switch eeprom 42 #options ProCapture init_switch_eeprom=0 43 44 # Min frame interval for VIDIOC_ENUM_FRAMEINTERVALS (default: 166666(100ns)) 45 #options ProCapture enum_frameinterval_min=166666 46 47 # VIDIOC_ENUM_FRAMESIZES type (1: DISCRETE; 2: STEPWISE; otherwise: CONTINUOUS ) 48 #options ProCapture enum_framesizes_type=0 49 50 # Parameters for internal usage 51 #options ProCapture internal_params="" 52 ''; 53 54 }; 55 56}