NetBSD Problem Report #51760

From martin@aprisoft.de  Mon Jan  2 09:56:43 2017
Return-Path: <martin@aprisoft.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 7FCCD7A270
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  2 Jan 2017 09:56:43 +0000 (UTC)
Message-Id: <20170102095633.4EFBB5CC761@emmas.aprisoft.de>
Date: Mon,  2 Jan 2017 10:56:33 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: audio playback sounds bad
X-Send-Pr-Version: 3.95

>Number:         51760
>Category:       kern
>Synopsis:       audio playback sounds bad
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    nat
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 02 10:00:00 +0000 2017
>Closed-Date:    Tue Mar 21 07:55:21 +0000 2017
>Last-Modified:  Tue Mar 21 07:55:21 +0000 2017
>Originator:     Martin Husemann
>Release:        NetBSD 7.99.53
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD whoever-brings-the-night.aprisoft.de 7.99.53 NetBSD 7.99.53 (WHOEVER) #69: Wed Dec 28 20:52:33 CET 2016 martin@martins.aprisoft.de:/ssd/src/sys/arch/sparc64/compile/WHOEVER sparc64
Architecture: sparc64
Machine: sparc64
>Description:

After the audio mixing changes, playback of CD quality music sounds .. "worse".
There is a tiny noise pattern overlayed to the signal, not always very 
noticable. Sounds like a few random values are output every ~20ms
(or whatever).

Not sure how to debug this, do we have some "audio tap" feature to trace
the data sent to the hw?

>How-To-Repeat:
Play music on sparc64 with mpg123 using autri:

autri0 at pci2 dev 8 function 0: Acer Labs M5451 AC-Link Controller Audio Device (rev. 0x02)
autri0: interrupting at ivec 7a4
autri0: ac97: Analog Devices AD1881A codec; headphone, Analog Devices Phat Stereo
audio0 at autri0: full duplex, playback, capture, mmap, independent

sysctl hw.autri0:
hw.autri0.frequency = 44100
hw.autri0.precision = 16
hw.autri0.channels = 2
hw.autri0.saturate = 1

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Timo Buhrmester <fstd.lkml@gmail.com>
To: gnats-bugs@netbsd.org
Cc: martin@NetBSD.org
Subject: Re: kern/51760: audio playback sounds bad
Date: Tue, 3 Jan 2017 21:42:44 +0100

 > sysctl hw.autri0:
 > hw.autri0.frequency = 44100
 I had the same problem (on i386, hdafg(4)), maya@ suggested setting
 that sysctl to 48000, which corrected the issue for me.

Responsible-Changed-From-To: kern-bug-people->nat
Responsible-Changed-By: nat@NetBSD.org
Responsible-Changed-When: Tue, 17 Jan 2017 01:19:43 +0000
Responsible-Changed-Why:
I'll handle this.


From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/51760: audio playback sounds bad
Date: Tue, 17 Jan 2017 18:50:31 +0000

 On Tue, Jan 03, 2017 at 08:45:00PM +0000, Timo Buhrmester wrote:
  >  > sysctl hw.autri0:
  >  > hw.autri0.frequency = 44100
  >  I had the same problem (on i386, hdafg(4)), maya@ suggested setting
  >  that sysctl to 48000, which corrected the issue for me.

 For me it decreased but didn't remove the noise; however, that was
 before a bunch of recent fixes.

 (also it shouldn't be necessary...)

 -- 
 David A. Holland
 dholland@netbsd.org

From: "Nathanial Sloss" <nat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51760 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->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Tue, 21 Mar 2017 07:55:21 +0000
State-Changed-Why:
The original symptoms have been fixed, what remains is better described
in PR kern/52098.


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