Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 33 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,39 @@ talking. This differs from a simple loopback via PulseAudio as you won't have an

## Supported Headsets

| Device | sidetone | battery | notification sound | lights | inactive time | chatmix | voice prompts | rotate to mute | equalizer preset | equalizer | parametric equalizer | microphone mute led brightness | microphone volume | volume limiter | bluetooth when powered on | bluetooth call volume |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Audeze Maxwell | x | x | | | x | x | x | | x | | | | | x | | |
| Corsair Headset Device | x | x | x | x | | | | | | | | | | | | |
| HyperX Cloud Alpha Wireless | x | x | | | x | | x | | | | | | | | | |
| HyperX Cloud Flight Wireless | | x | | | | | | | | | | | | | | |
| HyperX Cloud 3 | x | | | | | | | | | | | | | | | |
| Logitech G430 | x | | | | | | | | | | | | | | | |
| Logitech G432/G433 | x | | | | | | | | | | | | | | | |
| Logitech G533 | x | x | | | x | | | | | | | | | | | |
| Logitech G535 | x | x | | | x | | | | | | | | | | | |
| Logitech G930 | x | x | | | | | | | | | | | | | | |
| Logitech G633/G635/G733/G933/G935 | x | x | | x | | | | | | | | | | | | |
| Logitech G PRO Series | x | x | | | x | | | | | | | | | | | |
| Logitech G PRO X 2 | x | | | | x | | | | | | | | | | | |
| Logitech Zone Wired/Zone 750 | x | | | | | | x | x | | | | | | | | |
| SteelSeries Arctis (1/7X/7P) Wireless | x | x | | | x | | | | | | | | | | | |
| SteelSeries Arctis (7/Pro) | x | x | | x | x | x | | | | | | | | | | |
| SteelSeries Arctis 9 | x | x | | | x | x | | | | | | | | | | |
| SteelSeries Arctis Pro Wireless | x | x | | | x | | | | | | | | | | | |
| ROCCAT Elo 7.1 Air | | | | x | x | | | | | | | | | | | |
| ROCCAT Elo 7.1 USB | | | | x | | | | | | | | | | | | |
| SteelSeries Arctis Nova 3 | x | | | | | | | | x | x | | x | x | | | |
| SteelSeries Arctis Nova (5/5X) | x | x | | | x | x | | | x | x | x | x | x | x | | |
| SteelSeries Arctis Nova 7 | x | x | | | x | x | | | x | x | | x | x | x | x | x |
| SteelSeries Arctis 7+ | x | x | | | x | x | | | x | x | | | | | | |
| SteelSeries Arctis Nova Pro Wireless | x | x | | x | x | | | | x | x | | | | | | |
| HeadsetControl Test device | x | x | x | x | x | x | x | x | x | x | | x | x | x | x | x |
| Device | Platform | sidetone | battery | notification sound | lights | inactive time | chatmix | voice prompts | rotate to mute | equalizer preset | equalizer | parametric equalizer | microphone mute led brightness | microphone volume | volume limiter | bluetooth when powered on | bluetooth call volume |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Audeze Maxwell | All | x | x | | | x | x | x | | x | | | | | x | | |
| Corsair Headset Device | All | x | x | x | x | | | | | | | | | | | | |
| HyperX Cloud Alpha Wireless | All | x | x | | | x | | x | | | | | | | | | |
| HyperX Cloud Flight Wireless | All | | x | | | | | | | | | | | | | | |
| HyperX Cloud 3 | All | x | | | | | | | | | | | | | | | |
| Logitech G430 | All | x | | | | | | | | | | | | | | | |
| Logitech G432/G433 | All | x | | | | | | | | | | | | | | | |
| Logitech G533 | All | x | x | | | x | | | | | | | | | | | |
| Logitech G535 | All | x | x | | | x | | | | | | | | | | | |
| Logitech G930 | All | x | x | | | | | | | | | | | | | | |
| Logitech G633/G635/G733/G933/G935 | All | x | x | | x | | | | | | | | | | | | |
| Logitech G PRO Series | All | x | x | | | x | | | | | | | | | | | |
| Logitech G PRO X 2 | All | x | | | | x | | | | | | | | | | | |
| Logitech Zone Wired/Zone 750 | All | x | | | | | | x | x | | | | | | | | |
| SteelSeries Arctis (1/7X/7P) Wireless | All | x | x | | | x | | | | | | | | | | | |
| SteelSeries Arctis (7/Pro) | All | x | x | | x | x | x | | | | | | | | | | |
| SteelSeries Arctis 9 | All | x | x | | | x | x | | | | | | | | | | |
| SteelSeries Arctis Pro Wireless | All | x | x | | | x | | | | | | | | | | | |
| ROCCAT Elo 7.1 Air | All | | | | x | x | | | | | | | | | | | |
| ROCCAT Elo 7.1 USB | All | | | | x | | | | | | | | | | | | |
| SteelSeries Arctis Nova 3 | All | x | | | | | | | | x | x | | x | x | | | |
| SteelSeries Arctis Nova 3P Wireless | L/M | x | x | | | x | | | | x | x | x | | x | | | |
| SteelSeries Arctis Nova (5/5X) | All | x | x | | | x | x | | | x | x | x | x | x | x | | |
| SteelSeries Arctis Nova 7 | All | x | x | | | x | x | | | x | x | | x | x | x | x | x |
| SteelSeries Arctis 7+ | All | x | x | | | x | x | | | x | x | | | | | | |
| SteelSeries Arctis Nova Pro Wireless | All | x | x | | x | x | | | | x | x | | | | | | |
| HeadsetControl Test device | All | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x |

