Subject: Re: tester needed: auich and 1.6 branch
To: TAMURA Kent <kent@netbsd.org>
From: Aymeric Vincent <Aymeric.Vincent@labri.fr>
List: port-i386
Date: 02/04/2004 12:13:20
--=-=-=


        Hi,

TAMURA Kent <kent2004?@hauN.org> writes:

> I ported new devices support of -current auich to NetBSD 1.6
> branch.  I'd like to know whether it works.  New supported
> devices are ICH4, ICH5, nForce, nForce2, nForce3, SiS 7012, AMD
> 768, and AMD 8111.  4ch/6ch playback is not ported.
> 
> To test the driver, download the following files, copy them to
> src/sys/dev/pci/, rebuild a kernel, install and reboot.
> 
> 	http://www.hauN.org/kent/netbsd-1-6/auich.c
> 	http://www.hauN.org/kent/netbsd-1-6/auichreg.h
> 	http://www.hauN.org/kent/netbsd-1-6/pcidevs
> 	http://www.hauN.org/kent/netbsd-1-6/pcidevs.h
> 	http://www.hauN.org/kent/netbsd-1-6/pcidevs_data.h

I installed these files and noted a few things:

- I think we shouldn't call audio_attach_mi(). This attachment has to
  be specified in the kernel config file. With my config file, I ended
  up having audio0 and audio1 attached to the same chip.

- There seems to be a typo where ICH_POINT is used instead of
  ICH_PIINT but I'm not sure.

I include the patch for these below.

Sound output doesn't work, and it goes like this:

1. I hear only small cracks every 2 seconds or so if I use xmms and
   get 100% system CPU usage.
   I get a "No supported rate" error from mpg123

2. If I remove the ICH4-specific initialization below this
                /* 
                 * Use native mode for ICH4/ICH5
                 */
Then everything seems to be playing fine except that I get no sound
output at all. As if the volume were 0 but it isn't. I see that
auich_intr() is called often as it should, xmms displays the
equalizers correctly etc.

Do you have any idea of what I should change or pull up next?
(I attach a dmesg output: the codec I have is a ADS "0x74")

Thanks,
 Aymeric

--- /usr/labri/vincent/netbsd-1-6/auich.c	Tue Jan 13 16:45:49 2004
+++ auich.c	Wed Feb  4 10:45:03 2004
@@ -513,8 +513,6 @@
 	if (sc->sc_fixed_rate)
 		printf("%s: warning, fixed rate codec\n", sc->sc_dev.dv_xname);
 
-	audio_attach_mi(&auich_hw_if, sc, &sc->sc_dev);
-
 	/* Watch for power change */
 	sc->sc_suspend = PWR_RESUME;
 	sc->sc_powerhook = powerhook_establish(auich_powerhook, sc);
@@ -1100,7 +1098,7 @@
 		/* int ack */
 		bus_space_write_2(sc->iot, sc->aud_ioh, ICH_PCMI + sc->sc_sts_reg,
 		    sts & (ICH_LVBCI | ICH_CELV | ICH_BCIS | ICH_FIFOE));
-		bus_space_write_2(sc->iot, sc->aud_ioh, ICH_GSTS, ICH_POINT);
+		bus_space_write_2(sc->iot, sc->aud_ioh, ICH_GSTS, ICH_PIINT);
 		ret++;
 	}
 

--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment; filename=dmesg

NetBSD 1.6.2 (PHANTOM) #6: Wed Feb  4 11:45:29 CET 2004
    vincent@phantom:/usr/src/sys/arch/i386/compile/PHANTOM
