More buzzing fun with snd_emu10kx - but now with more determinism!

Mario Sergio Fujikawa Ferreira lioux at FreeBSD.org
Fri Oct 1 19:14:29 UTC 2010


Hi,

Quoting Garrett Cooper <yanegomi at gmail.com>:

>     Getting back to the thread I brought up before (with my now dead
> email address):
> http://unix.derkeiler.com/Mailing-Lists/FreeBSD/stable/2010-06/msg00036.html
> , I now have a more deterministic testcase for this issue.
>     The problem appears to be with vchan-related code. If I start up
> 4+ applications on my machine that access the audio device, all goes
> wonky on the 4+ allocation (I was stress testing the nvidia driver to
> see whether or not it'd break with multiple instances of vlc, and
> stumbled on this by accident). So pushing the number of consumers of
> the audio subsystem forces a breakdown somewhere (even though the
> number of available hardware vchans is set to 16).
>     I'll continue to look into this further as time permits.

   I can reproduce this easily. After every reboot, I can only get a  
buzzing sound.

   I have to try

# kldunload snd_emu10kx && kldload snd_emu10kx && mpg123 sound_test.mp3

about 30 times before I can get anything other than a buzzing sound.  
No applications opened. I run the test from the tty console until it  
works. However, the buzz returns if I kldunload->kldload again.

   Furthermore, I can attest that this is somewhat related to vchan  
code since I can only use 1 audio-related application at a time after  
I get the sound back. If I am using mplayer, kde produces buzz if it  
sends me an alert. Vice versa is also true.

   Even 2 concurrent mpg123 can cause it.

   Let me know if there is any information I can provide to help track  
this down.

   Regards,

$ sysctl hw.snd
hw.snd.report_soft_formats: 1
hw.snd.report_soft_matrix: 1
hw.snd.latency: 5
hw.snd.latency_profile: 1
hw.snd.vpc_autoreset: 1
hw.snd.vpc_0db: 45
hw.snd.vpc_reset: 0
hw.snd.compat_linux_mmap: 0
hw.snd.feeder_eq_presets:  
PEQ:16000,0,2500,62,0,2500:-9,9,1,0:44100,48000,88200,96000,176400,192000
hw.snd.feeder_eq_exact_rate: 0
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_quality: 1
hw.snd.vpc_mixer_bypass: 1
hw.snd.verbose: 0
hw.snd.default_auto: 0
hw.snd.version: 2009061500/amd64
hw.snd.default_unit: 0
hw.snd.maxautovchans: 16

$ sysctl dev.pcm
dev.pcm.0.%desc: EMU10Kx DSP front PCM interface
dev.pcm.0.%driver: pcm
dev.pcm.0.%parent: emu10kx0
dev.pcm.0.eapd: 1
dev.pcm.0.play.vchans: 1
dev.pcm.0.play.vchanmode: fixed
dev.pcm.0.play.vchanrate: 48000
dev.pcm.0.play.vchanformat: s16le:2.0
dev.pcm.0.rec.vchans: 1
dev.pcm.0.rec.vchanmode: fixed
dev.pcm.0.rec.vchanrate: 48000
dev.pcm.0.rec.vchanformat: s16le:2.0
dev.pcm.0.buffersize: 65536
dev.pcm.0.bitperfect: 0
dev.pcm.1.%desc: EMU10Kx DSP rear PCM interface
dev.pcm.1.%driver: pcm
dev.pcm.1.%parent: emu10kx0
dev.pcm.1.play.vchans: 1
dev.pcm.1.play.vchanmode: fixed
dev.pcm.1.play.vchanrate: 48000
dev.pcm.1.play.vchanformat: s16le:2.0
dev.pcm.1.buffersize: 65536
dev.pcm.1.bitperfect: 0
dev.pcm.2.%desc: EMU10Kx DSP center PCM interface
dev.pcm.2.%driver: pcm
dev.pcm.2.%parent: emu10kx0
dev.pcm.2.play.vchans: 1
dev.pcm.2.play.vchanmode: fixed
dev.pcm.2.play.vchanrate: 48000
dev.pcm.2.play.vchanformat: s16le:2.0
dev.pcm.2.buffersize: 65536
dev.pcm.2.bitperfect: 0
dev.pcm.3.%desc: EMU10Kx DSP subwoofer PCM interface
dev.pcm.3.%driver: pcm
dev.pcm.3.%parent: emu10kx0
dev.pcm.3.play.vchans: 1
dev.pcm.3.play.vchanmode: fixed
dev.pcm.3.play.vchanrate: 48000
dev.pcm.3.play.vchanformat: s16le:2.0
dev.pcm.3.buffersize: 65536
dev.pcm.3.bitperfect: 0

$ grep emu10kx /var/run/dmesg.boot
emu10kx0: <Creative Audigy 2 [SB0240]> port 0xdc00-0xdc3f irq 18 at  
device 8.0 on pci2
emu10kx0: [ITHREAD]
pcm0: <EMU10Kx DSP front PCM interface> on emu10kx0
pcm1: <EMU10Kx DSP rear PCM interface> on emu10kx0
pcm2: <EMU10Kx DSP center PCM interface> on emu10kx0
pcm3: <EMU10Kx DSP subwoofer PCM interface> on emu10kx0

$ uname -a
FreeBSD here 8.1-STABLE FreeBSD 8.1-STABLE #28: Thu Sep 23 03:06:22  
BRT 2010     lioux at here:/usr/obj/usr/src/sys/LIOUX  amd64

-- 
Mario S F Ferreira - DF - Brazil - "I guess this is a signature."
feature, n: a documented bug | bug, n: an undocumented feature


More information about the freebsd-multimedia mailing list