Commit Graph

79 Commits

Author SHA1 Message Date
augustss
b366d54e2e Fix slight glitch in last commit when AUDIO_DEBUG is on. 1997-10-29 02:11:45 +00:00
augustss
9f84e63746 Do audio attachment the right way. From Chris Demetriou.
(Maybe I'll get the hang of the configuration stuff one of these days. :-)
1997-10-29 02:00:20 +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
is
25ea46120a TMS320AV110 (mpeg layer 2 decoder chip) and ZBUS Melody board, which uses it.
No optionboards yet for Melody, only audio driver.
MPEG data types for audio.c
1997-10-16 23:57:56 +00:00
augustss
31ab81c6e4 Aignore interrupts if the device isn't open. 1997-10-16 16:41:18 +00:00
augustss
0d79fbe5c5 Don't test for unused methods. 1997-10-14 18:43:42 +00:00
mycroft
3cdff9d435 GETPROPS does not indicate whether the device is currently in full-duplex
mode.  Reinstate GETFD to return this information.
1997-10-11 11:16:28 +00:00
augustss
4f2068ec29 Sanity check hi/lo water mark settings better. 1997-10-07 22:40:43 +00:00
augustss
ffcdaf144d Move around splaudio() to (hopefully) get rid of some rare race conditions.
Add a missing call to round_blocksize.
Add some MIDI stuff that will be used in the future.
1997-09-06 01:14:48 +00:00
thorpej
d2a9d1970d Don't deference a bad pointers if you try to open an audio device that's
not configured.
1997-08-27 18:54:28 +00:00
augustss
955e1e9119 Make sure audio device starts in half-duplex mode and document the fact. 1997-08-26 19:03:55 +00:00
augustss
6616d47838 - Change audio_hw_if a little: set_param now sets the play and record modes
at the same time instead by using two different calls.  This enables
  it to check more easily if the combined mode is all right.
- Improve the error checking in audio.c.
- Add a new audio property, AUDIO_PROP_INDEPENDENT, show if the
  play and record settings are independent.
- Fix some buglets in audio.c.
1997-08-24 22:31:23 +00:00
augustss
332ad95e76 Change the MI audio driver so it attaches to the MD driver in the
normal way.  This requires adding a line to the config files to
get audio to work again.
1997-08-19 23:49:33 +00:00
augustss
e5b75f05d4 Make a slight change to when blocksize, hi- and lo-water marks are
recalculated.  The new semantics is more intuitive(?) and makes Doom
work :-)
1997-08-18 23:20:09 +00:00
augustss
34085fae66 Implement /dev/audioctl. It behaves much like /dev/sound, but only
allows ioctl() and can be opened at any time.
1997-08-18 21:19:02 +00:00
augustss
8f096d087f Implement delivery of SIGIO on changes to /dev/mixer. 1997-08-11 01:38:12 +00:00
augustss
9a770a177f Make setting the audio block size sticky.
Change the calculated block size to correspond to 50 ms of sound
(was 20 ms, it seems needlessly small).
1997-08-08 00:03:26 +00:00
augustss
3c6f8bc89e Restructure a little to make sure AUDIO_FLUSH restarts the looping DMA. 1997-08-06 23:08:26 +00:00
fair
aae99e192d %x -> 0x%x 1997-08-06 07:39:59 +00:00
augustss
c392128002 Audio:
* Make it possible to use software assisted encodings that expand the
  sample size.
* Use 16 bits per sample when emulating mulaw coding on the SB.
* Prepare for SB16 without CT1745 mixer.
1997-08-04 09:29:51 +00:00
augustss
3bef8402d3 Implement FIONBIO in audio_ioctl. 1997-08-01 17:04:00 +00:00
augustss
658656bb99 Audio changes:
- Change the way attach and open works to allow multiple audio
	  devices.
	- Split the mulaw.c file into two to avoid dragging in mulaw
	  convertsion when they are not needed.  Add 16 bit alaw/mulaw tables.
	- Change the way audio properties are gotten.
	- Recognize more versions os SoundBlaster.
