From nobody@FreeBSD.ORG Mon Sep 27 16:00:27 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 7E05514F08; Mon, 27 Sep 1999 16:00:27 -0700 (PDT)
Message-Id: <19990927230027.7E05514F08@hub.freebsd.org>
Date: Mon, 27 Sep 1999 16:00:27 -0700 (PDT)
From: youki@center.osaka-u.ac.jp
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: pas2_pcm.c pcm playback problem, with fix
X-Send-Pr-Version: www-1.0

>Number:         14006
>Category:       kern
>Synopsis:       pas2_pcm.c pcm playback problem, with fix
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 27 16:10:00 PDT 1999
>Closed-Date:    Mon Dec 3 09:45:32 PST 2001
>Last-Modified:  Sat Dec  8 06:50:00 PST 2001
>Originator:     Youki Kadobayashi
>Release:        3.3-RELEASE
>Organization:
Computation Center, Osaka University
>Environment:
FreeBSD xps3.aist-nara.ac.jp 3.3-RELEASE FreeBSD 3.3-RELEASE #6: Tue Sep 28 07:36:54 JST 1999     youki-k@xps3.aist-nara.ac.jp:/usr/src/kame/freebsd3/sys/compile/DELL.v6  i386

PC with PAS16 card
>Description:
pas2_pcm.c does not calculate sampling rate correctly.
As a result, stereo audio playback occurs at higher pitch.

>How-To-Repeat:
mpg123 someaudiofile.mp3

>Fix:
I verified the following patch fixes the problem.

*** /sys/i386/isa/sound/pas2_pcm.c.bak  Thu Jul 29 21:36:54 1999
--- /sys/i386/isa/sound/pas2_pcm.c      Tue Sep 28 07:41:32 1999
***************
*** 66,77 ****
        if (arg < 5000)
                arg = 5000;
  
-       foo = (1193180 + (arg / 2)) / arg;
-       arg = 1193180 / foo;
- 
        if (pcm_channels & 2)
!               foo = foo >> 1;
  
        pcm_speed = arg;
  
        tmp = pas_read(FILTER_FREQUENCY);
--- 66,77 ----
        if (arg < 5000)
                arg = 5000;
  
        if (pcm_channels & 2)
!               foo = (1193180 + arg) / (arg * 2);
!       else
!               foo = (1193180 + (arg / 2)) / arg;
  
+       arg = 1193180 / foo;
        pcm_speed = arg;
  
        tmp = pas_read(FILTER_FREQUENCY);

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: iedowse 
State-Changed-When: Sun Dec 2 11:29:31 PST 2001 
State-Changed-Why:  

Does this problem still exist with more recent releases? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=14006 
State-Changed-From-To: feedback->closed 
State-Changed-By: iedowse 
State-Changed-When: Mon Dec 3 09:45:32 PST 2001 
State-Changed-Why:  

Submitter no longer uses ProAudio Spectrum boards. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=14006 

From: Hiroo ONO <hiroo@oikumene.gcd.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/14006: pas2_pcm.c pcm playback problem, with fix
Date: Sat, 08 Dec 2001 23:43:22 +0900

 hello.
 
 > Submitter no longer uses ProAudio Spectrum boards.
 
 I have the hardware (though I have not used it and I am not sure if
 it works), and FreeBSD 4.4-stable box (w/ISA bus).
 If you give me a week, I can test it.
 
 The same code remains in stable, so I think the problem is still there.
 Sound related code seems to have been changed so much in current,
 so I cannot say anything about current.
>Unformatted:
