From owner-freebsd-current@FreeBSD.ORG Mon Jul 12 08:37:43 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1CA8216A4CE for ; Mon, 12 Jul 2004 08:37:43 +0000 (GMT) Received: from mailout11.sul.t-online.com (mailout11.sul.t-online.com [194.25.134.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 766E543D2F for ; Mon, 12 Jul 2004 08:37:42 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from fwd04.aul.t-online.de by mailout11.sul.t-online.com with smtp id 1BjwJg-0006dd-02; Mon, 12 Jul 2004 10:37:40 +0200 Received: from Andro-Beta.Leidinger.net (Z2j1igZJQe+9elPl2YtwXRGu-y7+58MTvH9oWLD3k4-wxCRor1FWwf@[217.83.30.91]) by fmrl04.sul.t-online.com with esmtp id 1BjwJK-0W9cZs0; Mon, 12 Jul 2004 10:37:18 +0200 Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) i6C8bIfm065136; Mon, 12 Jul 2004 10:37:18 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Mon, 12 Jul 2004 10:37:30 +0200 From: Alexander Leidinger To: Bruce M Simpson Message-Id: <20040712103730.16ec14cd@Magellan.Leidinger.net> In-Reply-To: <20040711172503.GA828@empiric.dek.spc.org> References: <200407101101.05080.rneese@adelphia.net> <20040711172503.GA828@empiric.dek.spc.org> X-Mailer: Sylpheed-Claws 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Seen: false X-ID: Z2j1igZJQe+9elPl2YtwXRGu-y7+58MTvH9oWLD3k4-wxCRor1FWwf@t-dialin.net cc: Richard Neese cc: current@freebsd.org Subject: Re: full duplex sound card dirve X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2004 08:37:43 -0000 On Sun, 11 Jul 2004 18:25:03 +0100 Bruce M Simpson wrote: > On Sat, Jul 10, 2004 at 11:01:05AM -0400, Richard Neese wrote: > > is anyone working on full duplex drivered for fbsd and soundcards. half the > > apps I use say the sound is only half duplex. like kphone wich we are > > porting and cpphone and a few other including asterisk0 pbx look at > > te sound card and report it as half duplex. > > The vast majority of the drivers we ship are full duplex, but it's possible > that the applications concerned might not be getting this information. Many > recent commits have happened in this area, particularly with regard to > Linux emulation. I've committed the SNDCTL_DSP_SETDUPLEX ioctl (including the linux emulation parts). This ioctl failed before, even if the soundcard was already in full duplex mode. A workaround for all releases upto and including 5.2.1 is to check with the SNDCTL_DSP_GETCAPS if the card already is in full duplex mode. Here's a snippet of code how to test it: ---snip--- retval = ioctl(fd, SNDCTL_DSP_GETCAPS, &val); if (-1 == retval) { perror("GETCAPS"); exit(1); } printf("duplex: "); if (FALSE == DSP_CAP_DUPLEX & val) { printf("not "); } puts("supported"); ---snip--- In FreeBSd all of the soundcards with full duplex capability will be already in full duplex mode when the dsp device gets opened. Bye, Alexander. -- I'm available to get hired (preferred in .lu). http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = C518 BC70 E67F 143F BE91 3365 79E2 9C60 B006 3FE7