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