# OpenLogi UVC Hardware Controls: Complete List and Usage Guide

> Explore OpenLogi's UVC hardware controls. Discover a comprehensive guide to 11 core controls and auto-mode toggles like Zoom, Focus, Exposure, and WhiteBalance for your camera.

- Repository: [Xuan Zhang/OpenLogi](https://github.com/AprilNEA/OpenLogi)
- Tags: how-to-guide
- Published: 2026-09-12

---

**OpenLogi exposes 11 core UVC hardware controls—including Zoom, Focus, Exposure, Brightness, Contrast, Saturation, Sharpness, WhiteBalance, Tint, PowerLineFrequency, and LowLightCompensation—plus auto-mode toggles for Focus, Exposure, and WhiteBalance through the `CameraControl` and `AutoToggle` enums.**

OpenLogi treats Logitech webcams as standard **UVC (USB Video Class)** devices, exposing granular hardware controls through a Rust-based camera abstraction layer. The complete set of adjustable parameters is defined in the `CameraControl` enum within the `openlogi-camera` crate, enabling programmatic access to lens, exposure, and image processing settings across macOS, Windows, and Linux platforms.

## Complete List of UVC Hardware Controls

All adjustable camera functions are described in the **`CameraControl`** enum inside [`crates/openlogi-camera/src/controls.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/crates/openlogi-camera/src/controls.rs). Each variant corresponds to a UVC Processing-Unit selector that the platform-specific backend translates into device commands.

### Lens and Exposure Controls

The UI prioritizes lens-related hardware controls first, mapping directly to optical and sensor timing parameters:

- **Zoom** — Digital zoom factor adjustment
- **Focus** — Manual lens focus distance control
- **Exposure** — Exposure time (shutter speed) settings
- **PowerLineFrequency** — 50 Hz or 60 Hz flicker-avoidance setting for artificial lighting environments
- **LowLightCompensation** — Automatic gain boost for low-light scenes

### Image Processing Controls

Following lens controls, OpenLogi exposes color and sharpness adjustments:

- **Brightness** — Overall image luminance level
- **Contrast** — Difference between light and dark areas
- **Saturation** — Color intensity and vividness
- **Sharpness** — Edge definition and detail clarity
- **WhiteBalance** — Color temperature in Kelvin
- **Tint** — White balance tint adjustment (magenta-green shift)

### Auto-Mode Toggles

For supported cameras, OpenLogi provides automatic control toggles modeled by the **`AutoToggle`** enum (also defined in [`crates/openlogi-camera/src/controls.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/crates/openlogi-camera/src/controls.rs)):

- **Focus** — Enable or disable auto-focus
- **Exposure** — Toggle auto-exposure mode
- **WhiteBalance** — Enable auto-white-balance

## Platform-Specific UVC Implementation

OpenLogi maps abstract `CameraControl` variants to platform-native UVC implementations through dedicated backend modules:

- **[`crates/openlogi-camera/src/uvc.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/crates/openlogi-camera/src/uvc.rs)** — macOS backend handling UVC Processing-Unit selectors
- **[`crates/openlogi-camera/src/uvc_windows.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/crates/openlogi-camera/src/uvc_windows.rs)** — Windows backend using DirectShow to read/write controls
- **[`crates/openlogi-camera/src/uvc_linux.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/crates/openlogi-camera/src/uvc_linux.rs)** — Linux backend implementing V4L2 control interfaces

Each backend performs a single device-open operation to read current control values, translating the platform-agnostic `CameraControl` enum into OS-specific UVC commands.

## Accessing UVC Controls via CLI

The `openlogi` command-line interface provides direct access to UVC hardware controls without requiring Rust development:

```bash

# List all available UVC controls for the first Logitech webcam

openlogi camera list

# Read the current brightness value

openlogi camera get brightness

# Set the exposure to a specific value (e.g., -5)

openlogi camera set exposure -5

```

## Programmatic Control with the Rust API

For integration into Rust applications, the `openlogi-camera` crate exposes hardware controls through the `Camera` struct and `CameraControl` enum defined in [`crates/openlogi-camera/src/lib.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/crates/openlogi-camera/src/lib.rs):

```rust
use openlogi_camera::{Camera, CameraControl};

fn demo() -> openlogi_camera::Result<()> {
    // Enumerate available Logitech UVC cameras
    let cams = openlogi_camera::enumerate_cameras();
    let cam = cams.first().expect("no Logitech webcam found");
    
    // Read the current brightness value
    let brightness = cam.get(CameraControl::Brightness)?;
    println!("Current brightness: {}", brightness);
    
    // Set brightness to a new value (typical range 0-255)
    cam.set(CameraControl::Brightness, 128)?;
    Ok(())
}

```

## Summary

- OpenLogi exposes **11 UVC hardware controls** through the `CameraControl` enum in [`crates/openlogi-camera/src/controls.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/crates/openlogi-camera/src/controls.rs)
- Controls are categorized into lens-related (Zoom, Focus, Exposure) and image-processing (Brightness, Contrast, Saturation, Sharpness, WhiteBalance, Tint) settings
- **Auto-mode toggles** for Focus, Exposure, and WhiteBalance are available via the `AutoToggle` enum when supported by hardware
- Platform-specific backends in [`uvc.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/uvc.rs) (macOS), [`uvc_windows.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/uvc_windows.rs) (Windows), and [`uvc_linux.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/uvc_linux.rs) (Linux) handle the low-level UVC protocol translation
- Both CLI and Rust API support reading and writing control values in a single device operation

## Frequently Asked Questions

### What UVC hardware controls does OpenLogi support?

OpenLogi supports 11 core UVC controls defined in the `CameraControl` enum: Zoom, Focus, Exposure, PowerLineFrequency, LowLightCompensation, Brightness, Contrast, Saturation, Sharpness, WhiteBalance, and Tint. Additionally, the `AutoToggle` enum provides automatic mode switching for Focus, Exposure, and WhiteBalance on compatible Logitech webcams.

### How does OpenLogi handle UVC controls on different operating systems?

OpenLogi implements platform-specific backends that map abstract control enums to native UVC protocols. The macOS backend resides in [`uvc.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/uvc.rs), the Windows implementation uses DirectShow in [`uvc_windows.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/uvc_windows.rs), and the Linux backend leverages V4L2 through [`uvc_linux.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/uvc_linux.rs). All backends expose identical control semantics while handling OS-specific UVC Processing-Unit selectors internally.

### Can I automate UVC camera adjustments with OpenLogi?

Yes. OpenLogi supports automation through both the command-line interface (`openlogi camera set <control> <value>`) and the Rust API (`cam.set(CameraControl::Brightness, 128)`). Each control read or write operation occurs during a single device-open cycle, making it suitable for real-time adjustment scripts and applications.

### Where are the UVC control definitions located in the source code?

The canonical definitions for all UVC hardware controls are located in [`crates/openlogi-camera/src/controls.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/crates/openlogi-camera/src/controls.rs), which contains both the `CameraControl` enum (manual adjustments) and the `AutoToggle` enum (automatic modes). The public API surface for camera enumeration and control access is exported from [`crates/openlogi-camera/src/lib.rs`](https://github.com/AprilNEA/OpenLogi/blob/main/crates/openlogi-camera/src/lib.rs).