Sound Crackling When Reading From Hard Drives

Mark Kane mark at mkproductions.org
Thu Mar 16 08:43:48 UTC 2006


Hi everyone. I have been experiencing problems with sound crackling 
under certain situations of disk activity for the life of this machine. 
It has occurred with 5.4-RELEASE, 6.0-RELEASE, and three different 
versions of 6.1-PRERELEASE. It's not a huge problem but I thought I'd 
post about this situation in case there is a known fix, and if not then 
offer to help try any patches to get it resolved assuming it's not my 
hardware being odd.

First off, the relevant hardware is as follows (full dmesg attached):
Athlon64 3000+
GA-K8NS Pro Motherboard (nForce3)
1.5GB RAM
Sound Blaster Augidy 2 Platinum
6 PATA hard drives (varying sizes, see dmesg)
Promise ATA Card (PDC20269)

Originally I thought it was just when extracting archives like tar or 
rar which uses disk I/O and CPU power to extract them, but tonight I was 
just copying data between drives which I don't do very much and the 
problems occurred as well. So then I started doing some tests of copying 
an 800MB file back and forth between hard drives while playing a music 
file and documenting my results. My results and the hard drives are at 
the end of this message. I didn't test every possible combination 
because I realized that it probably has to do with reading from drives 
in general and not just extracting archives.

I then did another test with md5 to test my "reading from disk" theory. 
When using a utility like `md5`, sound crackling occurred when using 
`md5` on files from the same source drives that had problems copying 
FROM in the below tests. In other words, copying a file from ad12 to ad0 
produced heavy crackling in the below copy tests but copying the same 
file from ad0 to ad12 did not. When using `md5` on the file located on 
ad12 it makes the bad crackling noise, but once again it has no 
crackling problems when md5ing the same file located on ad0.

Three of the drives are on the motherboard's on-board controllers. The 
mobo has a total of four onboard IDE channels, so each hard drive is 
master on it's own dedicated channel and the DVD burner has it's own 
channel too. The remaining three hard drives are on a Promise (PDC20269) 
PCI ATA card. They all have brand new proper cables and have no other 
problems.

The same result happens with different music file types (ogg, wave, mp3) 
being played back from various drives. When rebuilding for 6.1-BETA4 I 
tried the ULE scheduler instead of the 4BSD. ULE seems to do better for 
video playback which had some stuttering problems before, but doesn't 
change this sound crackling problem when reading from hard drives. 
However with ULE I did experience a few seconds of freezing while trying 
to get out of my screensaver (just a black screen) as there was HD 
activity in the background as well as an earlier 5-10 second freeze 
while playing video from one HD at the same time another HD was decoding 
some files, but that's another topic.

I have no special options enabled in my kernel now except for the 
emu_10k1 driver and atapicam.

Here is a sample of the crackling when doing some of the below copy 
tests. A few seconds of the normal song is first, then I start the copy 
when the crackling kicks in...followed by a few seconds of normal 
playback again after it's done. It's harder to notice on the second cut 
but I tried a couple genres of music. Again, this is not the worst 
problem but I'd like to help improve it any way I can (I'm not a coder, 
but am very willing to test).

http://www.tntpowerhost.com/mixx941/FreeBSD_sound_crackling.ogg

So in short, when playing audio and reading files from hard drives, the 
sound has crackling noises in it. It happens when extracting archives 
and copying files from drive to drive with my additional drives, but 
reading and extracting from/to ad0 (the FreeBSD install drive) always 
seems to work with no crackling. It's just the additional ones now that 
seem to have problems when reading/copying/md5ing from them.

Is this some weird hardware problem on my end? Has anyone else seen or 
experienced this? What can I try to help narrow down the problem if it's 
not a known one?

Any suggestions would be much appreciated.

Thanks!

-Mark

FreeBSD amd64.localhost 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #8: Wed 
Mar 15 12:04:40 CST 2006 
mixx941 at amd64.localhost:/usr/obj/usr/src/sys/AMD643000  amd64

[mixx941 at amd64:~]% cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <Creative Audigy 2 (EMU10K2)> at io 0x9400 irq 17  (8p/2r/0v 
channels duplex default)


================================================
COPY TESTS:

ad0: 194481MB <Maxtor 6B200R0 BAH41BM0> at ata0-master UDMA133
ad8: 76344MB <MAXTOR 6L080J4 A93.0500> at ata4-master UDMA133
ad10: 78166MB <Maxtor 6Y080P0 YAR41BW0> at ata5-master UDMA133
ad11: 156334MB <Maxtor 6Y160P0 YAR41BW0> at ata5-slave UDMA133
ad12: 194481MB <Maxtor 6B200P0 BAH41BM0> at ata6-master UDMA133
ad14: 239372MB <Maxtor 6Y250P0 YAR41BW0> at ata7-master UDMA133

