@@ -71,7 +71,7 @@ static uint8_t EQUALIZER_FILTER_MAP[NUM_EQ_FILTER_TYPES] = {
71
71
static struct device device_arctis ;
72
72
73
73
static const uint16_t PRODUCT_IDS [] = { ID_ARCTIS_NOVA_3P_WIRELESS };
74
- static const uint8_t SAVE_DATA [MSG_SIZE ] = { 0x09 }; // Command to save settings to headset
74
+ static const uint8_t SAVE_DATA [MSG_SIZE ] = { 0x09 };
75
75
76
76
static int arctis_nova_3p_wireless_send_sidetone (hid_device * device_handle , uint8_t num );
77
77
static int arctis_nova_3p_wireless_send_microphone_volume (hid_device * device_handle , uint8_t num );
@@ -81,6 +81,7 @@ static int arctis_nova_3p_send_equalizer(hid_device* device_handle, struct equal
81
81
static int arctis_nova_3p_send_equalizer_preset (hid_device * device_handle , uint8_t num );
82
82
static int arctis_nova_3p_send_parametric_equalizer (hid_device * device_handle , struct parametric_equalizer_settings * settings );
83
83
static int arctis_nova_3p_write_device_band (struct parametric_equalizer_band * filter , uint8_t * data );
84
+ static int arctis_nova_3p_wireless_save_state (hid_device * device_handle );
84
85
85
86
void arctis_nova_3p_wireless_init (struct device * * device )
86
87
{
@@ -121,7 +122,7 @@ static int arctis_nova_3p_wireless_send_sidetone(hid_device* device_handle, uint
121
122
uint8_t data [MSG_SIZE ] = { 0x39 , num };
122
123
hid_send_feature_report (device_handle , data , MSG_SIZE );
123
124
124
- return hid_send_feature_report (device_handle , SAVE_DATA , MSG_SIZE );
125
+ return arctis_nova_3p_wireless_save_state (device_handle );
125
126
}
126
127
127
128
static int arctis_nova_3p_wireless_send_microphone_volume (hid_device * device_handle , uint8_t num )
@@ -131,7 +132,7 @@ static int arctis_nova_3p_wireless_send_microphone_volume(hid_device* device_han
131
132
uint8_t volume [MSG_SIZE ] = { 0x37 , num };
132
133
hid_send_feature_report (device_handle , volume , MSG_SIZE );
133
134
134
- return hid_send_feature_report (device_handle , SAVE_DATA , MSG_SIZE );
135
+ return arctis_nova_3p_wireless_save_state (device_handle );
135
136
}
136
137
137
138
static int arctis_nova_3p_wireless_send_inactive_time (hid_device * device_handle , uint8_t num )
@@ -163,7 +164,7 @@ static int arctis_nova_3p_wireless_send_inactive_time(hid_device* device_handle,
163
164
uint8_t data [MSG_SIZE ] = { 0xa3 , num };
164
165
hid_send_feature_report (device_handle , data , MSG_SIZE );
165
166
166
- return hid_send_feature_report (device_handle , SAVE_DATA , MSG_SIZE );
167
+ return arctis_nova_3p_wireless_save_state (device_handle );
167
168
}
168
169
169
170
static BatteryInfo arctis_nova_3p_wireless_request_battery (hid_device * device_handle )
@@ -264,7 +265,7 @@ static int arctis_nova_3p_send_equalizer(hid_device* device_handle, struct equal
264
265
}
265
266
266
267
hid_send_feature_report (device_handle , data , MSG_SIZE );
267
- return hid_send_feature_report (device_handle , SAVE_DATA , MSG_SIZE );
268
+ return arctis_nova_3p_wireless_save_state (device_handle );
268
269
}
269
270
270
271
static int arctis_nova_3p_send_equalizer_preset (hid_device * device_handle , uint8_t num )
@@ -324,7 +325,7 @@ static int arctis_nova_3p_send_parametric_equalizer(hid_device* device_handle, s
324
325
}
325
326
326
327
hid_send_feature_report (device_handle , data , MSG_SIZE );
327
- return hid_send_feature_report (device_handle , SAVE_DATA , MSG_SIZE );
328
+ return arctis_nova_3p_wireless_save_state (device_handle );
328
329
}
329
330
330
331
static int arctis_nova_3p_write_device_band (struct parametric_equalizer_band * filter , uint8_t * data )
@@ -374,3 +375,8 @@ static int arctis_nova_3p_write_device_band(struct parametric_equalizer_band* fi
374
375
375
376
return 0 ;
376
377
}
378
+
379
+ static int arctis_nova_3p_wireless_save_state (hid_device * device_handle )
380
+ {
381
+ return hid_send_feature_report (device_handle , SAVE_DATA , MSG_SIZE );
382
+ }
0 commit comments