From 339a4ba4db5f924375d3e3cf55122ce5ab144a75 Mon Sep 17 00:00:00 2001 From: green Date: Sun, 23 Feb 2003 20:49:45 +0000 Subject: It seems that sound(4)'s feeder routines don't need to allocate memory without waiting, since they are called from a system-call context only. This appears to fix all sorts of problems with open("/dev/dsp", O_WRONLY) randomly returning ENXIO. Found by: cognet --- sys/dev/sound/pcm/feeder_rate.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'sys/dev/sound/pcm/feeder_rate.c') diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index 92454c9..4dfff2e 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -249,10 +249,7 @@ feed_rate_init(struct pcm_feeder *f) { struct feed_rate_info *info; - info = malloc(sizeof(*info), M_RATEFEEDER, M_NOWAIT | M_ZERO); - if (info == NULL) - return ENOMEM; - + info = malloc(sizeof(*info), M_RATEFEEDER, M_WAITOK | M_ZERO); info->src = DSP_DEFAULT_SPEED; info->dst = DSP_DEFAULT_SPEED; info->channels = 2; -- cgit v1.1