From owner-freebsd-bugs Mon Sep 27 16:10: 4 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 6BE0B154CE for ; Mon, 27 Sep 1999 16:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id QAA99643; Mon, 27 Sep 1999 16:10:01 -0700 (PDT) (envelope-from gnats@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 To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: kern/14006: pas2_pcm.c pcm playback problem, with fix Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 14006 >Category: kern >Synopsis: pas2_pcm.c pcm playback problem, with fix >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 27 16:10:00 PDT 1999 >Closed-Date: >Last-Modified: >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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message