Module Name:    src
Committed By:   isaki
Date:           Thu Jun  6 13:08:30 UTC 2019

Modified Files:
        src/sys/dev/audio: audio.c

Log Message:
Revert rev1.7.
Don't take care of incorrect drivers.  They should be fixed.
PR kern/54264.  OK'ed by nakayama@-san.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/audio/audio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.10 src/sys/dev/audio/audio.c:1.11
--- src/sys/dev/audio/audio.c:1.10	Sat May 25 02:42:03 2019
+++ src/sys/dev/audio/audio.c	Thu Jun  6 13:08:30 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.10 2019/05/25 02:42:03 isaki Exp $	*/
+/*	$NetBSD: audio.c,v 1.11 2019/06/06 13:08:30 isaki Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,7 +142,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.10 2019/05/25 02:42:03 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.11 2019/06/06 13:08:30 isaki Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -1933,17 +1933,12 @@ audio_open(dev_t dev, struct audio_softc
 			 * hw_if->open() is always (FREAD | FWRITE)
 			 * regardless of this open()'s flags.
 			 * see also dev/isa/aria.c
-			 * but ckeck its playback or recording capability.
 			 * On half duplex hardware, the flags passed to
 			 * hw_if->open() is either FREAD or FWRITE.
 			 * see also arch/evbarm/mini2440/audio_mini2440.c
 			 */
 			if (fullduplex) {
 				hwflags = FREAD | FWRITE;
-				if (!audio_can_playback(sc))
-					hwflags &= ~FWRITE;
-				if (!audio_can_capture(sc))
-					hwflags &= ~FREAD;
 			} else {
 				/* Construct hwflags from af->mode. */
 				hwflags = 0;

Reply via email to