**Platform Legend:**
- **All**: Linux, macOS, and Windows
- **L/M**: Linux and macOS only (Windows not supported due to HID implementation differences)

For non-supported headsets on Linux: There is a chance that you can set the sidetone via AlsaMixer

Expand Down
3 changes: 2 additions & 1 deletion src/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ const char* const equalizer_filter_type_str[NUM_EQ_FILTER_TYPES]
[EQ_FILTER_LOWPASS] = "lowpass",
[EQ_FILTER_PEAKING] = "peaking",
[EQ_FILTER_HIGHPASS] = "highpass",
[EQ_FILTER_HIGHSHELF] = "highshelf"
[EQ_FILTER_HIGHSHELF] = "highshelf",
[EQ_FILTER_NOTCH] = "notch"

};

Expand Down
41 changes: 27 additions & 14 deletions src/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
/// Convert given number to bitmask
#define B(X) (1 << X)

/// Platform support flags
#define PLATFORM_LINUX (1 << 0)
#define PLATFORM_MACOS (1 << 1)
#define PLATFORM_WINDOWS (1 << 2)
#define PLATFORM_ALL (PLATFORM_LINUX | PLATFORM_MACOS | PLATFORM_WINDOWS)

/// global read timeout in millisecounds
extern int hsc_device_timeout;

Expand Down Expand Up @@ -44,10 +50,8 @@ enum capabilities {
NUM_CAPABILITIES
};

enum capabilitytype {
CAPABILITYTYPE_ACTION,
CAPABILITYTYPE_INFO
};
enum capabilitytype { CAPABILITYTYPE_ACTION,
CAPABILITYTYPE_INFO };

