From owner-freebsd-multimedia Tue Apr 25 10: 2:54 2000 Delivered-To: freebsd-multimedia@freebsd.org Received: from cis.ohio-state.edu (mail.cis.ohio-state.edu [164.107.115.5]) by hub.freebsd.org (Postfix) with ESMTP id 060D237C022 for ; Tue, 25 Apr 2000 10:02:46 -0700 (PDT) (envelope-from matey@cis.ohio-state.edu) Received: from delta.cis.ohio-state.edu (matey@delta.cis.ohio-state.edu [164.107.112.9]) by cis.ohio-state.edu (8.9.1/8.9.1) with ESMTP id NAA01691; Tue, 25 Apr 2000 13:02:44 -0400 (EDT) Received: (from matey@localhost) by delta.cis.ohio-state.edu (8.9.1/8.9.1) id NAA21739; Tue, 25 Apr 2000 13:02:43 -0400 (EDT) Date: Tue, 25 Apr 2000 13:02:15 -0400 From: Alexander Matey To: Cameron Grant 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> References: <200004231809.LAA27975@freefall.freebsd.org> <39055176.25A5AE68@altavista.net> <20000425113209.A33037@cis.ohio-state.edu> <000701bfaed3$216da6f0$0304020a@NENYA> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <000701bfaed3$216da6f0$0304020a@NENYA>; from gandalf@vilnya.demon.co.uk on Tue, Apr 25, 2000 at 05:27:20PM +0100 Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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