MAN.9FRONT.ORG RTFM


     REFORM(1)                                               REFORM(1)

     NAME
          audio, pm, shortcuts - MNT Reform 2 support utilities

     SYNOPSIS
          reform/audio [ -1 ] [ -D ] [ -m mountpoint ] [ -s service ]

          reform/pm [ -D ] [ -m mountpoint ] [ -s service ]

          reform/shortcuts [ -l light_step ] [ -v vol_step ]

     DESCRIPTION
          These programs provide support for certain functions of MNT
          Reform 2 computing device.  Some of them also make control-
          ling file systems available under /dev.

        Audio
          audio initializes the DAC (Digital-to-Analog Converter) on
          the platform and provides a standard audio(3) interface to
          control volume and other parameters.  With -1 only the ini-
          tialization is performed and the program exits immediately.

          The following files are provided by the program:

          audioctl
               Shows the current status (on or off ) of the three
               "outputs" - master, hp and spk.  Each can be enabled,
               disabled or toggled, by writing a single line to the
               same file, consisting of the output name and the
               desired action - on , off or toggle , accordingly.

               DAC can be reinitialized by writing a single reset.

          volume
               Provides an interface for volume control (see
               audio(3)).  For ease of use, volume supports relative
               adjustments by prefixing a number with a sign.  master
               +1, for example, will increase the volume on master by
               1%, which is 0.5dB for this particular output. For hp
               and spk one percent is 1dB.

               Enhanced stereo separation can be enabled by writing
               3d, followed by desired percentage of the effect.

        Power and monitoring
          pm presents a file system consisting of the following files:

          battery
               Returns attached battery array statistics in the same
               manner as acpi(8).

     REFORM(1)                                               REFORM(1)

          cputemp
               Exposes the current temperature reading of the CPU.

          light
               Provides a way to control the backlight of the built-in
               LCD by writing lcd [-+]N, where N is expressed in per-
               centage, either as an absolute value (0-100) or rela-
               tive to the current brightness - by prefixing with a
               sign.  Reading light returns the current brightness.

          pmctl
               Reading pmctl gives the System Controller firmware ver-
               sion string, voltage (mV) of each cell and current(mA)
               of the battery array.

               Writing power off to pmctl will turn off all power
               rails, which is what fshalt(8) does after halting the
               file systems.

        Shortcuts
          shortcuts enables LCD brightness and audio volume adjustment
          via keyboard shortcuts.

          The program uses Rio's kbdtap to function:

               reform/shortcuts </dev/kbdtap >/dev/kbdtap

          Super+F1/F2 decreases/increases LCD brightness,
          Hyper+F7/F8/F9 skips to the previous track, (un)pauses or
          skips to the next track in zuke(1), Hyper+F11/F12
          decreases/increases "master" volume, Hyper+F10 (un)mutes the
          audio.  Optionally, a single step amount can be set with -l
          for LCD light level (default is 5) and -v for volume
          (default is 3).  Values can be negative to essentially swap
          F1 with F2.

     SOURCE
          /sys/src/cmd/reform

     SEE ALSO
          audio(3)

     HISTORY
          MNT Reform 2 support first appeared in 9front (August,
          2022).

     BUGS
          Only 44100Hz (default) and 48000Hz sample rates are sup-
          ported with audio, recording is not implemented.

          Light was chosen as a shorter alternative to brightness.  In
          the future it might support controlling keyboard and

     REFORM(1)                                               REFORM(1)

          trackball light levels.

          Values displayed in the battery file are not precise, cell
          capacities are hardcoded in the System Controller firmware.