Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 2000 14:39:57 +0100
From:      Orion Hodson <O.Hodson@cs.ucl.ac.uk>
To:        Anton Voronin <anton@urc.ac.ru>
Cc:        multimedia@freebsd.org, rat-trap@cs.ucl.ac.uk
Subject:   Re: pcm & full-duplex
Message-ID:  <2641.969025197@cs.ucl.ac.uk>
In-Reply-To: Your message of "Fri, 15 Sep 2000 18:30:24 %2B0600." <39C2165F.28CBAFBE@urc.ac.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
<39C2165F.28CBAFBE@urc.ac.ru>Anton Voronin writes:
> Hi all,
> I just wish to ask, is it a bug or an intended behaviour of ioctl's
> SNDCTL_DSP_GETCAPS command, that it reports full-duplex capability only when
> applied to file descriptor opened with O_RDWR but not with O_RDONLY? 

This sounds like the right behaviour - the device is in half duplex
mode so the current capability is half duplex.  It's not going to
become full duplex without being re-opened. 

> Some applications (like rat) check for full-duplex using O_RDONLY,
> and so fail to operate with it...

I'm not sure if other applications open O_RDONLY and check for full
duplex with SNDCTL_DSP_GETCAPS, but AFAIK rat on FreeBSD never has in
the "full duplex only" versions (3.2 onwards).  However, there is a
problem with older rat versions and newpcm.  

There was a time with the previous pcm driver when some half duplex
cards successfully opened O_RDWR, so an AIOGCAP call with
AFMT_FULLDUPLEX check was necessary to determine if the card really
was full duplex.  Under newpcm open O_RDWR fails for half duplex
cards.  However, the use of AFMT_FULLDUPLEX is deprecated (or
forgotten) under newpcm so applications using this test fail to
realize the device is full duplex, e.g. rat.

The current rat source code probes for which pcm is present and acts
accordingly.  The current ports version of rat needs updating to
reflect the changes as does the rat web page.  We'll try to do this
soon.

- Orion.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2641.969025197>