Commit Graph

67 Commits

Author SHA1 Message Date
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad a9ca7a3734 Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
2008-03-21 21:54:58 +00:00
jmcneill c0e43ab0d6 Add ossaudio support for COMPAT_LINUX32, with help from mrg. With this
change, audio now works on amd64 with native firefox, nspluginwrapper, and
the 32-bit linux flash binaries.
2008-01-22 01:05:05 +00:00
dsl 7e2790cf6f Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
2007-12-20 23:02:38 +00:00
dsl 28bae79b27 ANSIfy most of the function definitions in sys/compat (but not ndis).
All by the magic of sed ...
2007-12-08 18:35:53 +00:00
dsl f2af9174b9 Remove all the __P 2007-12-04 18:40:07 +00:00
pooka 61e8303e9d Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
2007-11-26 19:01:26 +00:00
mlelstv 4bb7dae272 Implement OSS_SNDCTL_DSP_GETODELAY and provide a no-op function
for OSS_SNDCTL_DSP_PROFILE.
2007-09-18 19:49:53 +00:00
joerg 5ccf1c578a Add a new ioctl AUDIO_GETBUFINFO. It works like AUDIO_GETINFO, but
doesn't obtain the ports, gain and balance related parameters.
Those generally require reading from the hardware and therefore are much
more expensive to obtain. Modify OSS emulation to use the new ioctl
where possible.

This reduces CPU usage of mplayer during mp3 playback with my Thinkpad
from 20% to < 1% and from 50% to 20% during Xvid playback.

Review and comments from jmcneill@
2007-06-11 13:05:46 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
christos b33a26ac88 remove unneeded initializer. 2006-09-03 20:58:26 +00:00
ad f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
elad 874fef3711 integrate kauth. 2006-05-14 21:19:33 +00:00
xtraeme 312ebc355d Instead of getting properties from calling ioctl with AUDIO_GETINFO, use
AUDIO_INITINFO(). Now the sound with the linux flash plugin works
properly.

From OpenBSD.
2006-03-04 11:17:08 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
tron 9ca15b486f Fix problem in ioctl() handling in OSS audio emulation which caused
unintentional changes of the audio settings e.g. when running "kphone".

Patch submitted by George Michaelson on "tech-kern@NetBSD.org".
2005-12-08 19:19:14 +00:00
perry 477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
kent b285c03873 getdevinfo():
If a mixer item does not match with AudioNsomething, check whether
it ends with '.' + AudioNsomething.  PR#15441
2004-11-18 14:02:42 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
augustss 6ef6cc143d Fix missing call to FILE_UNUSE. From kern/21946, from Todd Vierling. 2003-06-23 21:53:10 +00:00
dsl 60418b39b7 Change 'data' argument to fo_ioctl and fo_fcntl from 'caddr_t' to 'void *'.
Avoids a lot of casting and removes the need for some line breaks.
Removed a load of (caddr_t) casts from calls to copyin/copyout as well.
(approved by christos - he has a plan to remove caddr_t...)
2003-03-21 21:13:50 +00:00
christos c0b8b6d8c6 add compat_ossaudio 2003-01-18 22:34:23 +00:00
thorpej ca3240e089 Merge the nathanw_sa branch. 2003-01-18 08:33:08 +00:00
jdolecek 98cb17d023 add support for SNDCTL_DSP_SETDUPLEX ioctl to ossaudio emulation code
code provided by Andreas Wrede in PR kern/19793
2003-01-12 08:20:05 +00:00
mycroft cbfac6596e Make SNDCTL_DSP_POST a nop. It's explicitly *not* supposed to sleep, and as
it's merely advisory (and in fact is implemented as a nop in the OSS->ALSA
shim), it should be safe to ignore it.
2001-12-24 00:10:46 +00:00
lukem dab6ef8b56 add RCSIDs (including regeneration of files as appropriate) 2001-11-13 02:07:52 +00:00
kim 1dc43ac2f2 Map OSS mixer device "line1" to native mixer device "aux". 2001-07-09 03:21:32 +00:00
thorpej 80cc38a1af Fix a partial construction problem that can cause race conditions
between creation of a file descriptor and close(2) when using kernel
assisted threads.  What we do is stick descriptors in the table, but
mark them as "larval".  This causes essentially everything to treat
it as a non-existent descriptor, except for fdalloc(), which sees a
filled slot so that it won't (incorrectly) allocate it again.  When
a descriptor is fully constructed, the code that has constructed it
marks it as "mature" (which actually clears the "larval" flag), and
things continue to work as normal.

