about summary refs log tree commit diff
path: root/nixos/modules/hardware/video
diff options
context:
space:
mode:
authorCray Elliott <MP2E@archlinux.us>2017-02-18 06:44:31 -0800
committerJoachim F <joachifm@users.noreply.github.com>2017-02-18 15:44:31 +0100
commit5e0b978eff60998d9b2ff7152e87e876a3296169 (patch)
treea92b893f148f4920c72a65256dd6aa6065ede76c /nixos/modules/hardware/video
parent78abfe951b0af77da3d7865e598fc1393d3a6b2f (diff)
downloadnixlib-5e0b978eff60998d9b2ff7152e87e876a3296169.tar
nixlib-5e0b978eff60998d9b2ff7152e87e876a3296169.tar.gz
nixlib-5e0b978eff60998d9b2ff7152e87e876a3296169.tar.bz2
nixlib-5e0b978eff60998d9b2ff7152e87e876a3296169.tar.lz
nixlib-5e0b978eff60998d9b2ff7152e87e876a3296169.tar.xz
nixlib-5e0b978eff60998d9b2ff7152e87e876a3296169.tar.zst
nixlib-5e0b978eff60998d9b2ff7152e87e876a3296169.zip
mwprocapture: init at 1.2.3269 (#22160)
Diffstat (limited to 'nixos/modules/hardware/video')
-rw-r--r--nixos/modules/hardware/video/capture/mwprocapture.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/nixos/modules/hardware/video/capture/mwprocapture.nix b/nixos/modules/hardware/video/capture/mwprocapture.nix
new file mode 100644
index 000000000000..aee15dcec6e5
--- /dev/null
+++ b/nixos/modules/hardware/video/capture/mwprocapture.nix
@@ -0,0 +1,61 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+  cfg = config.hardware.mwProCapture;
+
+  kernelPackages = config.boot.kernelPackages;
+
+in
+
+{
+
+  options.hardware.mwProCapture.enable = mkEnableOption "Magewell Pro Capture family kernel module";
+
+  config = mkIf cfg.enable {
+
+    assertions = singleton {
+      assertion = versionAtLeast kernelPackages.kernel.version "3.2";
+      message = "Magewell Pro Capture family module is not supported for kernels older than 3.2";
+    };
+
+    boot.kernelModules = [ "ProCapture" ];
+
+    environment.systemPackages = [ kernelPackages.mwprocapture ];
+
+    boot.extraModulePackages = [ kernelPackages.mwprocapture ];
+
+    boot.extraModprobeConfig = ''
+      # Set the png picture to be displayed when no input signal is detected.
+      options ProCapture nosignal_file=${kernelPackages.mwprocapture}/res/NoSignal.png
+
+      # Set the png picture to be displayed when an unsupported input signal is detected.
+      options ProCapture unsupported_file=${kernelPackages.mwprocapture}/res/Unsupported.png
+
+      # Set the png picture to be displayed when an loking input signal is detected.
+      options ProCapture locking_file=${kernelPackages.mwprocapture}/res/Locking.png
+
+      # Message signaled interrupts switch
+      #options ProCapture disable_msi=0
+
+      # Set the debug level
+      #options ProCapture debug_level=0
+
+      # Force init switch eeprom
+      #options ProCapture init_switch_eeprom=0
+
+      # Min frame interval for VIDIOC_ENUM_FRAMEINTERVALS (default: 166666(100ns))
+      #options ProCapture enum_frameinterval_min=166666
+
+      # VIDIOC_ENUM_FRAMESIZES type (1: DISCRETE; 2: STEPWISE; otherwise: CONTINUOUS )
+      #options ProCapture enum_framesizes_type=0
+
+      # Parameters for internal usage
+      #options ProCapture internal_params=""
+    '';
+
+  };
+
+}