/dev/ad0 (200GB Maxtor on Onboard IDE):
ad0 -> ad10 = Clean
ad0 -> ad12 = Clean
ad0 -> ad14 = Clean

/dev/ad8 (80GB Maxtor on Promise card):
ad8 -> ad10 = Heavy Crackling
ad8 -> ad12 = Slight Crackling
ad8 -> ad14 = Slight Crackling

/dev/ad10 (80GB Maxtor on Promise card):
ad10 -> ad8 = Slight Crackling
ad10 -> ad0 = Slight Crackling

/dev/ad11 (160GB Maxtor on Promise card)):
ad11 -> ad14 = Very Slight Crackling and much faster copy time than rest

/dev/ad12 (200GB Maxtor on Onboard IDE):
ad12 -> ad0 = Heavy Crackling
ad12 -> ad8 = Heavy Crackling

/dev/ad14 (250GB Maxtor on Onboard IDE):
ad14 -> ad0 = Heavy Crackling
ad14 -> ad8 = Heavy Crackling
ad14 -> ad11 = Heavy Crackling and music stopped playing for a few 
seconds (music file being played back is on ad10)
================================================

-- 
GnuPG Public Key:
http://www.mkproductions.org/mk_pubkey.asc

Internet Radio:
Party107 (Trance/Electronic) - http://www.party107.com
Rock 101.9 The Edge (Rock) - http://www.rock1019.net

