NetBSD Problem Report #1051

From gnats  Mon May 15 15:57:13 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.10/8.6.10) with ESMTP id PAA01642 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Mon, 15 May 1995 15:57:12 -0700
Message-Id: <199505152235.SAA10919@kolvir.blrc.ma.us>
Date: Mon, 15 May 1995 18:35:00 -0400
From: John Kohl <jtk@kolvir.blrc.ma.us>
Reply-To: jtk@kolvir.blrc.ma.us
To: gnats-bugs@NetBSD.ORG
Subject: audio driver doesn't return good indication of audio playback mode
X-Send-Pr-Version: 3.2

>Number:         1051
>Category:       kern
>Synopsis:       /sys/dev/audio.c should return both record & play info if full duplex
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon May 15 16:05:03 +0000 1995
>Closed-Date:    Mon Jul 10 02:02:00 +0000 1995
>Last-Modified:  
>Originator:     John Kohl
>Release:        1.0A (-current)
>Organization:
NetBSD Kernel Hackers `R` Us
>Environment:

System: NetBSD kolvir 1.0A NetBSD 1.0A (KOLVIR) #336: Sat May 13 23:54:35 EDT 1995 jtk@kolvir:/u1/NetBSD-current/src/sys/arch/i386/compile/KOLVIR i386


>Description:
The AUDIO_GETINFO ioctl() only returns either AUDIO_PLAY or AUDIO_RECORD
as the current mode.  It should instead return a bitmask indicating
which of {PLAY, RECORD} is in use.

>How-To-Repeat:
ioctl(fd, AUDIO_GETINFO, &info)
look at info.mode

>Fix:
===================================================================
RCS file: RCS/audio.c,v
retrieving revision 1.1
diff -c -r1.1 audio.c
*** 1.1	1995/05/15 22:31:12
--- audio.c	1995/05/15 22:31:29
***************
*** 1626,1632 ****
  	ai->hiwat = sc->sc_hiwat;
  	ai->lowat = sc->sc_lowat;
  	ai->backlog = sc->sc_backlog;
! 	ai->mode = (sc->sc_mode & (1<<AUMODE_PLAY))?AUMODE_PLAY:AUMODE_RECORD;

  	return (0);
  }
--- 1626,1632 ----
  	ai->hiwat = sc->sc_hiwat;
  	ai->lowat = sc->sc_lowat;
  	ai->backlog = sc->sc_backlog;
! 	ai->mode = sc->sc_mode;

  	return (0);
  }

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: brezak 
State-Changed-When: Sun Jul 9 22:02:00 EDT 1995 
State-Changed-Why:  
Made AUMODE_PLAY and AUMODE_RECORD bit masks and returned as appropriate. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.