XMMS & other sound troubles with 5.3-RELEASE

Rick C. Petty rick at megan.kiwi-computer.com
Tue Nov 16 08:34:32 PST 2004


I am having troubles with 5.3's sound drivers.  Once in awhile I'll have
popping noises when some programs are using sound, although I have been
unable to repeat anything reliabliy.  However, I can repeatably lock up
XMMS (and thus holding /dev/dsp open, preventing others from playing
sound) if I (1) pause playback and then (2) hit stop.  I'm using the
built-in OSS driver (1.2.10 libOSS.so) with no other plugins enabled.
Under heavy load, music skips significantly.  I've tried messing with
hw.snd.targetirqrate, but that didn't seem to help.

What's very strange is that I am using the exact same setup as I was under
5.1-p19, same config files (incl. the kernel config).  I was expecting a
smooth transition, but it seems like sound is being problematic for me.

I've also noticed audio lag in certain programs (notorious ones such as
linux-flashplugin*, others under the linux ABI, and many games).  This was
a problem back in 5.1, but since I'm emailing I thought I'd ask a related
question:  How would one go about fixing this audio lag?  I've tried tuning
hw.snd.targetirqrate up to 256 but that just makes xmms skip more often and
doesn't fix the lag in other programs.  I've even gone through the effort
of changing buffer sizes, etc. and recompiling the laggy programs, but many
programs still are about 0.3-1.0 seconds behind (ave: 0.5s).  Take
games/heretic for instance..  Back in the 5.0-RELEASE timeframe, there was
zero audio lag, and around 5.1 to 5.2.1 sound was completely broken..  now
with 5.3-R it's lagging 0.5s on the default build.  Any suggestions???

I did not install the xmms package(s) but built everything from scratch.
I doubt there's anything strange in my kernel config, since it's mostly
GENERIC with items removed that exist as KLDs...

# uname -a
FreeBSD kayla.kiwi-computer.com 5.3-RELEASE FreeBSD 5.3-RELEASE #3: Sun Nov
14 17:43:28 EST 2004
root at kayla.kiwi-computer.com:/usr/src/sys/i386/compile/KAYLA  i386

# kldstat
Id Refs Address    Size     Name
 1   58 0xc0400000 3061d8   kernel
...
 6    2 0xc074e000 1d4fc    sound.ko
 7    1 0xc076c000 5844     snd_ich.ko

# sysctl -a | grep snd
hw.snd.targetirqrate: 32
hw.snd.report_soft_formats: 1
hw.snd.verbose: 2
hw.snd.unit: 0
hw.snd.maxautovchans: 0
hw.snd.pcm0.buffersize: 16384
hw.snd.pcm0.vchans: 0
hw.snd.pcm0.ac97rate: 48000

# cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <nVidia nForce2> at io 0xd000, 0xd400 irq 21 bufsz 16384 kld snd_ich
(1p/1r/0v channels duplex default)
        [pcm0:play:0]: spd 44100, fmt 0x10000010, flags 0x00003030,
0x00000000, pid 76910
        interrupts 3655, underruns 0, ready 131072
        {userland} -> feeder_root(0x10000010) -> {hardware}
        [pcm0:record:0]: spd 8000, fmt 0x00000008/0x10000010, flags
0x00004000, 0x00000000
        interrupts 0, overruns 0, hfree 16384, sfree 131072
        {hardware} -> feeder_root(0x10000010) -> feeder_sign16le(0x10000010
-> 0x10000080) -> feeder_stereotomono16(0x10000080 -> 0x00000080) ->
feeder_16leto8(0x00000080 -> 0x00000008) -> {userland}

-- Rick C. Petty


More information about the freebsd-multimedia mailing list