Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jul 1997 00:13:44 -0400
From:      Brian Campbell <brianc@pobox.com>
To:        freebsd-multimedia@FreeBSD.ORG
Subject:   Re: sb16 request
Message-ID:  <19970725001344.59756@pobox.com>
In-Reply-To: <199707242357.QAA16379@rah.star-gate.com>; from Amancio Hasty on Thu, Jul 24, 1997 at 04:57:32PM -0700
References:  <19970724185907.39493@pobox.com> <199707242357.QAA16379@rah.star-gate.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 24, 1997 at 04:57:32PM -0700, Amancio Hasty wrote:
> Currently on 3.5 based sound drivers , only one descriptor is used
> for read and write and I want to keep it that way given that most
> decent api's already support that mechanism --- sun and sgi . 

While I suppose the application can carefully interleave its reads
and writes, it would seem to be more "full duplex" if one application
could be reading while another is writing.  I'm hoping the O_RDWR
case doesn't preclude the read-only + write-only case.

> There is an ioctl to specify the number of bits perhaps it will be
> just as easy to extend it to support both read and write channels
> sample size . If I am not mistaken the current mechanism only uses
> a byte to specify 8 or 16 so a simple extension could be to specify
> the read channel bit size on the second half of the word. If not
> then the default should be that it applies to both read and write
> if the card supports full duplex operation;otherwise, it should 
> only apply to the the read or write channel.

I agree that if the card supports 16-bit playback and record
simultaneously that specifying 16-bit sample size could apply to
both.  However, in the case of the SB16, the ioctl would have to
fail.  Or claim success and not actually change the sample size of
either the record/playback channel.  The question would then be,
which channel actually got changed?

I'd say if you open the device read/write then setting the sample
size to 16-bit is ambiguous and should fail unless both the read/write
directions support 16-bit simultaneously.  If you want to mix 16-bit
with 8-bit you can open the device twice.



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