FreeBSD sound distortion problems with SB Live! fixed with PREEMPTION

Jon Noack noackjr at alumni.rice.edu
Mon Dec 13 11:27:51 PST 2004


Thomas-Martin Seck wrote:
> * Doug White <dwhite at gumbysoft.com>:
>
>> I purchased a SBLive 5.1 and ran tests with it in a Dell PowerEdge 1750
>> (2x2.4GHz Xeon) the last time we had complaints about sound jitteryness
>> and I wasn't able to reproduce it, even with heavy buildworld load.
>> Guess its time to pull the card out and give it another try (after I
>> just
>> pulled it out of the machine yesterday...)
>
> Do add another datapoint here:
>
> Playing an mp3 with mpg321 from the console while doing a 'make extract'
> or even 'make clean' in www/firefox is sufficient for reproducing the
> sound related issues here.  (This is pIII-550 with a Soundblaster card
> (ES137x driver), 4BSD scheduler and an IDE disk on a Promise PDC20268
> UDMA100 controller).  With PREEMPTION enabled, the playback is slowed
> down noticeably, pops and clicks are rare, though. Without PREEMPTION
> enabled, mp3 output was severely distorted even when not much system
> activity happened beyond running mpg321.

Try my es137x patch:
http://www.noacks.org/freebsd/es137x.diff

Among other things, it incorporates:
 * Locking and INTR_MPSAFE (PR kern/59349)
 * S/PDIF output (PR kern/68594)

Note that I modified the locking from kern/59349 to include a snd_mtxfree.
 I also cleaned it up a bit.  I got a review on the S/PDIF stuff, but the
locking probably needs a good once-over.  In any case, I've been running
this patch in various forms since February with no problems.  I used to
have the behavior you're describing, but haven't seen it since PREEMPTION
started working again with SCHED_4BSD a while back (before 5.3,
certainly).

Jon



More information about the freebsd-current mailing list