Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Apr 2000 13:02:15 -0400
From:      Alexander Matey <matey@cis.ohio-state.edu>
To:        Cameron Grant <gandalf@vilnya.demon.co.uk>
Cc:        freebsd-multimedia@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/dev/sound/pcm channel.c channel.h dsp.c
Message-ID:  <20000425130215.A60758@cis.ohio-state.edu>
In-Reply-To: <000701bfaed3$216da6f0$0304020a@NENYA>; from gandalf@vilnya.demon.co.uk on Tue, Apr 25, 2000 at 05:27:20PM %2B0100
References:  <200004231809.LAA27975@freefall.freebsd.org> <kq8zy2lije.fsf@cip12.melaten.rwth-aachen.de> <39055176.25A5AE68@altavista.net> <20000425113209.A33037@cis.ohio-state.edu> <000701bfaed3$216da6f0$0304020a@NENYA>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello,

On Tue, Apr 25, 2000 at 05:27:20PM +0100, Cameron Grant wrote:
> the t4dwave driver is intended to provide up to 64 channels of output, but
> this functionality is incomplete and not intended until we have a fully
> functional devfs and/or support returning cookies from device open() calls.

Cameron, I don't see why you oppose the idea of fixing PCMMKMINOR() and
PCMCHAN() macros in the meantime. It's not about changing the mechanism that's
already being used by sound.c. It's about making it work because right now it's 
simply _broken_. This way we can have separate [working] device node for each 
channel with a unique device minor.

As I already pointed out to you the assumption that 2nd byte of device minor 
can be safely used to store channel number is _wrong_. This is what these macros
are doing now. Because this byte is used by the kernel to store device major to
form a combined 32-bit word. You have 3rd and 4th byte to store channel number.

Even in your "PROPOSAL" in sound.c you're still planning on using 2nd byte of the 
minor to store device id and unit number while preserving 1st byte for channel
number. Again, this is not going to work since contents of the 2nd byte are 
going to be overwritten by the kernel deep inside make_dev().

It's my understanding that device cookies will allow one to open same device as 
many time as there're channels available and the pcm code will take care of mapping 
them to physical channel. But that's entirely different story that requires some 
changes to the way sound.c deals with device nodes.

Correct me if I'm wrong.

-- 
lx


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?20000425130215.A60758>