Subject: kern/20999: SiS7018 soundcard doesn't output clean sounds
To: None <gnats-bugs@gnats.netbsd.org>
From: Gabriel Gonzalez <gabriel@laptop.pear-labs.org>
List: netbsd-bugs
Date: 04/04/2003 03:39:36
>Number:         20999
>Category:       kern
>Synopsis:       SiS7018 soundcard doesn't output clean sounds
>Confidential:   yes
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 03 16:43:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Gabriel Gonzalez
>Release:        NetBSD 1.6Q
>Organization:
	
>Environment:
	
	
System: NetBSD laptop 1.6Q NetBSD 1.6Q (GENERIC) #0: Fri Apr 4 02:56:29 CEST 2003 gabriel@laptop:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
	Trying to play sounds in a SiS7018 based soundcard gets a dirty output with a awful background noise and replayed sounds.
	
>How-To-Repeat:
	Playing some audio file.
	
>Fix:
	This patch fixes the problem and the output is nice now.
	The fix was taken from the OpenBSD's sis7018 driver.


Index: src/sys/dev/pci/autri.c
===================================================================
RCS file: /cvsroot/netbsd/src/sys/dev/pci/autri.c,v
retrieving revision 1.14
diff -u -r1.14 autri.c
--- src/sys/dev/pci/autri.c	1 Feb 2003 06:23:38 -0000	1.14
+++ src/sys/dev/pci/autri.c	4 Apr 2003 00:21:30 -0000
@@ -665,7 +665,7 @@
 		delay(100);
 		/* reset Digital Controller */
 		reg = pci_conf_read(pc, pt, AUTRI_PCI_LEGACY_IOBASE);
-		pci_conf_write(pc, pt, AUTRI_PCI_LEGACY_IOBASE, reg | 0x00040000);
+		pci_conf_write(pc, pt, AUTRI_PCI_LEGACY_IOBASE, reg | 0x000c0000);
 		delay(100);
 		/* release reset */
 		reg = pci_conf_read(pc, pt, AUTRI_PCI_LEGACY_IOBASE);
>Release-Note:
>Audit-Trail:
>Unformatted: