Commit Graph

58 Commits

Author SHA1 Message Date
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
augustss 46e0757329 Make sure OSS_SNDCTL_DSP_GETFMTS returns the formats the audio driver
can handle and not just some random guess.
Also add some debugging stuff.
1997-08-07 23:59:23 +00:00
augustss 7dfa17a43b Improve ioctl decoding.
Change mixer name mappings.
1997-08-06 23:06:04 +00:00
augustss d3de043fad Make sure the blocksize is always a power of 2 when inspected.
OSS only uses powers of 2 so some programs expect this.
Now Quake works!
1997-07-28 03:51:11 +00:00
augustss 9745684ebe Changes to the sudio system:
- It is now possible to handle devices that want "looping" DMA,
    e.g. the SoundBlaster correctly.  The WSS and SB drivers use this.
    To do this several new methods were introduced in audio_hw_if.
  - Different silence handling (forced by previous change).
  - The audio driver can now be mmap()-ed, but due to problems in
    the VM system only for writing for now.
  - The OSS (Linux) audio emulation takes advantage of some of the
    new features.
1997-07-27 01:16:32 +00:00
pk e3680b0e26 config.new => config 1997-07-20 20:33:08 +00:00
augustss 8727da130b In the name of backwards compatibility AUDIO_ENCODING_LINEAR has been
renamed AUDIO_ENCODING_SLINEAR and AUDIO_ENCODING_LINEAR reverts to the
NetBSD 1.2 sematics.  A kernel with COMPAT_12 defined will accept
AUDIO_ENCODING_LINEAR and treat it as before, without COMPAT_12 it
will be rejected.
1997-07-15 07:46:04 +00:00
augustss 604e6c4091 Add missing initialization. 1997-05-19 23:05:14 +00:00
augustss 0decef1b80 Fix recording source selection bug. 1997-05-19 17:29:12 +00:00
augustss c397fa8357 Return audio buffer size in audio_info_t with ioctl() AUDIO_GETINFO.
Use the buffer size to implement one more OSS ioctl().
1997-05-07 19:24:25 +00:00