IRC:
MIXXnet IRC Network - irc.mixxnet.net (Nick: MIXX941)
-------------- next part --------------
Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 6.1-PRERELEASE #8: Wed Mar 15 12:04:40 CST 2006
    mixx941 at amd64.localhost:/usr/obj/usr/src/sys/AMD643000
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) 64 Processor 3000+ (2009.79-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0xfc0  Stepping = 0
  Features=0x78bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2>
  AMD Features=0xe0500800<SYSCALL,NX,MMX+,LM,3DNow+,3DNow>
real memory  = 1610547200 (1535 MB)
avail memory = 1543827456 (1472 MB)
ACPI APIC Table: <Nvidia AWRDACPI>
ioapic0 <Version 1.1> irqs 0-23 on motherboard
acpi0: <Nvidia AWRDACPI> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff,0xcf0-0xcf3 on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <NVIDIA nForce3-250 AGP Controller> mem 0xf0000000-0xf7ffffff at device 0.0 on pci0
isab0: <PCI-ISA bridge> at device 1.0 on pci0
isa0: <ISA bus> on isab0
pci0: <serial bus, SMBus> at device 1.1 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xfc002000-0xfc002fff irq 20 at device 2.0 on pci0
ohci0: [GIANT-LOCKED]
usb0: OHCI version 1.0, legacy support
usb0: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
ohci1: <OHCI (generic) USB controller> mem 0xfc003000-0xfc003fff irq 21 at device 2.1 on pci0
ohci1: [GIANT-LOCKED]
usb1: OHCI version 1.0, legacy support
usb1: <OHCI (generic) USB controller> on ohci1
usb1: USB revision 1.0
uhub1: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 4 ports with 4 removable, self powered
ehci0: <NVIDIA nForce3 250 USB 2.0 controller> mem 0xfc004000-0xfc0040ff irq 22 at device 2.2 on pci0
ehci0: [GIANT-LOCKED]
usb2: EHCI version 1.0
usb2: companion controllers, 4 ports each: usb0 usb1
usb2: <NVIDIA nForce3 250 USB 2.0 controller> on ehci0
usb2: USB revision 2.0
uhub2: nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub2: 8 ports with 8 removable, self powered
atapci0: <nVidia nForce3 Pro UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 8.0 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
atapci1: <nVidia nForce3 Pro SATA150 controller> port 0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73,0xe400-0xe40f,0xe800-0xe87f irq 20 at device 10.0 on pci0
ata2: <ATA channel 0> on atapci1
ata3: <ATA channel 1> on atapci1
pcib1: <ACPI PCI-PCI bridge> at device 11.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
pcib2: <ACPI PCI-PCI bridge> at device 14.0 on pci0
pci2: <ACPI PCI bus> on pcib2
atapci2: <Promise PDC20269 UDMA133 controller> port 0x8000-0x8007,0x8400-0x8403,0x8800-0x8807,0x8c00-0x8c03,0x9000-0x900f mem 0xfb000000-0xfb003fff irq 19 at device 7.0 on pci2
ata4: <ATA channel 0> on atapci2
ata5: <ATA channel 1> on atapci2
pcm0: <Creative Audigy 2 (EMU10K2)> port 0x9400-0x943f irq 17 at device 9.0 on pci2
pcm0: <SigmaTel STAC9721/23 AC97 Codec>
fwohci0: <1394 Open Host Controller Interface> mem 0xfb011000-0xfb0117ff,0xfb004000-0xfb007fff irq 18 at device 9.2 on pci2
fwohci0: OHCI version 1.10 (ROM=0)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:02:3c:00:91:01:6c:20
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
firewire0: <IEEE1394(FireWire) bus> on fwohci0
fwe0: <Ethernet over FireWire> on firewire0
if_fwe0: Fake Ethernet address: 02:02:3c:01:6c:20
fwe0: Ethernet address: 02:02:3c:01:6c:20
fwe0: if_start running deferred for Giant
sbp0: <SBP-2/SCSI over FireWire> on firewire0
fwohci0: Initiate bus reset
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)
skc0: <Marvell Gigabit Ethernet> port 0x9c00-0x9cff mem 0xfb008000-0xfb00bfff irq 19 at device 11.0 on pci2
skc0: Marvell Yukon Lite Gigabit Ethernet rev. A3(0x7)
sk0: <Marvell Semiconductor, Inc. Yukon> on skc0
sk0: Ethernet address: 00:0f:ea:4f:83:8b
miibus0: <MII bus> on sk0
e1000phy0: <Marvell 88E1000 Gigabit PHY> on miibus0
e1000phy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX-FDX, auto
atapci3: <ITE IT8212F UDMA133 controller> port 0xa010-0xa017,0xa400-0xa403,0xa810-0xa817,0xac00-0xac03,0xb000-0xb00f irq 16 at device 12.0 on pci2
ata6: <ATA channel 0> on atapci3
ata7: <ATA channel 1> on atapci3
fwohci1: <Texas Instruments TSB43AB23> mem 0xfb010000-0xfb0107ff,0xfb00c000-0xfb00ffff irq 18 at device 14.0 on pci2
fwohci1: OHCI version 1.10 (ROM=1)
fwohci1: No. of Isochronous channels is 4.
fwohci1: EUI64 00:0f:ea:00:00:47:38:9b
fwohci1: Phy 1394a available S400, 3 ports.
fwohci1: Link S400, max_rec 2048 bytes.
firewire1: <IEEE1394(FireWire) bus> on fwohci1
fwe1: <Ethernet over FireWire> on firewire1
if_fwe1: Fake Ethernet address: 02:0f:ea:47:38:9b
fwe1: Ethernet address: 02:0f:ea:47:38:9b
fwe1: if_start running deferred for Giant
sbp1: <SBP-2/SCSI over FireWire> on firewire1
fwohci1: Initiate bus reset
fwohci1: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
firewire1: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire1: bus manager 0 (me)
fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FAST]
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
ppc0: <Standard parallel printer port> port 0x378-0x37f irq 7 on acpi0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model IntelliMouse Explorer, device ID 4
orm0: <ISA Option ROMs> at iomem 0xc0000-0xcf7ff,0xd2000-0xd47ff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 2009790456 Hz quality 800
Timecounters tick every 1.000 msec
module_register_init: MOD_LOAD (amr_linux, 0xffffffff80609d10, 0) error 6
ad0: 194481MB <Maxtor 6B200R0 BAH41BM0> at ata0-master UDMA133
acd0: DMA limited to UDMA33, device found non-ATA66 cable
acd0: DVDR <LITE-ON DVDRW SOHW-1693S/KS04> at ata1-slave UDMA33
ad8: 76344MB <MAXTOR 6L080J4 A93.0500> at ata4-master UDMA133
ad10: 78166MB <Maxtor 6Y080P0 YAR41BW0> at ata5-master UDMA133
ad11: 156334MB <Maxtor 6Y160P0 YAR41BW0> at ata5-slave UDMA133
ad12: 194481MB <Maxtor 6B200P0 BAH41BM0> at ata6-master UDMA133
ad14: 239372MB <Maxtor 6Y250P0 YAR41BW0> at ata7-master UDMA133
cd0 at ata1 bus 0 target 1 lun 0
cd0: <LITE-ON DVDRW SOHW-1693S KS04> Removable CD-ROM SCSI-0 device 
cd0: 33.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
Trying to mount root from ufs:/dev/ad0s1a


More information about the freebsd-questions mailing list