Commit Graph

41 Commits

Author SHA1 Message Date
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
augustss
c4a52794f1 Convert to new orthogonal audio encoding scheme and implement
some of the new encodings.  The change to ioctl AUDIO_GETENC is
NOT backwards compatible.
1997-05-07 18:51:31 +00:00
augustss
91aba3ab34 Improve setting of record source. 1997-04-06 23:49:32 +00:00
augustss
32801cf383 * Move the Linux audio emulation into its own directory and rename it
OSS (aka VoxWare) audio emulation.
* Use the OSS audio emulation for Linux and FreeBSD.
* Add mixer emulation to the OSS emulator.
1997-04-04 15:35:54 +00:00
mycroft
b1a3eda88c Copy back the format we set in SNDCTL_DSP_SETFMT. 1997-03-20 16:11:29 +00:00
mycroft
41bbc3f5b6 SOUND_PCM_WRITE_CHANNELS -> SNDCTL_DSP_CHANNELS, to match current Linux code. 1997-03-20 04:21:31 +00:00
mycroft
eb41ccd5fe Emulate the SOUND_PCM_WRITE_CHANNELS ioctl. From PR 3356, by Lennart
Augustsson.  Also add hooks for mixer ioctls.
1997-03-19 05:12:13 +00:00
fvdl
990f0ce9b7 Add RCS Id. 1996-10-17 19:46:39 +00:00
mycroft
6bc0baa1ce Separate ioctl emulation by group. Add (minimal) audio emulation. 1996-03-08 04:55:59 +00:00