Skip to content

Commit b10c0ed

Browse files
MonsterBagelsSapd
andauthored
Added full support for Audeze Maxwell 2 PS/PC version (#506)
* Added full support for Audeze Maxwell 2 PS/PC version * bug fixes and changes due to PR comments * additional edits and fixed inactive_time limit * wired up current eq setting and ainf level * Revert formatting noise on unrelated files and clean up Maxwell 2 docstring - Restored unrelated files to upstream master state (cli/output/output.cpp, lib/device.cpp, several Logitech/Sony/SteelSeries/HyperX device headers, hidpp_protocol.hpp, lib/headsetcontrol.cpp). - Reverted formatting churn in cli/main.cpp, lib/device.hpp, tests/test_library_api.cpp and tests/test_protocols.cpp while keeping the Maxwell 2 / noise filter additions. - Fixed misleading docstring in audeze_maxwell2.hpp ("21-packet initialization sequence" -> "15-packet initialization sequence followed by 6 status requests"). * Drop -N short flag for --noise-filter, long flag only Match the convention used by other recent capabilities (volume-limiter, bt-when-powered-on, bt-call-volume) which all ship as long-flag-only and use '\0' in CAPABILITIES_XLIST. * Add CAP_NOISE_FILTER support to HeadsetControl test device Per docs the test device implements every capability so the feature can be exercised without real hardware. Adds it to getCapabilities, wires up a setNoiseFilter stub matching the existing test patterns, and refreshes the README table to match --readme-helper output. --------- Co-authored-by: Denis Arnst <git@sapd.eu>
1 parent 07311fa commit b10c0ed

11 files changed

Lines changed: 484 additions & 39 deletions

README.md

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,41 @@ A cross-platform tool to control USB gaming headsets on **Linux**, **macOS**, an
1616

1717
## Supported Devices
1818

19-
| 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 |
20-
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
21-
| Logitech G522 LIGHTSPEED | All | x | x | | | x | | | | | | | x | | | | |
22-
| Logitech G533 | All | x | x | | | x | | | | | | | | | | | |
23-
| Logitech G535 | All | x | x | | | x | | | | | | | | | | | |
24-
| Logitech G633/G635/G733/G933/G935 | All | x | x | | x | | | | | | | | | | | | |
25-
| Logitech G431/G432/G433 | All | x | | | | | | | | | | | | | | | |
26-
| Logitech G930 | All | x | x | | | | | | | | | | | | | | |
27-
| Logitech G PRO X 2 LIGHTSPEED | All | x | x | | | x | | | | x | x | x | | | | | |
28-
| Logitech G PRO Series | All | x | x | | | x | | | | | | | | | | | |
29-
| Logitech Zone Wired/Zone 750 | All | x | | | | | | x | x | | | | | | | | |
30-
| Corsair Headset Device | All | x | x | x | x | | | | | | | | | | | | |
31-
| Corsair Wireless V2 Headset Device | All | x | x | | | | | | | | | | | | | | |
32-
| SteelSeries Arctis (1/7X/7P) Wireless | All | x | x | | | x | | | | | | | | | | | |
33-
| SteelSeries Arctis (7/Pro) | All | x | x | | x | x | x | | | | | | | | | | |
34-
| SteelSeries Arctis 9 | All | x | x | | | x | x | | | | | | | | | | |
35-
| SteelSeries Arctis Pro Wireless | All | x | x | | | x | | | | | | | | | | | |
36-
| SteelSeries Arctis Nova 3 | All | x | | | | | | | | x | x | | x | x | | | |
37-
| SteelSeries Arctis Nova (5/5X) | All | x | x | | | x | x | | | x | x | x | x | x | x | | |
38-
| SteelSeries Arctis Nova 7 | All | x | x | | | x | x | | | x | x | | x | x | x | x | x |
39-
| SteelSeries Arctis Nova 7P | All | | x | | | x | | | | x | x | | x | x | x | x | x |
40-
| SteelSeries Arctis 7+ | All | x | x | | | x | x | | | x | x | | | | | | |
41-
| SteelSeries Arctis Nova Pro Wireless | All | x | x | | x | x | | | | x | x | | | | | | |
42-
| SteelSeries Arctis Nova 3P Wireless | L/M | x | x | | | x | | | | x | x | x | | x | | | |
43-
| HyperX Cloud Alpha Wireless | All | x | x | | | x | | x | | | | | | | | | |
44-
| HyperX Cloud Flight Wireless | All | | x | | | | | | | | | | | | | | |
45-
| HyperX Cloud II Wireless | All | | x | | | x | | | | | | | | | | | |
46-
| HyperX Cloud 3 | All | x | | | | | | | | | | | | | | | |
47-
| ROCCAT Elo 7.1 Air | All | | | | x | x | | | | | | | | | | | |
48-
| ROCCAT Elo 7.1 USB | All | | | | x | | | | | | | | | | | | |
49-
| Audeze Maxwell | All | x | x | | | x | x | x | | x | | | | | x | | |
50-
| Lenovo Wireless VoIP Headset | All | x | x | | | x | | x | x | x | | | x | | x | | |
51-
| Sony INZONE Buds | All | | x | | | | | | | | | | | | | | |
52-
| HeadsetControl Test device | All | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x |
19+
| 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 | microphone noise filter |
20+
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
21+
| Logitech G522 LIGHTSPEED | All | x | x | | | x | | | | | | | x | | | | | |
22+
| Logitech G533 | All | x | x | | | x | | | | | | | | | | | | |
23+
| Logitech G535 | All | x | x | | | x | | | | | | | | | | | | |
24+
| Logitech G633/G635/G733/G933/G935 | All | x | x | | x | | | | | | | | | | | | | |
25+
| Logitech G431/G432/G433 | All | x | | | | | | | | | | | | | | | | |
26+
| Logitech G930 | All | x | x | | | | | | | | | | | | | | | |
27+
| Logitech G PRO X 2 LIGHTSPEED | All | x | x | | | x | | | | x | x | x | | | | | | |
28+
| Logitech G PRO Series | All | x | x | | | x | | | | | | | | | | | | |
29+
| Logitech Zone Wired/Zone 750 | All | x | | | | | | x | x | | | | | | | | | |
30+
| Corsair Headset Device | All | x | x | x | x | | | | | | | | | | | | | |
31+
| Corsair Wireless V2 Headset Device | All | x | x | | | | | | | | | | | | | | | |
32+
| SteelSeries Arctis (1/7X/7P) Wireless | All | x | x | | | x | | | | | | | | | | | | |
33+
| SteelSeries Arctis (7/Pro) | All | x | x | | x | x | x | | | | | | | | | | | |
34+
| SteelSeries Arctis 9 | All | x | x | | | x | x | | | | | | | | | | | |
35+
| SteelSeries Arctis Pro Wireless | All | x | x | | | x | | | | | | | | | | | | |
36+
| SteelSeries Arctis Nova 3 | All | x | | | | | | | | x | x | | x | x | | | | |
37+
| SteelSeries Arctis Nova (5/5X) | All | x | x | | | x | x | | | x | x | x | x | x | x | | | |
38+
| SteelSeries Arctis Nova 7 | All | x | x | | | x | x | | | x | x | | x | x | x | x | x | |
39+
| SteelSeries Arctis Nova 7P | All | | x | | | x | | | | x | x | | x | x | x | x | x | |
40+
| SteelSeries Arctis 7+ | All | x | x | | | x | x | | | x | x | | | | | | | |
41+
| SteelSeries Arctis Nova Pro Wireless | All | x | x | | x | x | | | | x | x | | | | | | | |
42+
| SteelSeries Arctis Nova 3P Wireless | L/M | x | x | | | x | | | | x | x | x | | x | | | | |
43+
| HyperX Cloud Alpha Wireless | All | x | x | | | x | | x | | | | | | | | | | |
44+
| HyperX Cloud Flight Wireless | All | | x | | | | | | | | | | | | | | | |
45+
| HyperX Cloud II Wireless | All | | x | | | x | | | | | | | | | | | | |
46+
| HyperX Cloud 3 | All | x | | | | | | | | | | | | | | | | |
47+
| ROCCAT Elo 7.1 Air | All | | | | x | x | | | | | | | | | | | | |
48+
| ROCCAT Elo 7.1 USB | All | | | | x | | | | | | | | | | | | | |
49+
| Audeze Maxwell | All | x | x | | | x | x | x | | x | | | | | x | | | |
50+
| Audeze Maxwell 2 | All | x | x | | | x | x | x | | x | | | | | | | | x |
51+
| Lenovo Wireless VoIP Headset | All | x | x | | | x | | x | x | x | | | x | | x | | | |
52+
| Sony INZONE Buds | All | | x | | | | | | | | | | | | | | | |
53+
| HeadsetControl Test device | All | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x |
5354

5455
**Platform:** All = Linux, macOS, Windows | L/M = Linux and macOS only
5556

cli/main.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ struct Options {
148148
std::optional<bool> volume_limiter_enabled;
149149
std::optional<bool> bt_when_powered_on;
150150
std::optional<uint8_t> bt_call_volume;
151+
std::optional<uint8_t> noise_filter;
151152

152153
// Info requests
153154
bool request_battery = false;
@@ -212,6 +213,7 @@ std::optional<cli::ParseError> configureParser(cli::ArgumentParser& parser, Opti
212213
.value('n', "notificate", opts.notification_sound, uint8_t(0), uint8_t(255), "Play notification sound", "SOUNDID")
213214
.toggle('r', "rotate-to-mute", opts.rotate_to_mute_enabled, "Toggle rotate to mute")
214215
.value('p', "equalizer-preset", opts.equalizer_preset, uint8_t(0), uint8_t(255), "Set equalizer preset", "PRESET")
216+
.long_value("noise-filter", opts.noise_filter, uint8_t(0), uint8_t(2), "Set microphone noise filter level", "LEVEL")
215217

216218
// === Equalizer (custom parsing) ===
217219
.custom('e', "equalizer", cli::ArgRequirement::Required, [&opts](std::optional<std::string_view> arg) -> std::optional<cli::ParseError> {
@@ -813,7 +815,8 @@ namespace help {
813815
sections.back()
814816
.add('r', "rotate-to-mute", getValueHint(CAP_ROTATE_TO_MUTE), "Mute when boom arm raised", CAP_ROTATE_TO_MUTE)
815817
.add("microphone-mute-led-brightness", getValueHint(CAP_MICROPHONE_MUTE_LED_BRIGHTNESS), "Mute LED brightness", CAP_MICROPHONE_MUTE_LED_BRIGHTNESS)
816-
.add("microphone-volume", getValueHint(CAP_MICROPHONE_VOLUME), "Microphone gain level", CAP_MICROPHONE_VOLUME);
818+
.add("microphone-volume", getValueHint(CAP_MICROPHONE_VOLUME), "Microphone gain level", CAP_MICROPHONE_VOLUME)
819+
.add("noise-filter", getValueHint(CAP_NOISE_FILTER), "Microphone noise filter level (0=off, 1=low, 2=high)", CAP_NOISE_FILTER);
817820

818821
// Lights & Audio Cues - value hints from capability descriptors
819822
sections.push_back({ "LIGHTS & AUDIO CUES", {} });
@@ -910,6 +913,7 @@ struct FeatureParamStorage {
910913
int bt_call_vol_val = 0;
911914
int battery_req = 0;
912915
int chatmix_req = 0;
916+
int noise_filter_val = 0;
913917

914918
// Store copies of complex settings to avoid const_cast
915919
EqualizerSettings equalizer_settings;
@@ -941,6 +945,8 @@ struct FeatureParamStorage {
941945
bt_power_val = *opts.bt_when_powered_on ? 1 : 0;
942946
if (opts.bt_call_volume.has_value())
943947
bt_call_vol_val = *opts.bt_call_volume;
948+
if (opts.noise_filter.has_value())
949+
noise_filter_val = *opts.noise_filter;
944950
battery_req = opts.request_battery ? 1 : 0;
945951
chatmix_req = opts.request_chatmix ? 1 : 0;
946952

@@ -977,7 +983,8 @@ void initializeFeatureRequests(std::vector<DiscoveredDevice>& devices, const Opt
977983
{ CAP_PARAMETRIC_EQUALIZER, CAPABILITYTYPE_ACTION, opts.parametric_equalizer.has_value() ? FeatureParam { g_feature_params.parametric_eq_settings } : FeatureParam { std::monostate {} }, opts.parametric_equalizer.has_value(), {} },
978984
{ CAP_VOLUME_LIMITER, CAPABILITYTYPE_ACTION, g_feature_params.volume_limiter_val, opts.volume_limiter_enabled.has_value(), {} },
979985
{ CAP_BT_WHEN_POWERED_ON, CAPABILITYTYPE_ACTION, g_feature_params.bt_power_val, opts.bt_when_powered_on.has_value(), {} },
980-
{ CAP_BT_CALL_VOLUME, CAPABILITYTYPE_ACTION, g_feature_params.bt_call_vol_val, opts.bt_call_volume.has_value(), {} }
986+
{ CAP_BT_CALL_VOLUME, CAPABILITYTYPE_ACTION, g_feature_params.bt_call_vol_val, opts.bt_call_volume.has_value(), {} },
987+
{ CAP_NOISE_FILTER, CAPABILITYTYPE_ACTION, g_feature_params.noise_filter_val, opts.noise_filter.has_value(), {} }
981988
};
982989

983990
for (auto& dev : devices) {

lib/capability_descriptors.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,17 @@ inline constexpr std::array<CapabilityDescriptor, NUM_CAPABILITIES> CAPABILITY_D
219219
.min_value = 0,
220220
.max_value = 100,
221221
.value_hint = "<0-100>" },
222+
223+
// CAP_NOISE_FILTER
224+
{
225+
.cap = CAP_NOISE_FILTER,
226+
.type = CAPABILITYTYPE_ACTION,
227+
.name = "noise-filter",
228+
.short_flag = "",
229+
.description = "Set noise filter level",
230+
.min_value = 0,
231+
.max_value = 2,
232+
.value_hint = "<0|1|2>" },
222233
} };
223234

224235
/**

lib/device.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ extern int hsc_device_timeout;
5454
X(CAP_MICROPHONE_VOLUME, "microphone volume", 'o') \
5555
X(CAP_VOLUME_LIMITER, "volume limiter", '\0') \
5656
X(CAP_BT_WHEN_POWERED_ON, "bluetooth when powered on", '\0') \
57-
X(CAP_BT_CALL_VOLUME, "bluetooth call volume", '\0')
57+
X(CAP_BT_CALL_VOLUME, "bluetooth call volume", '\0') \
58+
X(CAP_NOISE_FILTER, "microphone noise filter", '\0')
5859

5960
/** @brief A list of all features settable/queryable for headsets
6061
*

lib/device_registry.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
// Audeze devices
4242
#include "devices/audeze_maxwell.hpp"
43+
#include "devices/audeze_maxwell2.hpp"
4344

4445
// Lenovo devices
4546
#include "devices/lenovo_wireless_voip.hpp"
@@ -128,6 +129,7 @@ void DeviceRegistry::initialize()
128129

129130
// Audeze devices
130131
registerDevice(std::make_unique<AudezeMaxwell>());
132+
registerDevice(std::make_unique<AudezeMaxwell2>());
131133

132134
// Lenovo devices
133135
registerDevice(std::make_unique<LenovoWirelessVoip>());

lib/devices/audeze_maxwell.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class AudezeMaxwell : public HIDDevice {
3333
static constexpr std::array<uint16_t, 3> SUPPORTED_PRODUCT_IDS {
3434
0x4b19, // Maxwell
3535
0x4b18, // Maxwell Xbox Dongle
36-
0x4b29 // Maxwell 2 (PlayStation version)
3736
};
3837

3938
static constexpr int MSG_SIZE = 62;

0 commit comments

Comments
 (0)