summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/pcaudio.c
Commit message (Collapse)AuthorAgeFilesLines
* Removed the asm version of conv(). This is should be faster in its newobrien1999-11-151-11/+6
| | | | | | C form. See src/sys/i386/isa/sound/audio.c rev.1.23 Submitted by: bde
* Fix __asm__ clobber list abuses.obrien1999-11-151-3/+3
|
* Trim some unused #includespeter1999-10-111-1/+0
| | | | Submitted by: phk
* Seperate pcaudio from isa/snd and isa/sound - it's not worth this breakingpeter1999-09-271-2/+34
| | | | each time there is a change.
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+0
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-231-19/+3
| | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
* Simplify cdevsw registration.phk1999-05-311-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* This commit should be a extensive NO-OP:phk1999-05-301-5/+22
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* Fix 'signed char as array index' warnings and an unused variable.peter1999-05-061-2/+2
|
* Add sufficient braces to keep egcs happy about potentially ambiguouspeter1999-05-061-3/+3
| | | | if/else nesting.
* s/static foo_devsw_installed = 0;/static int foo_devsw_installed;/.dt1999-04-281-2/+2
| | | | (Edited automatically)
* Fix the move of the ulaw.h file..sos1998-12-271-7/+39
|
* Fix typo - [0], [1], [2], not [0], [1], [3].eivind1998-12-131-2/+2
|
* Add VESA support to syscons.sos1998-09-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Kazu writes: The VESA support code requires vm86 support. Make sure your kernel configuration file has the following line. options "VM86" If you want to statically link the VESA support code to the kernel, add the following option to the kernel configuration file. options "VESA" The vidcontrol command now accepts the following video mode names: VESA_132x25, VESA_132x43, VESA_132x50, VESA_132x60, VESA_800x600 The VESA_800x600 mode is a raster display mode. The 80x25 text will be displayed on the 800x600 screen. Useful for some laptop computers. vidcontrol accepts the new `-i <info>' option, where <info> must be either `adapter' or `mode'. When the `-i adapter' option is given, vidcontrol will print basic information (not much) on the video adapter. When the `-i mode' option is specified, vidcontrol will list video modes which are actually supported by the video adapter. Submitted by: Kazutaka YOKOTA yokota@FreeBSD.ORG
* Don't pretend to support ix86's with 16-bit ints and 32-bit registersbde1998-07-141-4/+4
| | | | | by using longs just to ensure 32-bit variables. Long variables don't fit in 32-bit registers on ix86's with 64-bit longs.
* This commit fixes various 64bit portability problems required fordfr1998-06-071-2/+2
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* Support compiling with `gcc -ansi'.bde1998-04-151-2/+2
|
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.eivind1998-01-241-1/+2
| | | | | | | | This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow.
* Removed unused #includes.bde1997-11-181-13/+13
| | | | | | Fixed bugs in rev.1.35: - nonblocking mode was per-device instead of per-file. - lots of style bugs.
* Update select -> poll in drivers.peter1997-09-141-24/+25
|
* Enable A law encoding.helbig1997-09-061-1/+4
|
* 1) Changed the volume to be a little louder.sos1997-09-031-12/+29
| | | | | | | 2) Added a non_blocking flag to the write routine. 3) Added a 3rd buffer (actually a ring buffer would be better) Submitted by: Jim Lowe <james@miller.cs.uwm.edu>
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Removed unused #includes.bde1996-10-251-14/+14
| | | | | | | | Strength-reduced used #include. Staticized pcaintr(). Fixed some style bugs.
* Don't compile a 256-byte unused table in the pca driver.bde1996-09-131-1/+2
| | | | | The other 256-byte table in ulaw.h still gets duplicated if both pca and snd are configured.
* Remove devconf, it never grew up to be of any use.phk1996-09-061-25/+1
|
* Introduce two /dev/audio compat alias names for flushing and drainingjoerg1996-07-171-1/+3
| | | | the pcaudio device. Now, XBoing sounds much better...
* Fix the spl handling. There's still the effect that the timers havejoerg1996-06-091-14/+32
| | | | | | | | | sometimes already been released at the time pcaclose() is called, but this is now prevented from deadlocking by checking for a running timer at the start of pca_wait(). At least, i can now play xboing again with pcaudio, this used to hang the entire system previously within a few seconds.
* Switched from using devfs_add_sw() to using devfs_add_swf()scrappy1996-03-281-6/+9
| | | | Reviewed by: julian@freebsd.org
* Fixed permissions of /dev/pcaudio*.bde1995-12-221-6/+6
|
* Completed function declarations and/or added prototypes and/or addedbde1995-12-151-1/+4
| | | | #includes to get prototypes.
* Staticize and cleanup.phk1995-12-101-6/+6
|
* Julian forgot to make the *devsw structures static.phk1995-12-081-2/+2
|
* Pass 3 of the great devsw changesjulian1995-12-081-31/+27
| | | | | | | | | | | | | | | | | | | | | | | most devsw referenced functions are now static, as they are in the same file as their devsw structure. I've also added DEVFS support for nearly every device in the system, however many of the devices have 'incorrect' names under DEVFS because I couldn't quickly work out the correct naming conventions. (but devfs won't be coming on line for a month or so anyhow so that doesn't matter) If you "OWN" a device which would normally have an entry in /dev then search for the devfs_add_devsw() entries and munge to make them right.. check out similar devices to see what I might have done in them in you can't see what's going on.. for a laugh compare conf.c conf.h defore and after... :) I have not doen DEVFS entries for any DISKSLICE devices yet as that will be a much more complicated job.. (pass 5 :) pass 4 will be to make the devsw tables of type (cdevsw * ) rather than (cdevsw) seems to work here.. complaints to the usual places.. :)
* A quick fix for a problem that will go away in a few days anyway..julian1995-12-011-2/+2
|
* A pair of really tiny patches that not only allow it all to compilejulian1995-11-301-5/+5
| | | | | | | | | but also IT ACTUALLY WORKS! FreeBSD with options JREMOD now runs with no entries in the devsw tables prior to the devices puting their own entries there.. Thanks to bde and terry for thoughts and comments. next stop 'Real' devfs support in devices.
* OK, that's it..julian1995-11-291-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | That's EVERY SINGLE driver that has an entry in conf.c.. my next trick will be to define cdevsw[] and bdevsw[] as empty arrays and remove all those DAMNED defines as well.. Each of these drivers has a SYSINIT linker set entry that comes in very early.. and asks teh driver to add it's own entry to the two devsw[] tables. some slight reworking of the commits from yesterday (added the SYSINIT stuff and some usually wrong but token DEVFS entries to all these devices. BTW does anyone know where the 'ata' entries in conf.c actually reside? seems we don't actually have a 'ataopen() etc... If you want to add a new device in conf.c please make sure I know so I can keep it up to date too.. as before, this is all dependent on #if defined(JREMOD) (and #ifdef DEVFS in parts)
* the second set of changes in a move towards getting devices to bejulian1995-11-281-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | totally dynamic. this is only the devices in i386/isa I'll do more tomorrow. they're completely masked by #ifdef JREMOD at this stage... the eventual aim is that every driver will do a SYSINIT at startup BEFORE the probes, which will effectively link it into the devsw tables etc. If I'd thought about it more I'd have put that in in this set (damn) The ioconf lines generated by config will also end up in the device's own scope as well, so ioconf.c will eventually be gutted the SYSINIT call to the driver will include a phase where the driver links it's ioconf line into a chain of such. when this phase is done then the user can modify them with the boot: -c config menu if he wants, just like now.. config will put the config lines out in the .h file (e.g. in aha.h will be the addresses for the aha driver to look.) as I said this is a very small first step.. the aim of THIS set of edits is to not have to edit conf.c at all when adding a new device.. the tabe will be a simple skeleton.. when this is done, it will allow other changes to be made, all teh time still having a fully working kernel tree, but the logical outcome is the complete REMOVAL of the devsw tables. By the end of this, linked in drivers will be exactly the same as run-time loaded drivers, except they JUST HAPPEN to already be linked and present at startup.. the SYSINIT calls will be the equivalent of the "init" call made to a newly loaded driver in every respect. For this edit, each of the files has the following code inserted into it: obviously, tailored to suit.. ----------------------somewhere at the top: #ifdef JREMOD #include <sys/conf.h> #define CDEV_MAJOR 13 #define BDEV_MAJOR 4 static void sd_devsw_install(); #endif /*JREMOD */ ---------------------somewhere that's run during bootup: EVENTUALLY a SYSINIT #ifdef JREMOD sd_devsw_install(); #endif /*JREMOD*/ -----------------------at the bottom: #ifdef JREMOD struct bdevsw sd_bdevsw = { sdopen, sdclose, sdstrategy, sdioctl, /*4*/ sddump, sdsize, 0 }; struct cdevsw sd_cdevsw = { sdopen, sdclose, rawread, rawwrite, /*13*/ sdioctl, nostop, nullreset, nodevtotty,/* sd */ seltrue, nommap, sdstrategy }; static sd_devsw_installed = 0; static void sd_devsw_install() { dev_t descript; if( ! sd_devsw_installed ) { descript = makedev(CDEV_MAJOR,0); cdevsw_add(&descript,&sd_cdevsw,NULL); #if defined(BDEV_MAJOR) descript = makedev(BDEV_MAJOR,0); bdevsw_add(&descript,&sd_bdevsw,NULL); #endif /*BDEV_MAJOR*/ sd_devsw_installed = 1; } } #endif /* JREMOD */
* Included <sys/conf.h>. It used to be included as a side effect ofbde1995-11-161-1/+2
| | | | including <sys/devconf.h>.
* Moved prototypes for devswitch functions from conf.c and driver sourcesbde1995-11-041-6/+1
| | | | | | | to <machine/conf.h>. conf.h was mechanically generated by `grep ^d_ conf.c >conf.h'. This accounts for part of its ugliness. The prototypes should be moved back to the driver sources when the functions are staticalized.
* Fix benign type mismatches in devsw functions. 82 out of 299 devswbde1995-09-081-5/+5
| | | | functions were wrong.
* devfs changes..julian1995-09-031-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | changes to allow devices that don't probe (e.g. /dev/mem) to create devfs entries this required giving 'configure' its own SYSINIT entry so we could duck in just before it with a DEVFS init and some device inits.. my devfs now looks like: ./misc ./misc/speaker ./misc/mem ./misc/kmem ./misc/null ./misc/zero ./misc/io ./misc/console ./misc/pcaudio ./misc/pcaudioctl ./disks ./disks/rfloppy ./disks/rfloppy/fd0.1440 ./disks/rfloppy/fd1.1200 ./disks/floppy ./disks/floppy/fd0.1440 ./disks/floppy/fd1.1200 also some sligt cleanups.. DEVFS needs a lot of work but I'm getting back to it..
* Remove trailing whitespace.rgrimes1995-05-301-15/+15
|
* Fix probe message printingsos1995-03-301-2/+2
|
* Abort writes if a signal is received (don't ignore the value returned bybde1994-11-061-10/+26
| | | | | | | | | | tsleep()). Try `dd if=/dev/zero of=/dev/pcaudio bs=640k count=1'. The write takes a few hundred seconds to drain, and if it is killed by a signal, it still takes a few hundred seconds to drain and all of those seconds are spent busy-waiting. Clean up includes and declarations. Remove bogus casts of args to timeout functions.
* Added device registration stuff.sos1994-10-271-2/+26
|
* Oops, forgot one patch for the changed selwakeup, fixed.sos1994-09-291-10/+9
|
* Updated pcaudio.c to latest from 1.1.5.1sos1994-09-291-17/+45
| | | | | | Enabled timer reprogramming in clock.c (this could use more work). Obtained from: FreeBSD-1.1.5.1
OpenPOWER on IntegriCloud