$OpenBSD: patch-flow_audioiooss_cc,v 1.1 2007/10/08 01:37:15 jakemsr Exp $
--- flow/audioiooss.cc.orig	Thu Sep 27 22:09:15 2007
+++ flow/audioiooss.cc	Thu Sep 27 22:25:52 2007
@@ -185,6 +185,20 @@ bool AudioIOOSS::open()
 	artsdebug("device capabilities: revision%d %s",
 					device_caps & DSP_CAP_REVISION, caps.c_str());
 
+	if((param(direction) == 3) && (device_caps & DSP_CAP_DUPLEX))
+	{
+		int duplex = 1;
+		if(ioctl(audio_fd,SNDCTL_DSP_SETDUPLEX,&duplex) == -1)
+		{
+			_error = "SNDCTL_DSP_SETDUPLEX failed - ";
+			_error += strerror(errno);
+
+			close();
+			return false;
+		}
+
+	}
+
 	int requestedFormat = (_format == 8)?AFMT_U8:AFMT_S16_LE;
 	int gotFormat = requestedFormat;
 	if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &gotFormat)==-1)  
