aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/speaker
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert DEVFS hooks in (most) drivers to make_dev().Poul-Henning Kamp1999-08-231-13/+2
| | | | | | | | | | | | | | | | | | | 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(). Notes: svn path=/head/; revision=50254
* Use devtoname() to print dev_t's instead of casting them to long or u_longBruce Evans1999-08-231-3/+3
| | | | | | | for misprinting in %lx format. Notes: svn path=/head/; revision=50253
* Welcome devtoname(), to most likely be used when printing informationBill Fumerola1999-08-171-5/+5
| | | | | | | | | | | | | about a dev_t. printf("%x", dev) now becomes printf("%s", devtoname(dev)) because printing actual information about the device is much more useful then printing a pointer to an address that would never help the developer debug. Submitted by: phk, bde Notes: svn path=/head/; revision=49982
* Simplify cdevsw registration.Poul-Henning Kamp1999-05-311-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=47640
* This commit should be a extensive NO-OP:Poul-Henning Kamp1999-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. Notes: svn path=/head/; revision=47625
* Fixed printf format errors. Only one left in LINT on i386's.Bruce Evans1998-08-241-3/+4
| | | | Notes: svn path=/head/; revision=38505
* This commit fixes various 64bit portability problems required forDoug Rabson1998-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. Notes: svn path=/head/; revision=36735
* Don't depend on "implicit int" or bloat the data section in theBruce Evans1998-02-201-2/+2
| | | | | | | declaration of xxx_devsw_installed. Notes: svn path=/head/; revision=33679
* Staticize.Eivind Eklund1998-02-091-2/+2
| | | | Notes: svn path=/head/; revision=33181
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.Eivind Eklund1998-01-241-1/+3
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=32726
* In all such uses of struct buf: 's/b_un.b_addr/b_data/g'Poul-Henning Kamp1997-12-021-2/+2
| | | | Notes: svn path=/head/; revision=31493
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-222-2/+2
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-142-2/+2
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Use macros from timmerreg.h instead of private ones.Bruce Evans1996-10-251-28/+7
| | | | | | | | | | | Use global timer_freq instead of private TIMER_CLK. Removed unused #includes. Fixed some comments. Notes: svn path=/head/; revision=19174
* Cleaned up all headers that include <sys/ioctl.h> or <sys/ioccom.h>:Bruce Evans1996-09-211-7/+5
| | | | | | | | | | | | | | | | - don't include <sys/ioctl.h> in any header. Include <sys/ioccom.h> instead. This was already done in 4.4Lite for the most important ioctl headers. Header spam currently increases kernel build times by 10-20%. There are more than 30000 #includes (not counting duplicates) for compiling LINT. - include <sys/types.h> if and only it is necessary to make the header almost self-sufficient (some ioctl headers still need structs from elsewhere). - uniformized idempotency ifdefs. Copied the style in the 4.4Lite ioctl headers. Notes: svn path=/head/; revision=18444
* Unconditionally null-terminate string read into spkr driver.Peter Wemm1996-08-241-3/+6
| | | | | | | | Submitted by: Ikuo Nakagawa <ikuo@isl.intec.co.jp>, PR#1488, but using Bruce Evans <bde@zeta.org.au>'s fix. Notes: svn path=/head/; revision=17803
* Correct the timer2 acquiration and release, it must happen at splclock.Joerg Wunsch1996-07-201-36/+52
| | | | | | | | Also slightly reformatted so that it meets at least partially style(9), and makes navigating through the functions easier. Notes: svn path=/head/; revision=17232
* Fixed name of /dev/speaker (it's not spkr).Bruce Evans1996-03-271-4/+4
| | | | Notes: svn path=/head/; revision=14847
* Completed function declarations and/or added prototypes and/or addedBruce Evans1995-12-151-1/+8
| | | | | | | #includes to get prototypes. Notes: svn path=/head/; revision=12854
* Julian forgot to make the *devsw structures static.Poul-Henning Kamp1995-12-081-2/+2
| | | | Notes: svn path=/head/; revision=12678
* Pass 3 of the great devsw changesJulian Elischer1995-12-081-20/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.. :) Notes: svn path=/head/; revision=12675
* If you're going to mechanically replicate something in 50 filesJulian Elischer1995-11-291-2/+2
| | | | | | | it's best to not have a (compiles cleanly) typo in it! (sigh) Notes: svn path=/head/; revision=12521
* OK, that's it..Julian Elischer1995-11-291-28/+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) Notes: svn path=/head/; revision=12517
* the second set of changes in a move towards getting devices to beJulian Elischer1995-11-281-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 */ Notes: svn path=/head/; revision=12502
* Fixed init functions argument type - caddr_t -> void *. Fixed a couple ofDavid Greenman1995-09-091-2/+2
| | | | | | | compiler warnings. Notes: svn path=/head/; revision=10653
* Fix benign type mismatches in devsw functions. 82 out of 299 devswBruce Evans1995-09-081-10/+19
| | | | | | | functions were wrong. Notes: svn path=/head/; revision=10624
* devfs changes..Julian Elischer1995-09-031-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.. Notes: svn path=/head/; revision=10537
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-3/+3
| | | | Notes: svn path=/head/; revision=8876
* Check for 0 before dividing by it. Patch from Paul Traina, modifiedDavid Greenman1995-05-051-2/+10
| | | | | | | slightly by me. Notes: svn path=/head/; revision=8288
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'Bruce Evans1995-03-161-1/+3
| | | | | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones. Notes: svn path=/head/; revision=7090
* Fix hanging while playing very short notes.Andrey A. Chernov1995-02-031-3/+5
| | | | Notes: svn path=/head/; revision=6152
* Fix range checking bug, pointed by peter@haywire.dialix.comAndrey A. Chernov1994-10-141-3/+3
| | | | Notes: svn path=/head/; revision=3593
* Change all #includes to follow the current Berkeley style. Some of theseGarrett Wollman1994-08-131-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | ``changes'' are actually not changes at all, but CVS sometimes has trouble telling the difference. This also includes support for second-directory compiles. This is not quite complete yet, as `config' doesn't yet do the right thing. You can still make it work trivially, however, by doing the following: rm /sys/compile mkdir /usr/obj/sys/compile ln -s M-. /sys/compile cd /sys/i386/conf config MYKERNEL cd ../../compile/MYKERNEL ln -s /sys @ rm machine ln -s @/i386/include machine make depend make Notes: svn path=/head/; revision=2056
* Added $Id$David Greenman1994-08-021-0/+2
| | | | Notes: svn path=/head/; revision=1817
* Change timer usage to use new functions in clock.cSøren Schmidt1994-04-211-10/+13
| | | | Notes: svn path=/head/; revision=1393
* Fix error with tsleep loopAndrey A. Chernov1994-01-251-41/+20
| | | | Notes: svn path=/head/; revision=1016
* wmesg was too long (>7), fixedAndrey A. Chernov1993-11-291-3/+3
| | | | Notes: svn path=/head/; revision=809
* timeout+sleep changed to tsleepAndrey A. Chernov1993-11-151-45/+53
| | | | Notes: svn path=/head/; revision=766
* Fixed minor bug in M[LSN] interpretation, added octave-tracking.Andrey A. Chernov1993-11-091-40/+68
| | | | | | | | Added the slur-mark feature. Name of ioctl's include sys/spkr.h changed to machine/speaker.h Notes: svn path=/head/; revision=738
* Name of ioctl's include sys/spkr.h changed to machine/speaker.hAndrey A. Chernov1993-11-091-0/+30
| | | | Notes: svn path=/head/; revision=737
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, someRodney W. Grimes1993-10-161-0/+2
| | | | | | | minor cleanup. Added $Id$ to files that did not have any version info, etc Notes: svn path=/head/; revision=619
* * Applied fixes from Bruce Evans to fix COW bugs, >1MB kernel loading,David Greenman1993-07-271-0/+1
| | | | | | | | | | | | | | | | profiling, and various protection checks that cause security holes and system crashes. * Changed min/max/bcmp/ffs/strlen to be static inline functions - included from cpufunc.h in via systm.h. This change improves performance in many parts of the kernel - up to 5% in the networking layer alone. Note that this requires systm.h to be included in any file that uses these functions otherwise it won't be able to find them during the load. * Fixed incorrect call to splx() in if_is.c * Fixed bogus variable assignment to splx() in if_ed.c Notes: svn path=/head/; revision=200
* Initial import, 0.1 + pk 0.2.4-B1Rodney W. Grimes1993-06-121-0/+520
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=4