Date: Mon, 12 Jul 2004 10:37:30 +0200 From: Alexander Leidinger <Alexander@Leidinger.net> To: Bruce M Simpson <bms@spc.org> Cc: current@freebsd.org Subject: Re: full duplex sound card dirve 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 11 Jul 2004 18:25:03 +0100
Bruce M Simpson <bms@spc.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040712103730.16ec14cd>
