Commit Graph

64 Commits

Author SHA1 Message Date
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
mycroft
2bc736661a Implement poll(2). 1996-09-07 12:40:22 +00:00
mycroft
e1ea13d92a Fix typo. 1996-09-01 23:54:53 +00:00
mycroft
664a66d009 Add mmap method for audio devices.
XXX This is just a placeholder to avoid updating conf.h again.
Also, clean up some error values.
1996-09-01 21:33:43 +00:00
mycroft
4abbd9427d Remove intr.h for now. This requires more work. 1996-05-13 02:26:15 +00:00
mycroft
682960c500 Use intr.h on alpha and i386. 1996-05-13 01:01:55 +00:00
christos
1e2c047be7 - Don't use dev_conf.h
- Remove unnecessary prototypes
- Fix ioctl arguments
- Don't use kprintf(...TO_LOG...); directly. This does not set the log
  priority, and uses priority of the previous message. Use log() with %:
1996-03-30 22:51:23 +00:00
mycroft
5c3bc6f120 Use %p as appropriate. 1996-03-29 00:11:42 +00:00
christos
e023a87a11 Bring prototypes into scope. 1996-03-14 19:05:07 +00:00
christos
d318abdbc4 prototypes for ccd audio and ncr5380 1996-03-07 15:00:07 +00:00
mycroft
d1b5c90fd6 Check for errors while changing gain. 1996-02-20 11:47:22 +00:00
mycroft
5f732f379e Trivial (and probably not very good) implementation of SIGIO. 1996-02-20 10:00:31 +00:00
jtk
4f3fc10939 Fix PR#2060 (add AUDIO_PERROR ioctl to query # of playback drops), also
fix semantics of AUDIO_WERROR (now returns a count).

Also repair audio driver back to "real-time mode" where user must
provide data quickly enough for real time audio or silence is played
until user catches up.  Add optional "play all" mode (additional bit in
mode field) to play all samples provided, with silence when needed to
avoid buffer underrun.
1996-02-17 02:28:56 +00:00
mycroft
8ba7909bb4 Eliminate sc_silence, and handle output interrupts somewhat differently.
From John Kohl, slightly edited.
1996-02-16 02:25:43 +00:00
mycroft
47246947c7 Adjust the low and high watermarks. Based on a suggestion from Lennart
Augustsson.
1996-02-08 03:05:34 +00:00
scottr
186d69c204 Don't adjust the number of blocks in the ring buffer if the driver
is currently outputting silence.  Fix from Lennart Augustsson
<augustss@cs.chalmers.se>, closes PR #2010.
1996-02-05 21:11:10 +00:00