From: Mark Spencer Date: Thu, 12 Aug 2004 03:19:19 +0000 (+0000) Subject: Fix duplex code for FreeBSD X-Git-Tag: 1.0.0~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be2d39a1a518514c493bf2f12a0db9b180012328;p=thirdparty%2Fasterisk.git Fix duplex code for FreeBSD git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3601 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_oss.c b/channels/chan_oss.c index 86370f9710..0068a0fc38 100755 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -329,7 +329,11 @@ static int setformat(void) return -1; } res = ioctl(fd, SNDCTL_DSP_SETDUPLEX, 0); - if (res >= 0) { + + /* Check to see if duplex set (FreeBSD Bug)*/ + res = ioctl(fd, SNDCTL_DSP_GETCAPS, &fmt); + + if ((fmt & DSP_CAP_DUPLEX) && !res) { if (option_verbose > 1) ast_verbose(VERBOSE_PREFIX_2 "Console is full duplex\n"); full_duplex = -1;