NetBSD Problem Report #51703

From martin@duskware.de  Sat Dec 10 18:39:03 2016
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id CEAAA7A2F3
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 10 Dec 2016 18:39:03 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: audio fails to attach if hardware can't do CD quality
X-Send-Pr-Version: 3.95

>Number:         51703
>Category:       kern
>Synopsis:       audio fails to attach if hardware can't do CD quality
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    nat
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 10 18:40:00 +0000 2016
>Closed-Date:    Tue Mar 21 07:58:58 +0000 2017
>Last-Modified:  Tue Mar 21 07:58:58 +0000 2017
>Originator:     Martin Husemann
>Release:        NetBSD 7.99.44
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD alien-from-alpha-centauri 7.99.44 NetBSD 7.99.44 (GENERIC-$Revision: 1.373 $) #45: Sat Dec 10 18:31:50 CET 2016 martin@martins.aprisoft.de:/ssd/src/sys/arch/alpha/compile/GENERIC alpha
Architecture: alpha
Machine: alpha
>Description:

The new audio mixing code requires the hardware to do 44100 HZ, 16 bit two
channel output. If that is not supported, audio attach fails in
audiosetinfo() after audio_set_params() failed with EINVAL.

This affects at least everything using sys/dev/ic/am7930.c as a backend,
maybe others as well.

The am7930_set_params() functions starts like this:

        if ((usemode & AUMODE_PLAY) == AUMODE_PLAY) {
                if (p->sample_rate < 7500 || p->sample_rate > 8500 ||
                        p->encoding != AUDIO_ENCODING_ULAW ||
                        p->precision != 8 ||
                        p->channels != 1)
                                return EINVAL;

>How-To-Repeat:

Boot -current on a vax station or DEC 3000; source code inspection.

>Fix:
Do not fail audio attach completely when the normalized output channel can not
be set, drop software mixing capabilities in this case?

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->nat
Responsible-Changed-By: nat@NetBSD.org
Responsible-Changed-When: Fri, 23 Dec 2016 21:13:50 +0000
Responsible-Changed-Why:
I'll take this.


From: "Nathanial Sloss" <nat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51703 CVS commit: src/sys/dev/ic
Date: Wed, 28 Dec 2016 10:04:53 +0000

 Module Name:	src
 Committed By:	nat
 Date:		Wed Dec 28 10:04:53 UTC 2016

 Modified Files:
 	src/sys/dev/ic: am7930.c

 Log Message:
 Add slinear encoding.  Tested by flxd@

 Addresses PR kern/51703: audio fails to attach if hardware can't do CD
 quality.

 Autoconfiguration of hw paramaters to be done later.  For now it is
 possibile to set 8 bits precision 8000 Hz 1 channel via sysctls.


 To generate a diff of this commit:
 cvs rdiff -u -r1.52 -r1.53 src/sys/dev/ic/am7930.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Nathanial Sloss" <nat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51703 CVS commit: src/sys/dev
Date: Sat, 21 Jan 2017 22:22:41 +0000

 Module Name:	src
 Committed By:	nat
 Date:		Sat Jan 21 22:22:41 UTC 2017

 Modified Files:
 	src/sys/dev: audio.c

 Log Message:
 Add auto config for channel/hw format.

 Addresses PR kern/51703.
 Addresses PR kern/51760.
 Addresses PR kern/51879.


 To generate a diff of this commit:
 cvs rdiff -u -r1.291 -r1.292 src/sys/dev/audio.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: nat@NetBSD.org
State-Changed-When: Mon, 23 Jan 2017 21:29:31 +0000
State-Changed-Why:
Auto configuration of virtual channel parameters has been committed.


State-Changed-From-To: feedback->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Tue, 21 Mar 2017 07:58:58 +0000
State-Changed-Why:
Fixed, thanks!


>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.