NetBSD Problem Report #56060
From www@netbsd.org Tue Mar 16 12:40:34 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 366581A9217
for <gnats-bugs@gnats.NetBSD.org>; Tue, 16 Mar 2021 12:40:34 +0000 (UTC)
Message-Id: <20210316124032.D32191A9239@mollari.NetBSD.org>
Date: Tue, 16 Mar 2021 12:40:32 +0000 (UTC)
From: rvp@SDF.ORG
Reply-To: rvp@SDF.ORG
To: gnats-bugs@NetBSD.org
Subject: speaker(4) does not produce silence with 'P'
X-Send-Pr-Version: www-1.0
>Number: 56060
>Category: kern
>Synopsis: speaker(4) does not produce silence with 'P'
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: isaki
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 16 12:45:01 +0000 2021
>Closed-Date: Sat Apr 03 04:26:06 +0000 2021
>Last-Modified: Sat Apr 03 04:26:06 +0000 2021
>Originator: RVP
>Release: NetBSD-HEAD/amd64 9.99.81 (GENERIC) (build 202103152150Z)
>Organization:
>Environment:
NetBSD-HEAD/amd64 9.99.81 (GENERIC) (build 202103152150Z)
>Description:
The 'P' command to produce a pause/silence does not work because pitch is set to 20 Hz (for any pitch < 20 Hz).
# echo l32 cdef p1.... cdef > /dev/speaker
Here, the 'P' pause command produces a tone instead of a pause.
>How-To-Repeat:
See commands above.
>Fix:
audiobell() in dev/audio/audiobell.c should sleep for `period' ms (and
return) instead of setting pitch to 20 Hz if `pitch' is 0.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->isaki
Responsible-Changed-By: isaki@NetBSD.org
Responsible-Changed-When: Thu, 18 Mar 2021 07:58:51 +0000
Responsible-Changed-Why:
Mine.
From: "Tetsuya Isaki" <isaki@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56060 CVS commit: src/sys/dev
Date: Sat, 3 Apr 2021 04:10:30 +0000
Module Name: src
Committed By: isaki
Date: Sat Apr 3 04:10:30 UTC 2021
Modified Files:
src/sys/dev: spkr.c spkr_audio.c spkrvar.h
src/sys/dev/isa: spkr_pcppi.c
Log Message:
Rework about the rest note in speaker(4).
- Obsolete the sc_rest callback. The rest note operation can be done by
the common spkr layer. This also fixes PR kern/56060.
This work-in-progress patch was left in my local tree for years. :(
- Improve calculations of tone and rest length.
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/spkr.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/spkr_audio.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/spkrvar.h
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/isa/spkr_pcppi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Tetsuya Isaki <isaki@pastel-flower.jp>
To: gnats-bugs@netbsd.org, rvp@SDF.ORG
Cc: kern-bug-people@netbsd.org,
gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: kern/56060: speaker(4) does not produce silence with 'P'
Date: Sat, 03 Apr 2021 13:24:38 +0900
At Tue, 16 Mar 2021 12:45:01 +0000 (UTC),
rvp@SDF.ORG wrote:
> >Description:
> The 'P' command to produce a pause/silence does not work because pitch is set to 20 Hz (for any pitch < 20 Hz).
>
> # echo l32 cdef p1.... cdef > /dev/speaker
>
> Here, the 'P' pause command produces a tone instead of a pause.
I've just fixed this issue. This was caused by the inconsistency
of my work-in-progress patch. Sorry for wasting your time.
And thank you for report.
---
Tetsuya Isaki <isaki@pastel-flower.jp / isaki@NetBSD.org>
State-Changed-From-To: open->closed
State-Changed-By: isaki@NetBSD.org
State-Changed-When: Sat, 03 Apr 2021 04:26:06 +0000
State-Changed-Why:
Fixed in -current.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.