1997-07-31 22:33:08 +00:00
augustss
a63034762b Audio: Remove the machine dependant code I put in audio.c by mistake.
This adds another method to audio_hw_if.  Also remove a field from
audio_hw_if that was not read-only.
1997-07-28 20:56:05 +00:00
augustss
d5b1561c91 Temporary fix to make it compile on non-i386. 1997-07-28 09:28:04 +00:00
augustss
f6cd87f322 audio: Minor cleanup and enable looping DMA for PSS and PAS. 1997-07-28 01:31:50 +00:00
augustss
d58bc6796f audio: Simplify handling of AUDIO_SETFD and committing of encoding mode. 1997-07-27 23:51:48 +00:00
augustss
63decd9438 Fix divide by 0 bug in audio driver. 1997-07-27 23:06:04 +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
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
73ff4bd775 Allow more than one hardware driver to attach to the audio upper layer. 1997-05-27 23:24:56 +00:00
augustss
1fd29f4172 Make the audio default parameters into a globally accessible constant. 1997-05-20 12:51:43 +00:00
augustss
d7a82223f4 Change lowater calculation a little.
Fix mixer setting bug and add some missing splaudio().
Set SB drq16 to 5 and don't pretend to be SB v1.0.
1997-05-17 23:26:33 +00:00
augustss
4b487c00bd Clean up audio_silence_copyout(). 1997-05-11 00:41:12 +00:00
jtk
c7be49441e fix typo: LINEAR should have been ULINEAR 1997-05-10 19:01:53 +00:00
augustss
e63a553175 Change the interface between high and lowlevel audio drivers again:
Set the encoding parameters slightly differently.
Remove the SW encoding/decodinf functions from this interface
and move them to the audio_parameter struct; this is both more efficient
and flexible.
1997-05-09 22:16:27 +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
kleink
269ccaa71b Fix typo in last commit; from Thorsten Frueauf <frueauf@ira.uka.de>
in PR/3566.
1997-05-01 12:27:10 +00:00
augustss
526ef2f618 Change the interface between the high and low level audio drivers
so that all audio encoding parameters are set at once.  This simplifies
the interface and make error checking easier.
1997-04-29 21:01:33 +00:00
pk
231a4bfb1f Remove bogus pointer cast.
Accept FIONBIO ioctls.
1997-04-19 21:25:43 +00:00
mycroft
2c6048e49f Make sure to recalculate the block size after changing the
sampling rate.  Also, nuke the global variable audio_blocksize.
1997-03-20 16:13:55 +00:00
mycroft
c1cc14fa25 Combine set_encoding and set_precision into a single set_format interface. 1997-03-20 06:48:48 +00:00
mycroft
8b4878a6ba Fill in silence-padded blocks so we don't get gaps. From PR 3357,
by Lennart Augustsson.
1997-03-20 03:19:53 +00:00
mycroft
b0c4e068d0 Modify audio_fill_silence() to take an encoding number rather than a softc*
and mode.
1997-03-13 02:45:07 +00:00
mycroft
ac3b8b13b7 Don't share the silence block between devices. Make silence filling work for
more encodings, and make it device-independent.  From Lennart Augustsson, in
PR kern/3305.
1997-03-13 02:19:32 +00:00
perry
1c47a4325b close 3079 from Jason Baker -- fixes a test in audio_poll 1997-01-18 04:02:58 +00:00
pk
39379f9a46 Reset `sc_async' on device close. 1996-11-01 23:05:45 +00:00
jtk
aa8449a9ef fix compile errors & warnings 1996-10-16 01:12:18 +00:00
christos
86373f8cf9 backout kprintf changes 1996-10-13 01:37:04 +00:00
christos
5d85fa8122 printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:25:05 +00:00