Date: Fri, 25 Jul 1997 01:41:57 -0700 From: Amancio Hasty <hasty@rah.star-gate.com> To: Anthony.Kimball@East.Sun.COM Cc: brianc@pobox.com, freebsd-multimedia@FreeBSD.ORG Subject: Re: sb16 request Message-ID: <199707250841.BAA19430@rah.star-gate.com> In-Reply-To: Your message of "Fri, 25 Jul 1997 02:34:03 CDT." <199707250734.CAA03326@compound.east.sun.com>
next in thread | previous in thread | raw e-mail | index | archive | help
We have full duplex capability for symetric channels . A bit of programming must be done to support 16 bit one way and 8 bit the other way. The defined formats are: # define AFMT_QUERY 0x00000000 /* Return current fmt */ # define AFMT_MU_LAW 0x00000001 # define AFMT_A_LAW 0x00000002 # define AFMT_IMA_ADPCM 0x00000004 # define AFMT_U8 0x00000008 # define AFMT_S16_LE 0x00000010 /* Little endian signed 16*/ # define AFMT_S16_BE 0x00000020 /* Big endian signed 16 */ # define AFMT_S8 0x00000040 # define AFMT_U16_LE 0x00000080 /* Little endian U16 */ # define AFMT_U16_BE 0x00000100 /* Big endian U16 */ # define AFMT_MPEG 0x00000200 /* MPEG (2) audio */ # We can use IOCTL SNDCTL_DSP_SAMPLESIZE to set the input, output or both channels . Given that the input argument for SNDCTL_DSP_SAMPLESIZE is an "int" we have enough room to specify both input and output channels. The SB module will have to be tweaked a little bit to support full duplex and the audio module (audio.c) will have to be modify to support translation from 8 to 16 bit or vice-versa as for the rest of the sound driver it already supports full duplex dma operations and is currently being used for cards such as the gus pnp or audiotrix pro. The other stumbling block for the SB cards is the accuracy of its clock for audio conferencing tools such as vat which depend on the sound card to derive its timing information . I guess we will have to wait till we have full duplex capability to find out if the more recent versions of the SB cards have a decent clock on them or not. It will not surprise if their clock nowdays is better given that Microsoft is recommending high accuracy clocks for sound cards . Enjoy, Amancio >From The Desk Of Tony Kimball : > Quoth Brian Campbell on Fri, 25 July: > : ...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 would prefer, as Randall Hopper's post suggested, to think of the > ioctl as changing the data stream from 8-bit to 16-bit. Let the > driver interface abstract away from the hardware. When only 8-bit is > supported in hardware, extend it. When only 16-bit is supported in > hardware, round it. > > When two descriptors are being used, there is no ambiguity, and > the programmer has perfect control. If Luigi does produce a driver > which supports two descriptors, this resolves the problem of > which channel to allocate, for the programmer can issue the ioctls > to each descriptor independently. > > I think the only way to provide the ability to control the allocation, > i.e. to change it from default, in the single-descriptor interface is > to extend the interface. That would be nice, but I think that having > a duplex capability is the first step: I shan't worry about getting > desert until the entre is on the table. > > > > > > > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707250841.BAA19430>