Skip to content

Commit a020fc8

Browse files
committed
fix(audeze_maxwell): ensure all requests use send_get_input_report for reliability
1 parent aa9757b commit a020fc8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/devices/audeze_maxwell.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static int audeze_maxwell_toggle_sidetone(hid_device* device_handle)
142142
// Audeze HQ changes the byte at index 11, but it has no effect, it’s always toggleable regardless of what’s sent.
143143
uint8_t data_request[MSG_SIZE] = { 0x6, 0x9, 0x80, 0x5, 0x5a, 0x5, 0x0, 0x82, 0x2c, 0x7, 0x0, 0x1 };
144144

145-
return hid_write(device_handle, data_request, MSG_SIZE);
145+
return send_get_input_report(device_handle, data_request, NULL);
146146
}
147147

148148
static int audeze_maxwell_send_sidetone(hid_device* device_handle, uint8_t num)
@@ -154,7 +154,7 @@ static int audeze_maxwell_send_sidetone(hid_device* device_handle, uint8_t num)
154154
uint8_t data_request[MSG_SIZE] = { 0x6, 0x9, 0x80, 0x5, 0x5a, 0x5, 0x0, 0x0, 0x9, 0x2c, 0x0, num };
155155

156156
// The sidetone is enabled whenever its level changes.
157-
int res = hid_write(device_handle, data_request, MSG_SIZE);
157+
int res = send_get_input_report(device_handle, data_request, NULL);
158158

159159
if (num == 0) {
160160
return audeze_maxwell_toggle_sidetone(device_handle);
@@ -202,13 +202,13 @@ static int audeze_maxwell_send_inactive_time(hid_device* device_handle, uint8_t
202202
data_request[18] = data_request[14]; // MSB Again
203203
}
204204

205-
return hid_write(device_handle, data_request, MSG_SIZE);
205+
return send_get_input_report(device_handle, data_request, NULL);
206206
}
207207

208208
static int audeze_maxwell_send_volume_limiter(hid_device* hid_device, uint8_t on)
209209
{
210210
uint8_t data_request[MSG_SIZE] = { 0x6, 0x9, 0x80, 0x5, 0x5a, 0x5, 0x0, 0x0, 0x9, 0x28, 0x0, on == 1 ? 0x88 : 0x8e };
211-
return hid_write(hid_device, data_request, MSG_SIZE);
211+
return send_get_input_report(hid_device, data_request, NULL);
212212
}
213213

214214
// Audeze Maxwell has 6 default presets and 4 custom presets (Audeze, Treble Boost, Bass Boost, Immersive, Competition, Footsteps, Preset 1, Preset 2, Preset 3, Preset 4)
@@ -219,7 +219,7 @@ static int audeze_maxwell_send_equalizer_preset(hid_device* hid_device, uint8_t
219219
}
220220

221221
uint8_t data_request[MSG_SIZE] = { 0x6, 0x9, 0x80, 0x5, 0x5a, 0x5, 0x0, 0x0, 0x9, 0x0, 0x0, num };
222-
return hid_write(hid_device, data_request, MSG_SIZE);
222+
return send_get_input_report(hid_device, data_request, NULL);
223223
}
224224

225225
static int audeze_maxwell_send_equalizer_custom_preset(hid_device* hid_device, uint8_t num)

0 commit comments

Comments
 (0)