Repository navigation
feat(agent,gui): add headset automatic power-off timeout #2632
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
tkroll-ionos
wants to merge
28
commits into
AprilNEA:master
Choose a base branch
from
tkroll-ionos:feat/headset-power-off
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 23 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
06be911
feat(hidpp): read and write the 0x1F20 power-off timeout
tkroll-ionos 9d944ee
feat(core): add the headset power-off timeout type and capability
tkroll-ionos 029b0e6
feat(device): read and write a headset's power-off timeout
tkroll-ionos 4f19174
feat(device): re-measure cached devices for the power-off capability
tkroll-ionos 4fc5300
feat(hid): expose the headset power-off timeout on this host
tkroll-ionos 64d7dcc
feat(agent-core): read and write a headset's power-off timeout
tkroll-ionos f80ea86
feat(fixture): record a headset's power-off timeout in device profiles
tkroll-ionos c62b7b9
feat(ipc,agent): serve a headset's power-off timeout over IPC
tkroll-ionos 524c195
feat(cli): record a headset's power-off timeout in device profiles
tkroll-ionos d42f986
feat(i18n): add the headset automatic power-off strings
tkroll-ionos e2383df
feat(cli): add openlogi diag power-off
tkroll-ionos a4d8993
feat(gui): let a slider rest on a headset power-off timeout
tkroll-ionos b7d417b
feat(gui): add the automatic power-off row to the Audio tab
tkroll-ionos addfaf6
feat(gui): show the Audio tab for a headset with automatic power-off
tkroll-ionos 1548082
feat(tray): offer the headset automatic power-off in the menu-bar item
tkroll-ionos cbaeb34
docs: note the headset automatic power-off setting
tkroll-ionos 5fa0be2
test(tray): cover the headset automatic power-off submenu
tkroll-ionos 66f6546
fix(gui): hide a refused power-off row beside a working sidetone
tkroll-ionos c864115
fix(device): read only a refusal of the power-off timeout as unsupported
tkroll-ionos bdf9374
test(gui): cover the power-off re-read on reconnect
tkroll-ionos 91f398d
docs(gui): name every caller of the power-off re-read
tkroll-ionos de7c373
test(cli): name the power-off capture test after its gate
tkroll-ionos 8157f4e
feat(i18n): translate the headset automatic power-off strings into Ge…
tkroll-ionos 51d1422
feat(tray): show a power-off timeout between the steps
tkroll-ionos 3418b25
fix(device): log a confirmed power-off timeout change at info
tkroll-ionos 1256e44
fix(gui): ignore the answer to a superseded power-off timeout write
tkroll-ionos 2577264
fix(cli): keep diag power-off off the headset while an agent runs
tkroll-ionos 48b3a01
test(gui): drag the power-off slider in the rendered Audio tab
tkroll-ionos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a newer timeout request replaces a queued write,
set_power_off_timeoutruns a normal read and returnsOk(timeout)if it succeeds. The tray then records that answer as an applied change, even though the request wrote nothing.This violates the repository’s write-order rule: superseded writes must return
WriteSupersededand update no cache. Return that error here and let the tray treat it as no change. Add a write-order test that queues two timeout changes behind a held turn and checks that the skipped request changes no cached reading.Rule Used: Severity: high. Every HID++ write to one device takes a ticket from that device's
WriteOrderand runs underWriteTicket::in_order(read-modify-write, strict request order) orWriteTicket::turn(idempotent set-value writes only, newest wins). Th... (source)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving this one as is.
set_power_off_timeoutfollowsset_sidetone,set_report_rate,set_pointer_speedandset_force_sensingon master: a superseded write reads the headset, so its answer is what the headset holds at that moment, never the skipped request.WriteSupersededis used where the caller would otherwise save the request to config (DPI, Fn lock), and nothing saves the power-off timeout. The tray records that read and the newer write's answer follows it. On the GUI side the write number from the P0 above now drops the older answer. If you'd rather haveWriteSupersededfor every device-kept setting, I'd do that in its own PR, sidetone included.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I conflated “this request did not write” with “the returned value falsely claims it did.” The fallback is a read of the headset's current value, and for this device-owned setting that is a valid result; the GUI's write number also prevents an older answer from moving the slider after a newer request. Given the existing newest-wins pattern for these settings, I withdraw this finding for this PR. A broader change to return
WriteSupersededconsistently can be considered separately, as you suggest.