| Summary: | [PATCH] old pccard beep depends on value of HZ | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Tony Finch <dot> | ||||
| Component: | kern | Assignee: | Warner Losh <imp> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Tony Finch
2001-09-13 00:50:01 UTC
Responsible Changed From-To: freebsd-bugs->imp Over to maintainer. On Thu, 13 Sep 2001, Tony Finch wrote: > >Description: > The timing of pccard event sounds depends on HZ. > >How-To-Repeat: > Change HZ to (say) 1000. > > Index: sys/pccard/pccard_beep.c > =================================================================== > RCS file: /home/ncvs/src/sys/pccard/pccard_beep.c,v > retrieving revision 1.3.2.3 > diff -u -r1.3.2.3 pccard_beep.c > --- sys/pccard/pccard_beep.c 2001/06/05 19:11:34 1.3.2.3 > +++ sys/pccard/pccard_beep.c 2001/08/28 22:22:10 > @@ -73,8 +73,10 @@ > melody = (struct tone *)arg; > > if (melody->pitch != 0) { > - sysbeep(melody->pitch, melody->duration); > - timeout(pccard_beep_sub, melody + 1, melody->duration); > + sysbeep(melody->pitch, > + melody->duration * hz / 100); > + timeout(pccard_beep_sub, melody + 1, > + melody->duration * hz / 100); > } else > allow_beep = BEEP_ON; > } pccard_beep() also suffers from, or at least adds to the confusion about the pitch of the beep. sysbeep()'s "pitch" arg is not actually a pitch; it is a period in i8254 timer cycles. The "pitches" in the tone data appear to already by inverted to compensate for this. Bruce State Changed From-To: open->closed Ooops, this is a duplicate of a bug that was submitted a long time ago. It has been fixed. Sorry I didn't include it in the commit message. |