Page MenuHomeFreeBSD

sysbeep: Adjust interface to take a duration as a sbt
ClosedPublic

Authored by imp on Oct 24 2021, 5:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 6:12 PM
Unknown Object (File)
Fri, Apr 26, 6:10 PM
Unknown Object (File)
Fri, Apr 26, 6:10 PM
Unknown Object (File)
Fri, Apr 26, 6:10 PM
Unknown Object (File)
Fri, Apr 26, 1:57 PM
Unknown Object (File)
Mar 29 2024, 4:57 AM
Unknown Object (File)
Mar 9 2024, 8:15 AM
Unknown Object (File)
Mar 9 2024, 8:15 AM

Details

Summary

Change the 'period' argument to 'duration' and change its type to
sbintime_t so we can more easily express different durations.

Sponsored by: Netflix

Test Plan

This is a 'deckchairs' sort of change to prepare for settable bells in vt(4).
I've test booted this kernel and nothing bad happened, but more testing is likely needed.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Oct 24 2021, 5:56 AM
imp created this revision.
imp added reviewers: jhb, glebius, manu, des.
tsoome added a subscriber: tsoome.

Thanks for doing this:)

This revision is now accepted and ready to land.Oct 24 2021, 6:11 AM
hselasky added inline comments.
sys/kern/kern_cons.c
673

Hi,

Could this function generate a devd event, with pitch and duration, for implementing via a real audio device?

--HPS

Thanks for taking a constructive approach to the heated discussion! I'm no expert in this part of kernel, so please treat my "Accepted" more as "Liked" rather than "Approved" :)

mav added inline comments.
sys/kern/kern_cons.c
685

I am curios whether up to 50% variation of the duration due to C_PREL(1) will be too noticeable or even annoying. May be we should be more strict here.

sys/kern/kern_cons.c
684–686

Here should better be beeping = 1 now to not overflow. I don't see a point to expand beeping to spintime_t.

sys/kern/kern_cons.c
684–686

Yea, nobody has a beep more than 1s, but it really is a bool and has been logically back to 386BSD, even though bool didn't exist then :)...

685

Likely. I think C_PREL(4) or 5 is in order...

sys/kern/kern_cons.c
684–686

I see couple SBT_1S above, that would already overflow.

imp edited the test plan for this revision. (Show Details)

mav's comments

This revision now requires review to proceed.Oct 26 2021, 2:24 AM
This revision was not accepted when it landed; it landed in state Needs Review.Nov 3 2021, 10:05 PM
This revision was automatically updated to reflect the committed changes.