While here, gather all the code that gets a descriptor from the table
into a fd_getfile() function, and call it, rather than having the
same (sometimes incorrect) code copied all over the place.
2001-06-14 20:32:41 +00:00
augustss f63784bfbe Improved fix of PR12796, from Frederick Bruckman <fb@enteract.com> 2001-05-10 01:54:30 +00:00
augustss 5c9ba155e3 Apply patch in PR lib/12796 from Frederick Bruckman <fb@enteract.com> 2001-05-09 21:49:58 +00:00
jdolecek 34c8ae80da constify 2001-01-18 20:28:15 +00:00
tron 29e1f8bd9f Use accurate rounding in conversion between OSS and NetBSD volume values.
The optimized integer formula was supplied by Wolfgang Solfrank on
"tech-kern@netbsd.org". This fixes problems with e.g  FreeBSD TV (fxtv),
RealPlayer-7.0 Beta 2 (PR pkg/10818) and KDE's "kscd".
2000-08-16 16:14:33 +00:00
augustss 17ac2f03ee Implement OSS_GETVERSION.
Accept mixer values above max (100).
Handle the info from AUDIO_MIXER_DEVINFO properly, parts of it is opaque.
2000-07-04 09:56:14 +00:00
augustss 83c33f4fee Fix typo in comment. From Brad <brad@openbsd.org> 1999-11-19 23:50:21 +00:00
augustss d37a1f8e3b Implement OSS_SOUND_MIXER_INFO. 1999-11-17 00:06:38 +00:00
kleink 79ce98b212 Per discussion with Lennart Augustsson, change the behaviour to report emulated
encodings, too.  (This is currently an issue with the eso(4) driver, which,
due to different byte orders in playing and recording directions, sets the
emulated flag for all 16-bit encodings, although it could be argued that this
is an unfortunate weakness of the query_encoding() interface.)
1999-08-22 13:43:09 +00:00
thorpej e3669c3393 Add "use counting" to file entries. When closing a file, and it's reference
count is 0, wait for use count to drain before finishing the close.

This is necessary in order for multiple processes to safely share file
descriptor tables.
1999-05-05 20:01:01 +00:00
augustss 1ea49a1848 Make copyright conform. 1999-04-13 20:31:32 +00:00
augustss 48bae9ee88 Add MIDI support. The MIDI devices can be accessed as ``raw'' through
the /dev/rmidiN devices, or with a sequencer interface via /dev/music.
So far the only supported MIDI device is the MPU401 port on SoundBlaster
(and only on SB on isapnp, since we do not have locators with multiple
values yet).
1998-08-07 00:00:55 +00:00
augustss 9af4656838 Fix off by 1 error 1998-05-25 17:13:43 +00:00
mycroft aa1112aed5 SETFRAGMENT ignores the high bit. 1998-03-19 06:53:28 +00:00
augustss e7029fc0da Make the audio API (almost) SunOS compatible.
The changes is to allow some limited mixer manipulation through
the audio device (instead of the mixer device).
This rendered 4 methods in audio_hw_if unused so garbage collect these.
1997-10-19 07:41:33 +00:00
augustss 841c4f7db2 Insert missing NetBSD copyright notices. 1997-10-16 16:49:32 +00:00
augustss 7002bab845 Emulate setting the hiwater mark with SETFRAGMENT the right way.
Get rid of some 'register'.
1997-10-07 22:46:00 +00:00
augustss 9390f073ca Increase the number of mixer devices the emulation looks at. 1997-08-24 23:31:23 +00:00
augustss 006a85ea00 Oops, forgot two lines in last commit. 1997-08-11 01:54:52 +00:00
augustss 67acd09fdc Implement OSS_SNDCTL_DSP_NONBLOCK. 1997-08-11 01:52:47 +00:00
augustss 2d2e53095a Some more debugging output. 1997-08-11 01:00:38 +00:00