at 17.09-beta 1.8 kB view raw
1{ config, lib, pkgs, ... }: 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 "Magewell Pro Capture family kernel module"; 16 17 config = mkIf cfg.enable { 18 19 assertions = singleton { 20 assertion = versionAtLeast kernelPackages.kernel.version "3.2"; 21 message = "Magewell Pro Capture family module is not supported for kernels older than 3.2"; 22 }; 23 24 boot.kernelModules = [ "ProCapture" ]; 25 26 environment.systemPackages = [ kernelPackages.mwprocapture ]; 27 28 boot.extraModulePackages = [ kernelPackages.mwprocapture ]; 29 30 boot.extraModprobeConfig = '' 31 # Set the png picture to be displayed when no input signal is detected. 32 options ProCapture nosignal_file=${kernelPackages.mwprocapture}/res/NoSignal.png 33 34 # Set the png picture to be displayed when an unsupported input signal is detected. 35 options ProCapture unsupported_file=${kernelPackages.mwprocapture}/res/Unsupported.png 36 37 # Set the png picture to be displayed when an loking input signal is detected. 38 options ProCapture locking_file=${kernelPackages.mwprocapture}/res/Locking.png 39 40 # Message signaled interrupts switch 41 #options ProCapture disable_msi=0 42 43 # Set the debug level 44 #options ProCapture debug_level=0 45 46 # Force init switch eeprom 47 #options ProCapture init_switch_eeprom=0 48 49 # Min frame interval for VIDIOC_ENUM_FRAMEINTERVALS (default: 166666(100ns)) 50 #options ProCapture enum_frameinterval_min=166666 51 52 # VIDIOC_ENUM_FRAMESIZES type (1: DISCRETE; 2: STEPWISE; otherwise: CONTINUOUS ) 53 #options ProCapture enum_framesizes_type=0 54 55 # Parameters for internal usage 56 #options ProCapture internal_params="" 57 ''; 58 59 }; 60 61}