let artsd work in full-duplex mode by explicitly configuring the audio

layer for full-duplex

please make sure your base system is up-to-date before enabling
full-duplex in artsd in your local configuration

ok brad@
This commit is contained in:
jakemsr 2007-10-08 01:37:15 +00:00
parent d1f5a78a9f
commit 987fa0b836
2 changed files with 26 additions and 2 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.61 2007/09/15 20:04:21 merdely Exp $
# $OpenBSD: Makefile,v 1.62 2007/10/08 01:37:15 jakemsr Exp $
COMMENT= K Desktop Environment, aRTs
CATEGORIES= x11 x11/kde
VERSION= 3.5.7
DISTNAME= arts-1.5.7
MODKDE_VERSION?= 3.5.7
PKGNAME= ${DISTNAME}
PKGNAME= ${DISTNAME}p0
SHARED_LIBS += mcop 2.0 # .1.0
SHARED_LIBS += artsflow_idl 2.0 # .1.0

View File

@ -0,0 +1,24 @@
$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)