summaryrefslogtreecommitdiffstats
path: root/sys/modules/sound
diff options
context:
space:
mode:
authorariff <ariff@FreeBSD.org>2007-05-31 18:43:33 +0000
committerariff <ariff@FreeBSD.org>2007-05-31 18:43:33 +0000
commite12a0ce02fe36373a2610fcdbf80521f4613b504 (patch)
tree0e66ac1b27ea2f1691da1ea5b896b26f55d8b668 /sys/modules/sound
parent1469bf4a20a4d63ca2b38ad1eb3a7ebeb2c60a66 (diff)
downloadFreeBSD-src-e12a0ce02fe36373a2610fcdbf80521f4613b504.zip
FreeBSD-src-e12a0ce02fe36373a2610fcdbf80521f4613b504.tar.gz
Last major commit and updates for RELENG_7:
- Rework the entire pcm_channel structure: * Remove rarely used link placeholder, instead, make each pcm_channel as head/link of each own/each other. Unlock - Lock sequence due to sleep malloc has been reduced. * Implement "busy" queue which will contain list of busy/active channels. This greatly reduce locking contention for example while servicing interrupt for hardware with many channels or when virtual channels reach its 256 peak channels. - So I heard you like v chan ... O RLY? Welcome to Virtual **Record** Channels (vrec, rec vchans, vchans for recording, Rec-Chan, you decide), the ultimate solutions for your nagging O_RDWR full-duplex wannabe (note: flash plugins) monopolizing single record channel causing EBUSY. Vrec works exactly like Vchans (or, should I rename it to "Vplay" :) , except that it operates on the opposite direction (recording). Up to 256 vrecs (like vchans) are possible. Notes: * Relocate dev.pcm.%d.{vchans,vchanformat,vchanrate} to each of its respective node/direction: dev.pcm.%d.play.* for "play" (cdev = dsp%d.vp%d) dev.pcm.%d.rec.* for "record" (cdev = dsp%d.vr%d) * Don't expect that it will magically give you ability to split "recording source" (eg: 1 channel for cdrom, 1 channel for mic, etc). Just admit that you only have a *single* recording source / channel. Please bug your hardware vendor instead :) - Bump maxautovchans from 4 to 16. For a full-fledged multimedia desktop/workstation with too many soundservers installed (esound, artsd, jackd, pulse/polypaudio, ding-dong pling plong mudkip fuh fuh, etc), 4 seems inadequate. There will be no memory penalty here, since virtual channels are allocate only by demand. - Nuke/Rework the entire statically created cdev entries. Everything is clonable through snd own clone manager which designed to withstand many kind of abusive devfs droids such as: * while : ; do /bin/test -e /dev/dsp ; done * jot 16777216 0 | while read x ; do ls /dev/dsp0.$x ; done * hundreds (could be thousands) concurrent threads/process opening "/dev/dsp" (previously, this might result EBUSY even with just 3 contesting threads/procs). o Reusable clone objects (instead of creating new one like there's no tomorrow) after certain expiration deadline. The clone allocator will decide whether to reuse, share, or creating new clone. o Automatic garbage collector. - Dynamic unit magic allocator. Maximum attached soundcards can be tuned using tunable "hw.snd.maxunit" (Default to 512). Minimum is 16, and maximum is 2048. - ..other fixes, mostly related to concurrency issues. joel@ will do the manpage updates on sound(4). Have fun.
Diffstat (limited to 'sys/modules/sound')
-rw-r--r--sys/modules/sound/sound/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/modules/sound/sound/Makefile b/sys/modules/sound/sound/Makefile
index 5b96cb4..adfd36b 100644
--- a/sys/modules/sound/sound/Makefile
+++ b/sys/modules/sound/sound/Makefile
@@ -1,5 +1,6 @@
# $FreeBSD$
+.PATH: ${.CURDIR}/../../../dev/sound
.PATH: ${.CURDIR}/../../../dev/sound/pcm
.PATH: ${.CURDIR}/../../../dev/sound/midi
.PATH: ${.CURDIR}/../../../dev/sound/isa
@@ -10,9 +11,9 @@ SRCS+= ac97_if.h channel_if.h feeder_if.h mixer_if.h
SRCS+= ac97_if.c channel_if.c feeder_if.c mixer_if.c
SRCS+= mpu_if.h mpufoi_if.h synth_if.h
SRCS+= mpu_if.c mpufoi_if.c synth_if.c
-SRCS+= ac97.c ac97_patch.c buffer.c channel.c dsp.c
+SRCS+= ac97.c ac97_patch.c buffer.c channel.c clone.c dsp.c
SRCS+= fake.c feeder.c feeder_fmt.c feeder_rate.c feeder_volume.c
-SRCS+= mixer.c sndstat.c sound.c vchan.c
+SRCS+= mixer.c sndstat.c sound.c unit.c vchan.c
SRCS+= midi.c mpu401.c sequencer.c
EXPORT_SYMS= YES # XXX evaluate
OpenPOWER on IntegriCloud