NetBSD Problem Report #47077
From mouse@Sparkle.Rodents-Montreal.ORG Sun Oct 14 19:57:30 2012
Return-Path: <mouse@Sparkle.Rodents-Montreal.ORG>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 4A97763E59B
for <gnats-bugs@gnats.NetBSD.org>; Sun, 14 Oct 2012 19:57:30 +0000 (UTC)
Message-Id: <201210141957.PAA10732@Sparkle.Rodents-Montreal.ORG>
Date: Sun, 14 Oct 2012 15:57:28 -0400 (EDT)
From: Mouse <mouse@Rodents-Montreal.ORG>
Reply-To: mouse@Rodents-Montreal.ORG
To: gnats-bugs@gnats.NetBSD.org
Subject: [dM] audio(4) disagrees with the code
X-Send-Pr-Version: 3.95
>Number: 47077
>Category: kern
>Synopsis: [dM] audio(4) disagrees with the code
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Oct 14 20:00:01 +0000 2012
>Closed-Date: Sat Oct 05 03:44:52 +0000 2019
>Last-Modified: Sat Oct 05 03:44:52 +0000 2019
>Originator: Mouse
>Release: NetBSD 5.1
>Organization:
Dis-
>Environment:
Apparently present on many recent versions; noticed on
System: NetBSD VAIO-Video.Rodents-Montreal.ORG 5.1 NetBSD 5.1 (MOUSEGEN) #3: Fri Oct 5 06:02:53 EDT 2012 mouse@VAIO-51.Rodents-Montreal.ORG:/home/mouse/kbuild/MOUSEGEN i386
Architecture: i386
Machine: i386
>Description:
audio(4) says (in part), of the blocksize field in an
audio_info_t, that "Upon return from an AUDIO_SETINFO call, the
actual blocksize set is returned in this field.". This does
not appear to actually be the case; AUDIO_SETINFO appears to
leave the blocksize field unchanged.
jmcneill says this appears to have been broken "for over 15
years", pointing to the delta between 1.38 and 1.39 of
sys/dev/audio.c, presumably referring to, if I'm reading cvsweb
text right, the removal of line 1686 of the older version.
This change is dated 1997-03-20.
>How-To-Repeat:
Try to take advantage of the functionality that sentence
promises. Notice it doesn't work.
See my tech-kern message
<201210140805.EAA08506@Sparkle.Rodents-Montreal.ORG> (at
ftp.rodents-montreal.org:/mouse/misc/AUDIO_SETINFO.2012-10-14
among other places) for a test program and sample run of it.
>Fix:
As a workaround, call AUDIO_GETINFO or AUDIO_GETBUFINFO after
doing AUDIO_SETINFO.
Since it's a useful facility, I'd rather see the code repaired.
But, since the breakage is apparently well over a decade old,
it seems almost nobody cares, so it might be more appropriate
to treat this as a doc-bug instead and rip that promise out of
the documentation.
I haven't created patches for either.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: isaki@NetBSD.org
State-Changed-When: Sat, 05 Oct 2019 03:44:52 +0000
State-Changed-Why:
As submitter said, unfortunately nobody expects such behavior today.
AUDIO_SETINFO doesn't return any values which actually set even in
new isaki-audio2 implementation, and manpage conforms to it.
I think it's time to close this PR.
# By the way, new audio driver is cleaner than before.
# It can be achieved easier if you wish.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.