From owner-freebsd-hackers Tue Apr 4 05:39:48 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id FAA11632 for hackers-outgoing; Tue, 4 Apr 1995 05:39:48 -0700 Received: from xi.dorm.umd.edu (xi.dorm.umd.edu [129.2.140.12]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id FAA11626 for ; Tue, 4 Apr 1995 05:39:46 -0700 Received: (from smpatel@localhost) by xi.dorm.umd.edu (8.6.11/8.6.9) id IAA02403; Tue, 4 Apr 1995 08:39:17 -0400 Date: Tue, 4 Apr 1995 08:39:17 -0400 (EDT) From: Sujal Patel X-Sender: smpatel@xi.dorm.umd.edu To: Steven Wallace cc: hackers@FreeBSD.org Subject: Re: Whee - I've got my MBONE feed.. In-Reply-To: <199504040742.AA15813@balboa.eng.uci.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: hackers-owner@FreeBSD.org Precedence: bulk On Tue, 4 Apr 1995, Steven Wallace wrote: > As you can see, SNDCTL_DSP_GETBLKSIZE has been changed from _IOWR to > _IOR, so old binaries compiled with _IOWR will not be able to find > the ioctl, causing the error to be displayed. You can change it > back and then recompile your kernel and the old binaries should work. > So it is SNDCTL_DSP_GETBLKSIZE that is causing you probs, not > SNDCTL_DSP_SETFRAGMENT. If you compile using a -current kernel > but still have old to compile the program, > they won't match and it will still not work. I still don't think it's working: FreeBSD ------- [smpatel:xi] [0:~]> cat test.c #include #ifdef __FreeBSD__ #include #else #include #endif main () { int blksize, frag, dsp; dsp = open ("/dev/dsp"); blksize = 0; frag = 0x00080007; ioctl(dsp, SNDCTL_DSP_SETFRAGMENT, &frag); ioctl(dsp, SNDCTL_DSP_GETBLKSIZE, &blksize); if (!blksize) printf ("Error: Couldn't Get Block Size\n"); } [smpatel:xi] [0:~]> cc test.c [smpatel:xi] [0:~]> a.out Error: Couldn't Get Block Size [smpatel:xi] [32:~]> grep BLKSIZE /usr/include/machine/soundcard.h #define SNDCTL_DSP_GETBLKSIZE _IOR('P', 4, int) #define SNDCTL_DSP_SETBLKSIZE _IOW('P', 4, int) #define SOUND_PCM_SETBLKSIZE SNDCTL_DSP_SETBLKSIZE [smpatel:xi] [0:~]> grep Id /usr/include/machine/soundcard.h * $Id: soundcard.h,v 1.12 1995/03/08 18:43:49 ugen Exp $ Linux (IOCTL should behave the same) ------------------------------------ linux:23) ~>cat test.c #include #ifdef __FreeBSD__ #include #else #include #endif main () { int blksize, frag, dsp; dsp = open ("/dev/dsp"); blksize = 0; frag = 0x00080007; ioctl(dsp, SNDCTL_DSP_SETFRAGMENT, &frag); ioctl(dsp, SNDCTL_DSP_GETBLKSIZE, &blksize); if (!blksize) printf ("Error: Couldn't Get Block Size\n"); } linux:24) ~>cc test.c linux:25) ~>a.out linux:26) ~>grep BLKSIZE /usr/src/linux/include/linux/soundcard.h #define SNDCTL_DSP_GETBLKSIZE _IOWR('P', 4, int) See anything wrong in here? Because I think that since Linux and FreeBSD use the sound driver, that the IOCTLs should behave exactly the same. Sujal