# Don't touch this file otherwise your device may stop working.
# Use override.yaml to modify required settings.
# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.

override: !include [override.d, override.yaml]

logging: !include logging.yaml

kvmd:
    auth: !include auth.yaml

    info:
        fan:
            unix: /run/kvmd/fan.sock

    hid:
        type: otg
        mouse_alt:
            device: /dev/kvmd-hid-mouse-alt

    atx:
        type: gpio
        power_led_pin: 4
        hdd_led_pin: 5
        power_switch_pin: 23
        reset_switch_pin: 27

    msd:
        type: otg

    streamer:
        h264_bitrate:
            default: 5000
        cmd:
            - "/usr/bin/ustreamer"
            - "--device=/dev/kvmd-video"
            - "--persistent"
            - "--dv-timings"
            - "--format=uyvy"
            - "--encoder=omx"
            - "--workers=3"
            - "--quality={quality}"
            - "--desired-fps={desired_fps}"
            - "--drop-same-frames=30"
            - "--last-as-blank=0"
            - "--unix={unix}"
            - "--unix-rm"
            - "--unix-mode=0660"
            - "--exit-on-parent-death"
            - "--process-name-prefix={process_name_prefix}"
            - "--notify-parent"
            - "--no-log-colors"
            - "--sink=kvmd::ustreamer::jpeg"
            - "--sink-mode=0660"
            - "--h264-sink=kvmd::ustreamer::h264"
            - "--h264-sink-mode=0660"
            - "--h264-bitrate={h264_bitrate}"
            - "--h264-gop={h264_gop}"

    gpio:
        drivers:
            __v4_locator__:
                type: locator

        scheme:
            __v3_usb_breaker__:
                pin: 22
                mode: output
                initial: true
                pulse: false

            __v4_locator__:
                driver: __v4_locator__
                pin: 12
                mode: output
                pulse: false

            __v4_const1__:
                pin: 6
                mode: output
                initial: false
                switch: false
                pulse: false


vnc:
    memsink:
        jpeg:
            sink: "kvmd::ustreamer::jpeg"
        h264:
            sink: "kvmd::ustreamer::h264"


otg:
    remote_wakeup: true
