NetBSD Problem Report #43542

From jakllsch@siwenna.kollasch.net  Tue Jun 29 12:46:55 2010
Return-Path: <jakllsch@siwenna.kollasch.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 8838D63BA66
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 29 Jun 2010 12:46:55 +0000 (UTC)
Message-Id: <20100629124651.0B2C0106BA8@siwenna.kollasch.net>
Date: Tue, 29 Jun 2010 12:46:51 +0000 (UTC)
From: jakllsch@kollasch.net
Reply-To: jakllsch@kollasch.net
To: gnats-bugs@gnats.NetBSD.org
Subject: hdaudio at 32000Hz
X-Send-Pr-Version: 3.95

>Number:         43542
>Category:       kern
>Synopsis:       hdaudio(4) 32kHz playback sounds like hissing analog TV snow
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 29 12:50:00 +0000 2010
>Closed-Date:    Sat Aug 10 17:53:25 +0000 2013
>Last-Modified:  Sat Aug 10 17:53:25 +0000 2013
>Originator:     Jonathan A. Kollasch
>Release:        NetBSD 5.1_RC1
>Organization:
>Environment:
System: NetBSD siwenna.kollasch.net 5.1_RC1 NetBSD 5.1_RC1 (SIWENNA) #26: Sat Jun 19 18:27:19 UTC 2010 root@siwenna.kollasch.net:/local/siwenna/20100403/src/sys/arch/i386/compile/SIWENNA i386
Architecture: i386
Machine: i386
>Description:
32kHz playback with hdaudio(4) sounds awful and takes too long.
>How-To-Repeat:
Using a hdaudio(4)/hdafg(4)/audio(4) device:

$ time audioplay -fs 44100 17\ Let\'s\ Hear\ That\ String\ Part\ Again,\ Because\ I\ Don\'t\ Think\ They\ Heard\ It\ All\ the\ Way\ Out\ in\ Bushnell.wav
   40.35s real ...
$ time audioplay -fs 32000 17\ Let\'s\ Hear\ That\ String\ Part\ Again,\ Because\ I\ Don\'t\ Think\ They\ Heard\ It\ All\ the\ Way\ Out\ in\ Bushnell.wav
   148.27s real ...

The first invocation produces the expected audio.
The second invocation doesn't, and takes significantly longer to complete.

It probably doesn't make a difference considering azalia(4) works fine,
but both machines I've tried this on use Realtek codec chips.

>Fix:
unknown.

>Release-Note:

>Audit-Trail:
From: "Jonathan A. Kollasch" <jakllsch@kollasch.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/43542: hdaudio at 32000Hz
Date: Sun, 4 Jul 2010 03:43:07 +0000

 from my dmesg:
 hdafg0: 2ch/2ch 44100Hz-96000Hz 16/16 20/32 24/32

 So, 32kHz isn't a rate supported directly by the codec.

 Further debugging shows that hdaudio_stream_param() is being fed a rate
 of 64kHz when it fails.  64kHz isn't handled by the sample_rate switch
 statement.  It appears that I can use the 48kHz base with a multiplier
 of 4 and divisor of 3 to obtain 64kHz.  However, it doesn't appear that
 64kHz is a rate in the supported rate flag bits, so this option may be
 incorrect.

 Anyway, shouldn't hdaudio_stream_param() fail more gracefully?  I'd
 suggest selecting the format first, and defaulting to 48kHz when an
 unsupported rate is attempted.  At least that wouldn't sound as
 horrific.  Or is there a way to EINVAL these requests at the audio(4)
 layer?

From: "Jonathan A. Kollasch" <jakllsch@kollasch.net>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/43542: hdaudio at 32000Hz
Date: Sun, 15 Aug 2010 22:06:59 +0000

 The problem persists with recent changes:
      $NetBSD: hdaudio.c,v 1.7 2010/08/07 16:24:19 jmcneill Exp $
      $NetBSD: hdaudio_afg.c,v 1.24 2010/08/15 19:39:56 jmcneill Exp $
      $NetBSD: hdaudio_pci.c,v 1.6 2010/08/07 16:59:48 jmcneill Exp $

State-Changed-From-To: open->feedback
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Sun, 15 Aug 2010 22:46:02 +0000
State-Changed-Why:
Please try hdaudio_afg.c r1.25


From: "Jonathan A. Kollasch" <jakllsch@kollasch.net>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org,
	gnats-admin@netbsd.org, jmcneill@NetBSD.org
Subject: Re: kern/43542 (hdaudio(4) 32kHz playback sounds like hissing
 analog TV snow)
Date: Mon, 16 Aug 2010 02:14:33 +0000

 On Sun, Aug 15, 2010 at 10:46:03PM +0000, jmcneill@NetBSD.org wrote:
 > Synopsis: hdaudio(4) 32kHz playback sounds like hissing analog TV snow
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: jmcneill@NetBSD.org
 > State-Changed-When: Sun, 15 Aug 2010 22:46:02 +0000
 > State-Changed-Why:
 > Please try hdaudio_afg.c r1.25

 Works.

State-Changed-From-To: feedback->closed
State-Changed-By: jakllsch@NetBSD.org
State-Changed-When: Mon, 16 Aug 2010 03:03:19 +0000
State-Changed-Why:
fixed. pullups, meh.


State-Changed-From-To: closed->pending-pullups
State-Changed-By: jmcneill@NetBSD.org
State-Changed-When: Mon, 16 Aug 2010 10:41:01 +0000
State-Changed-Why:
[pullup-5 #1442] hdaudio fix for kern/43542


State-Changed-From-To: pending-pullups->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Sat, 10 Aug 2013 17:53:25 +0000
State-Changed-Why:
Pulled up.


>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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.