NetBSD Problem Report #42016

From jmcneill@pipes.invisible.ca  Tue Sep  8 11:41:23 2009
Return-Path: <jmcneill@pipes.invisible.ca>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 0B72863BC1D
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  8 Sep 2009 11:41:23 +0000 (UTC)
Message-Id: <20090908114237.BD6EB3A8C4@pipes.invisible.ca>
Date: Tue,  8 Sep 2009 07:42:37 -0400 (EDT)
From: jmcneill@invisible.ca
Reply-To: jmcneill@invisible.ca
To: gnats-bugs@gnats.NetBSD.org
Subject: audio(4) does not handle formats where validbits!=precision
X-Send-Pr-Version: 3.95

>Number:         42016
>Category:       kern
>Synopsis:       audio(4) does not handle formats where validbits!=precision
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 08 11:45:00 +0000 2009
>Last-Modified:  Tue Nov 07 21:38:47 +0000 2017
>Originator:     Jared D. McNeill
>Release:        NetBSD 5.99.16
>Organization:

>Environment:


System: NetBSD pipes.invisible.ca 5.99.16 NetBSD 5.99.16 (MONOLITHIC) #54: Tue Sep 8 07:15:49 EDT 2009 jmcneill@ptichka.invisible.ca:/Users/jmcneill/branches/HEAD/src/sys/arch/i386/compile/obj/MONOLITHIC i386
Architecture: i386
Machine: i386
>Description:
	From audiosetinfo():

		if (SPECIFIED(p->precision)) {
			pp.precision = p->precision;
			/* we don't have API to specify validbits */
			pp.validbits = p->precision;
			np++;
		}

	This means that if hardware supports eg. 20- or 24-bit samples in
	32-bit containers, userland has no way to select this.

	In theory the hardware driver should be able to set
	precision=validbits (so eg. 24-bit samples in 24-bit containers) and
	implement its own audio filter for linear24_to_linear32 conversion,
	but attempts to make this work have been unsuccessful. Maybe it needs
	the following change from OpenBSD:

	  http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/audio.c#rev1.101

	A few thoughts;

	1. For eg. 24-bit samples, is it more likely that userland will supply
	   a 24/24 or 24/32 stream?
	2. Extending AUDIOSETINFO is not desirable, and OSS compatibility
	   should also be taken into account.
>How-To-Repeat:

>Fix:


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->nat
Responsible-Changed-By: nat@NetBSD.org
Responsible-Changed-When: Sat, 04 Nov 2017 07:26:49 +0000
Responsible-Changed-Why:
Take.


From: Tetsuya Isaki <isaki@pastel-flower.jp>
To: gnats-bugs@NetBSD.org, nat@NetBSD.org
Cc: kern-bug-people@netbsd.org,
	netbsd-bugs@netbsd.org,
	gnats-admin@netbsd.org,
	jmcneill@invisible.ca
Subject: Re: kern/42016 (audio(4) does not handle formats where validbits!=precision)
Date: Sat, 04 Nov 2017 16:46:48 +0900

 At Sat,  4 Nov 2017 07:26:50 +0000 (UTC),
 nat@NetBSD.org wrote:
 > Synopsis: audio(4) does not handle formats where validbits!=precision
 > 
 > Responsible-Changed-From-To: kern-bug-people->nat
 > Responsible-Changed-By: nat@NetBSD.org
 > Responsible-Changed-When: Sat, 04 Nov 2017 07:26:49 +0000
 > Responsible-Changed-Why:
 > Take.

 nat@,
 This is not a simple technical problem.  I'd like to know about
 the direction for this problem before you implement it.  
 ---
 Tetsuya Isaki <isaki@pastel-flower.jp / isaki@NetBSD.org>

Responsible-Changed-From-To: nat->kern-bug-people
Responsible-Changed-By: nat@NetBSD.org
Responsible-Changed-When: Tue, 07 Nov 2017 21:38:47 +0000
Responsible-Changed-Why:
This is more envolved than I initially thought.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.