Skip to content

Feat: Add support for SteelSeries Arctis Nova 3P Wireless #417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ talking. This differs from a simple loopback via PulseAudio as you won't have an
| 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 3P Wireless | x | x | | | 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 | | | | | | |
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
32 changes: 18 additions & 14 deletions src/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,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 +57,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 +138,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 +166,7 @@ typedef enum {
EQ_FILTER_PEAKING,
EQ_FILTER_HIGHPASS,
EQ_FILTER_HIGHSHELF,
EQ_FILTER_NOTCH,
NUM_EQ_FILTER_TYPES
} EqualizerFilterType;

Expand Down Expand Up @@ -358,7 +359,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 +374,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 +394,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 +462,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
2 changes: 2 additions & 0 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 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