From cbfac6596e638cd27bccfe4cb04bfa891b19cc7c Mon Sep 17 00:00:00 2001 From: mycroft Date: Mon, 24 Dec 2001 00:10:46 +0000 Subject: [PATCH] Make SNDCTL_DSP_POST a nop. It's explicitly *not* supposed to sleep, and as it's merely advisory (and in fact is implemented as a nop in the OSS->ALSA shim), it should be safe to ignore it. --- lib/libossaudio/ossaudio.c | 6 ++++-- sys/compat/ossaudio/ossaudio.c | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/libossaudio/ossaudio.c b/lib/libossaudio/ossaudio.c index 964479693dca..b0c62ce503f2 100644 --- a/lib/libossaudio/ossaudio.c +++ b/lib/libossaudio/ossaudio.c @@ -1,4 +1,4 @@ -/* $NetBSD: ossaudio.c,v 1.15 2001/07/08 22:30:15 kim Exp $ */ +/* $NetBSD: ossaudio.c,v 1.16 2001/12/24 00:10:46 mycroft Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -100,11 +100,13 @@ audio_ioctl(int fd, unsigned long com, void *argp) return retval; break; case SNDCTL_DSP_SYNC: - case SNDCTL_DSP_POST: retval = ioctl(fd, AUDIO_DRAIN, 0); if (retval < 0) return retval; break; + case SNDCTL_DSP_POST: + /* This call is merely advisory, and may be a nop. */ + break; case SNDCTL_DSP_SPEED: AUDIO_INITINFO(&tmpinfo); tmpinfo.play.sample_rate = diff --git a/sys/compat/ossaudio/ossaudio.c b/sys/compat/ossaudio/ossaudio.c index 7e35bc5aeb09..bac37be32a19 100644 --- a/sys/compat/ossaudio/ossaudio.c +++ b/sys/compat/ossaudio/ossaudio.c @@ -1,4 +1,4 @@ -/* $NetBSD: ossaudio.c,v 1.38 2001/11/13 02:09:17 lukem Exp $ */ +/* $NetBSD: ossaudio.c,v 1.39 2001/12/24 00:10:49 mycroft Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.38 2001/11/13 02:09:17 lukem Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.39 2001/12/24 00:10:49 mycroft Exp $"); #include #include @@ -118,11 +118,13 @@ oss_ioctl_audio(p, uap, retval) goto out; break; case OSS_SNDCTL_DSP_SYNC: - case OSS_SNDCTL_DSP_POST: error = ioctlf(fp, AUDIO_DRAIN, (caddr_t)0, p); if (error) goto out; break; + case OSS_SNDCTL_DSP_POST: + /* This call is merely advisory, and may be a nop. */ + break; case OSS_SNDCTL_DSP_SPEED: AUDIO_INITINFO(&tmpinfo); error = copyin(SCARG(uap, data), &idat, sizeof idat);