Subject: kern/20999: SiS7018 soundcard doesn't output clean sounds
To: None <>
From: Gabriel Gonzalez <>
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
>Originator:     Gabriel Gonzalez
>Release:        NetBSD 1.6Q
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
	Trying to play sounds in a SiS7018 based soundcard gets a dirty output with a awful background noise and replayed sounds.
	Playing some audio file.
	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 @@
 		/* 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);
 		/* release reset */
 		reg = pci_conf_read(pc, pt, AUTRI_PCI_LEGACY_IOBASE);