The previous change was not complete. /brick me

This commit is contained in:
mycroft 2004-07-16 20:08:23 +00:00
parent c351eda960
commit 68e6b1d115
1 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: uaudio.c,v 1.75 2004/07/09 18:08:00 mycroft Exp $ */
/* $NetBSD: uaudio.c,v 1.76 2004/07/16 20:08:23 mycroft Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.75 2004/07/09 18:08:00 mycroft Exp $");
__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.76 2004/07/16 20:08:23 mycroft Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -2368,9 +2368,13 @@ uaudio_set_params(void *addr, int setmode, int usemode,
if ((usemode & AUMODE_RECORD) && sc->sc_recchan.altidx != -1)
sc->sc_alts[sc->sc_recchan.altidx].sc_busy = 0;
/* Some uaudio devices are unidirectional. Don't try to find a
matching mode for the unsupported direction. */
setmode &= sc->sc_mode;
for (mode = AUMODE_RECORD; mode != -1;
mode = mode == AUMODE_RECORD ? AUMODE_PLAY : -1) {
if ((setmode & sc->sc_mode & mode) == 0)
if ((setmode & mode) == 0)
continue;
p = (mode == AUMODE_PLAY) ? play : rec;