Date: Thu, 16 Mar 2006 17:19:05 +0800 From: Ariff Abdullah <ariff@FreeBSD.org> To: Mark Kane <mark@mkproductions.org> Cc: freebsd-questions@FreeBSD.org Subject: Re: Sound Crackling When Reading From Hard Drives Message-ID: <20060316171905.2d3029bf.ariff@FreeBSD.org> In-Reply-To: <44192538.80102@mkproductions.org> References: <44192538.80102@mkproductions.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Signature=_Thu__16_Mar_2006_17_19_05_+0800_=fPHTFd4eE+EBstl Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, 16 Mar 2006 02:43:36 -0600 Mark Kane <mark@mkproductions.org> wrote: > Hi everyone. I have been experiencing problems with sound crackling=20 > 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. >=20 > 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) >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > I have no special options enabled in my kernel now except for the=20 > emu_10k1 driver and atapicam. >=20 > Here is a sample of the crackling when doing some of the below copy=20 > 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). >=20 > http://www.tntpowerhost.com/mixx941/FreeBSD_sound_crackling.ogg >=20 > 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. >=20 > 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? >=20 > Any suggestions would be much appreciated. >=20 > Thanks! Try to increase pcm buffersize either using kenv(1) or /boot/device.hints. # Start from 8192, 16384, 32768, 65536 # kenv hint.pcm.0.buffersize=3D8192 or to make it permanent, put that into /boot/device.hints Reload your sound driver. >=20 > -Mark >=20 > FreeBSD amd64.localhost 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #8: > Wed Mar 15 12:04:40 CST 2006=20 > mixx941@amd64.localhost:/usr/obj/usr/src/sys/AMD643000 amd64 >=20 > [mixx941@amd64:~]% cat /dev/sndstat > FreeBSD Audio Driver (newpcm) > Installed devices: > pcm0: <Creative Audigy 2 (EMU10K2)> at io 0x9400 irq 17 (8p/2r/0v=20 > channels duplex default) >=20 >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > COPY TESTS: >=20 > 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 >=20 > /dev/ad0 (200GB Maxtor on Onboard IDE): > ad0 -> ad10 =3D Clean > ad0 -> ad12 =3D Clean > ad0 -> ad14 =3D Clean >=20 > /dev/ad8 (80GB Maxtor on Promise card): > ad8 -> ad10 =3D Heavy Crackling > ad8 -> ad12 =3D Slight Crackling > ad8 -> ad14 =3D Slight Crackling >=20 > /dev/ad10 (80GB Maxtor on Promise card): > ad10 -> ad8 =3D Slight Crackling > ad10 -> ad0 =3D Slight Crackling >=20 > /dev/ad11 (160GB Maxtor on Promise card)): > ad11 -> ad14 =3D Very Slight Crackling and much faster copy time than > rest >=20 > /dev/ad12 (200GB Maxtor on Onboard IDE): > ad12 -> ad0 =3D Heavy Crackling > ad12 -> ad8 =3D Heavy Crackling >=20 > /dev/ad14 (250GB Maxtor on Onboard IDE): > ad14 -> ad0 =3D Heavy Crackling > ad14 -> ad8 =3D Heavy Crackling > ad14 -> ad11 =3D Heavy Crackling and music stopped playing for a few=20 > seconds (music file being played back is on ad10) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > --=20 > GnuPG Public Key: > http://www.mkproductions.org/mk_pubkey.asc >=20 > Internet Radio: > Party107 (Trance/Electronic) - http://www.party107.com > Rock 101.9 The Edge (Rock) - http://www.rock1019.net >=20 > IRC: > MIXXnet IRC Network - irc.mixxnet.net (Nick: MIXX941) >=20 -- Ariff Abdullah FreeBSD --Signature=_Thu__16_Mar_2006_17_19_05_+0800_=fPHTFd4eE+EBstl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFEGS2Llr+deMUwTNoRAu0jAJ9ecNMHz4KyFmRNM9nQkktsJqCMpACZAVP+ hCMgoXqFmJrjf4Bq4GxaSB4= =/rtt -----END PGP SIGNATURE----- --Signature=_Thu__16_Mar_2006_17_19_05_+0800_=fPHTFd4eE+EBstl--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060316171905.2d3029bf.ariff>