/// Long name of every capability
extern const char* const capabilities_str[NUM_CAPABILITIES];
Expand All @@ -59,7 +63,8 @@ extern const char* const capabilities_str_enum[NUM_CAPABILITIES];
struct capability_detail {
// Usage page, only used when usageid is not 0; HID Protocol specific
uint16_t usagepage;
// Used instead of interface when not 0, and only used on Windows currently; HID Protocol specific
// Used instead of interface when not 0, and only used on Windows currently;
// HID Protocol specific
uint16_t usageid;
/// Interface ID - zero means first enumerated interface!
int interface;
Expand Down Expand Up @@ -139,7 +144,8 @@ typedef struct {
int value;
/// Status depending on the feature (not used by all)
int status2;
/// For error messages, "Charging", "Unavailable", etc. Should be free()d after use
/// For error messages, "Charging", "Unavailable", etc. Should be free()d
/// after use
char* message;
} FeatureResult;

Expand All @@ -166,6 +172,7 @@ typedef enum {
EQ_FILTER_PEAKING,
EQ_FILTER_HIGHPASS,
EQ_FILTER_HIGHSHELF,
EQ_FILTER_NOTCH,
NUM_EQ_FILTER_TYPES
} EqualizerFilterType;

Expand Down Expand Up @@ -207,6 +214,9 @@ struct device {
/// Name of device, used as information for the user
char device_name[64];

/// Bitmask of supported platforms (PLATFORM_LINUX | PLATFORM_MACOS | PLATFORM_WINDOWS)
uint8_t supported_platforms;

// Equalizer Infos
EqualizerInfo* equalizer;
EqualizerPresets* equalizer_presets;
Expand Down Expand Up @@ -358,7 +368,8 @@ struct device {
* specific to this hardware
* -1 HIDAPI error
*/
int (*send_equalizer)(hid_device* hid_device, struct equalizer_settings* settings);
int (*send_equalizer)(hid_device* hid_device,
struct equalizer_settings* settings);

/** @brief Function pointer for setting headset parametric equalizer
*
Expand All @@ -372,11 +383,12 @@ struct device {
* @returns > 0 on success
* HSC_OUT_OF_BOUNDS on equalizer settings size out of range
* specific to this hardware
* HSC_INVALID_ARG on equalizer filter type invalid/unsupported
* specific to this hardware
* -1 HIDAPI error
* HSC_INVALID_ARG on equalizer filter type
* invalid/unsupported specific to this hardware -1 HIDAPI
* error
*/
int (*send_parametric_equalizer)(hid_device* hid_device, struct parametric_equalizer_settings* settings);
int (*send_parametric_equalizer)(
hid_device* hid_device, struct parametric_equalizer_settings* settings);

/** @brief Function pointer for setting headset microphone mute LED brightness
*
Expand All @@ -391,7 +403,8 @@ struct device {
* specific to this hardware
* -1 HIDAPI error
*/
int (*send_microphone_mute_led_brightness)(hid_device* hid_device, uint8_t num);
int (*send_microphone_mute_led_brightness)(hid_device* hid_device,
uint8_t num);

/** @brief Function pointer for setting headset microphone volume
*
Expand Down Expand Up @@ -458,8 +471,8 @@ struct device {
/**
* @brief Node structure for a linked list of devices.
*
* This structure represents a node in a linked list where each node contains a pointer to a device
* and a pointer to the next node in the list.
* This structure represents a node in a linked list where each node contains a
* pointer to a device and a pointer to the next node in the list.
*/
typedef struct DeviceListNode {
struct device* element;
Expand Down
20 changes: 18 additions & 2 deletions src/device_registry.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "devices/steelseries_arctis_7_plus.h"
#include "devices/steelseries_arctis_9.h"
#include "devices/steelseries_arctis_nova_3.h"
#include "devices/steelseries_arctis_nova_3p_wireless.h"
#include "devices/steelseries_arctis_nova_5.h"
#include "devices/steelseries_arctis_nova_7.h"
#include "devices/steelseries_arctis_nova_pro_wireless.h"
Expand Down Expand Up @@ -68,6 +69,7 @@ void init_devices()
add_device(elo71USB_init);
// SteelSeries
add_device(arctis_nova_3_init);
add_device(arctis_nova_3p_wireless_init);
add_device(arctis_nova_5_init);
add_device(arctis_nova_7_init);
add_device(arctis_7_plus_init);
Expand All @@ -78,6 +80,21 @@ void init_devices()

void add_device(void (*init_func)(struct device**))
{
struct device* new_device = NULL;

// Initialize the new device
init_func(&new_device);

// Skip if device is NULL (platform not supported)
if (new_device == NULL) {
return;
}

// Set default platform support to all platforms if not specified
if (new_device->supported_platforms == 0) {
new_device->supported_platforms = PLATFORM_ALL;
}

// Reallocate memory to accommodate the new device
struct device** temp = realloc(devicelist, (num_devices + 1) * sizeof(struct device*));
if (temp == NULL) {
Expand All @@ -86,8 +103,7 @@ void add_device(void (*init_func)(struct device**))
}
devicelist = temp;

// Initialize the new device
init_func(&devicelist[num_devices]);
devicelist[num_devices] = new_device;
num_devices++;
}

Expand Down
2 changes: 2 additions & 0 deletions src/devices/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ set(SOURCE_FILES ${SOURCE_FILES}
${CMAKE_CURRENT_SOURCE_DIR}/steelseries_arctis_9.h
${CMAKE_CURRENT_SOURCE_DIR}/steelseries_arctis_nova_3.h
${CMAKE_CURRENT_SOURCE_DIR}/steelseries_arctis_nova_3.c
${CMAKE_CURRENT_SOURCE_DIR}/steelseries_arctis_nova_3p_wireless.h
${CMAKE_CURRENT_SOURCE_DIR}/steelseries_arctis_nova_3p_wireless.c
${CMAKE_CURRENT_SOURCE_DIR}/steelseries_arctis_nova_5.h
${CMAKE_CURRENT_SOURCE_DIR}/steelseries_arctis_nova_5.c
${CMAKE_CURRENT_SOURCE_DIR}/steelseries_arctis_nova_7.h
Expand Down
Loading