On Fri, 2 Apr 2010 22:45:12 +0200 Alexandre Ratchov <[email protected]>
wrote:

> > A short summary of the changes:
> > 
> > - According to specification AUICH_RR may only be set after DMA 
> >   is halted (AUICH_DCH is 0 in AUICH_STS). To accomplish this I 
> > revived auich_halt_pipe();
> > - auich_calibrate() did not clear interrupt and event bits in 
> >   AUICH_STS. Do that now. Further it did watch the CIV index 
> > counter to see when all samples are processed. I changed it to 
> > watch AUICH_STS instead and set LVI=CIV. therefore it won't 
> > change the CIV counter.
> > - my last patch introduced a small bug in auich_trigger_pipe() I 
> >   fixed that.
> > 
> 
> I think we should put the corresponding chunk in, sooner
> than later.
> 
> BTW, I start wondering why this calibration exists at all?
> do devices running at the wrong rate exist (which would mean
> they don't have the proper clock). If so should we start
> adding calibration code in all of our audio drivers?
> 
> -- Alexandre

Take a look at the last line of the dmesg below (taken just a moment
ago). The system has been up for about a day, and the last line was
added some time after it first booted up. It's typically not seen right
after a fresh cold boot. A *nearly* identical system running a newer
snapshot doesn't have the last speed tweak line. As for what exactly
the speed tweak actually means, I'm not entirely certain. --It kind of
smells like the improper clock you mentioned above, but it does seem to
answer your question if devices running at the wrong rate exist.

The system is not set up to do any power management (speed stepping,
apm, suspend, resume, ...). It just runs at full power. But this could
explain why the auich rate change in the dmesg is not seen consistently.

Is it possible some audio devices *expect* recalibration after a power
management event?

I've got the most recent snap downloading at the moment, but as usual,
I'll be lucky if it arrives without errors, and at best it will be late
tomorrow before I can start testing it. The most recent snap I have on
hand is March 24th, before the pmem and isa stuff went in.



$ dmesg
OpenBSD 4.7-beta (GENERIC) #521: Tue Feb  2 17:34:24 MST 2010
    [email protected]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) 4 CPU 2.40GHz ("GenuineIntel" 686-class) 2.40
GHz cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,CNXT-ID,xTPR
real mem  = 2137550848 (2038MB) avail mem = 2062446592 (1966MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 05/10/05, BIOS32 rev. 0 @
0xfd844, SMBIOS rev. 2.31 @ 0xf00f0 (51 entries) bios0: vendor IBM
version "24KT55AUS" date 05/10/2005 bios0: IBM 8315XX4
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP TCPA APIC BOOT
acpi0: wakeup devices USB1(S3) USB2(S3) USB3(S3) USBE(S3) SLOT(S5) KBC_
(S3) COMA(S5) COMB(S5) acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 99MHz
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (SLOT)
acpiprt2 at acpi0: bus -1 (AGP_)
acpicpu0 at acpi0
acpitz0 at acpi0: critical temperature 105 degC
acpibtn0 at acpi0: PWRB
bios0: ROM list: 0xc0000/0xb400 0xe0000/0x10000!
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82845G Host" rev 0x01
vga1 at pci0 dev 2 function 0 "Intel 82845G Video" rev 0x01
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0x88000000, size 0x8000000
inteldrm0 at vga1: apic 1 int 16 (irq 11)
drm0 at inteldrm0
uhci0 at pci0 dev 29 function 0 "Intel 82801DB USB" rev 0x01: apic 1
int 16 (irq 11) uhci1 at pci0 dev 29 function 1 "Intel 82801DB USB" rev
0x01: apic 1 int 19 (irq 10) uhci2 at pci0 dev 29 function 2 "Intel
82801DB USB" rev 0x01: apic 1 int 18 (irq 5) ehci0 at pci0 dev 29
function 7 "Intel 82801DB USB" rev 0x01: apic 1 int 23 (irq 9) usb0 at
ehci0: USB revision 2.0 uhub0 at usb0 "Intel EHCI root hub" rev
2.00/1.00 addr 1 ppb0 at pci0 dev 30 function 0 "Intel 82801BA
Hub-to-PCI" rev 0x81 pci1 at ppb0 bus 2
fxp0 at pci1 dev 8 function 0 "Intel PRO/100 VE" rev 0x81, i82562: apic
1 int 20 (irq 11), address 00:09:6b:cf:f5:2b inphy0 at fxp0 phy 1:
i82562EM 10/100 PHY, rev. 0 ichpcib0 at pci0 dev 31 function 0 "Intel
82801DB LPC" rev 0x01 pciide0 at pci0 dev 31 function 1 "Intel 82801DB
IDE" rev 0x01: DMA, channel 0 configured to compatibility, channel 1
configured to compatibility wd0 at pciide0 channel 0 drive 0: <Max
6Y250L6> wd0: 16-sector PIO, LBA48, 239372MB, 490234752 sectors wd0
6Y250L6> (pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <HL-DT-ST, CD-RW GCE-8481B, 1.11> ATAPI
5/cdrom removable wd1 at pciide0 channel 1 drive 1: <Max 6Y250L6>
wd1: 16-sector PIO, LBA48, 239372MB, 490234752 sectors
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
wd1(pciide0:1:1): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 "Intel 82801DB SMBus" rev 0x01: apic
1 int 17 (irq 9) iic0 at ichiic0
maxtmp0 at iic0 addr 0x4c: lm86
spdmem0 at iic0 addr 0x50: 1GB DDR SDRAM non-parity PC2700CL2.5
spdmem1 at iic0 addr 0x51: 1GB DDR SDRAM non-parity PC2700CL2.5
auich0 at pci0 dev 31 function 5 "Intel 82801DB AC97" rev 0x01: apic 1
int 17 (irq 9), ICH4 AC97 ac97: codec id 0x41445374 (Analog Devices
AD1981B) ac97: codec features headphone, 20 bit DAC, No 3D Stereo
audio0 at auich0
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
mtrr: Pentium Pro MTRR support
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
root on wd0a swap on wd0b dump on wd0b
auich0: measured ac97 link rate at 48008 Hz, will use 48000 Hz
$ 

Reply via email to