cpu0: Intel Pentium 4 (686-class), 2790.84 MHz
cpu0: D-cache 8 KB 64b/line 4-way
cpu0: L2 cache 512 KB 64b/line 8-way
cpu0: features bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features bfebfbff<PGE,MCA,CMOV,FGPAT,PSE36,CFLUSH,DS,ACPI,MMX>
cpu0: features bfebfbff<FXSR,SSE,SSE2,SS,HTT,TM,B31>
total memory = 1023 MB
avail memory = 943 MB
using 6144 buffers containing 52480 KB of memory
BIOS32 rev. 0 found at 0xfd6f0
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel product 0x255d (rev. 0x03)
agp0 at pchb0: aperture at 0xe0000000, size 0x8000000
Intel product 0x2551 (undefined subclass 0x00, revision 0x03) at pci0 dev 0 function 1 not configured
ppb0 at pci0 dev 1 function 0: Intel product 0x2552 (rev. 0x03)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
vga1 at pci1 dev 0 function 0: Nvidia Corporation product 0x0288 (rev. 0xa1)
pci_mem_find: void region
Feb  4 11:47:20 phantom last message repeated 3 times
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
uhci0 at pci0 dev 29 function 0: Intel 82801DB USB UHCI Controller #1 (rev. 0x02)
uhci0: interrupting at irq 10
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1: Intel 82801DB USB UHCI Controller #2 (rev. 0x02)
uhci1: interrupting at irq 5
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2: Intel 82801DB USB UHCI Controller #3 (rev. 0x02)
uhci2: interrupting at irq 3
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
Intel 82801DB/DBM USB EHCI Controller (USB serial bus, interface 0x20, revision 0x02) at pci0 dev 29 function 7 not configured
ppb1 at pci0 dev 30 function 0: Intel 82801BA Hub-to-PCI Bridge (rev. 0x82)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled
siop0 at pci2 dev 10 function 0: Symbios Logic 53c1010-66 (ultra3-wide scsi)
siop0: using on-board RAM
siop0: interrupting at irq 5
scsibus0 at siop0: 16 targets, 8 luns per target
fxp0 at pci2 dev 13 function 0: i82550 Ethernet, rev 16
fxp0: interrupting at irq 11
fxp0: Ethernet address 00:30:6e:4b:ef:b1
inphy0 at fxp0 phy 1: i82555 10/100 media interface, rev. 4
inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib0 at pci0 dev 31 function 0
pcib0: Intel 82801DB LPC Interface Bridge (rev. 0x02)
pciide0 at pci0 dev 31 function 1: Intel 82801DB IDE Controller (ICH4) (rev. 0x02)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
pciide0: disabling primary channel (no drives)
pciide0: secondary channel wired to compatibility mode
atapibus0 at pciide0 channel 1: 2 targets
cd0 at atapibus0 drive 0: <HL-DT-STDVD-ROM GDR8162B, , 0018> type 5 cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 3
pciide0: secondary channel interrupting at irq 15
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 3 (using DMA data transfers)
Intel 82801DB SMBus Controller (SMBus serial bus, revision 0x02) at pci0 dev 31 function 3 not configured
auich0 at pci0 dev 31 function 5: i82801DB/DBM (ICH4/ICH4M) AC-97 Audio
auich0: interrupting at irq 11
auich_attach: lists 0xe349a000 0xe349a100 0xe349a200
auich0: ADS116 codec; headphone, 20 bit DAC, no 3D stereo
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
lpt0 at isa0 port 0x378-0x37b irq 7
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: no ISA Plug 'n Play devices found
apm0 at mainbus0: Power Management spec V1.2
biomask e76d netmask ef6d ttymask ffef
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <FUJITSU, MAP3367NP, HPF6> SCSI3 0/direct fixed
sd0: 34732 MB, 48122 cyl, 2 head, 739 sec, 512 bytes/sect x 71132960 sectors
sd0: sync (25.0ns offset 31), 16-bit (80.000MB/s) transfers, tagged queueing
auich0: measured ac97 link rate at 48007 Hz, will use 48000 Hz
audio0 at auich0: full duplex, mmap, independent
Kernelized RAIDframe activated
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs

--=-=-=--