Subject: kern/15456: cmpci not able to do 48kHz sample rate
To: None <gnats-bugs@gnats.netbsd.org>
From: None <stephenm@employees.org>
List: netbsd-bugs
Date: 02/01/2002 09:43:16
>Number:         15456
>Category:       kern
>Synopsis:       cmpci not able to do 48kHz sample rate
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 01 09:44:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Stephen Ma
>Release:        NetBSD-current 20020130
>Organization:
	People's Front for the correct spelling of the word "Organisation"
>Environment:
System: NetBSD khemlani.nowhere.org 1.5ZA NetBSD 1.5ZA (KHEMLANI) #93: Thu Jan 31 09:10:39 PST 2002 stephenm@khemlani.nowhere.org:/usr/src/sys/arch/i386/compile/KHEMLANI i386
Architecture: i386
Machine: i386
>Description:
When audioctl tries to set the cmpci audio playback rate to 48kHz, the driver
sets the actual rate to 44.1kHz.
>How-To-Repeat:
	08:34:59 khemlani:pci$ audioctl -w play.rate=48000
	play.rate: -> 44100
	08:35:09 khemlani:pci$ ident /v1/netbsd/src/sys/dev/pci/cmpci.c 
	/v1/netbsd/src/sys/dev/pci/cmpci.c:
	     $NetBSD: cmpci.c,v 1.12 2001/12/27 14:17:04 itohy Exp $
	     $NetBSD: cmpci.c,v 1.12 2001/12/27 14:17:04 itohy Exp $

>Fix:
--- /v1/netbsd/src/sys/dev/pci/cmpci.c	Fri Dec 28 04:01:31 2001
+++ ./cmpci.c	Thu Jan 31 09:05:14 2002
@@ -317,7 +317,7 @@
 {
 	int i;
 
-	for (i = 0; i < CMPCI_REG_NUMRATE - 2; i++)
+	for (i = 0; i < CMPCI_REG_NUMRATE - 1; i++)
 		if (rate <=
 		    (cmpci_rate_table[i].rate+cmpci_rate_table[i+1].rate) / 2)
 			return i;


>Release-Note:
>Audit-Trail:
>Unformatted: