Commit Graph

87 Commits

Author SHA1 Message Date
augustss b034eb97bf Fix typo. 1998-08-10 20:02:48 +00:00
mycroft 060f81eb62 Minor change. 1998-08-10 02:19:18 +00:00
mycroft 93703857ca Slow down, Wilbur. 1998-08-10 02:13:44 +00:00
mycroft 7514d511f7 Fix a typo I introduced in the MIDI code. 1998-08-10 02:12:30 +00:00
mycroft 8d77cae1b4 For models prior to the SB16, there is only one clock divider, so couple the
sample rates.  However, only do this if both play and record are being used
simultaneously; otherwise we can't play 22KHz on the SB1.
1998-08-10 01:25:33 +00:00
mycroft 3dcff6581b Use the new trigger_{in,out}put interface.
Also, even on the SB1, we can leave the DMA controller in auto-initalize
mode and just send a command to the board for each block.  This may help
prevent FIFO underruns.
1998-08-10 00:20:39 +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
thorpej 5f97398507 Adjust for changes to the ISA DMA API. 1998-06-09 00:05:44 +00:00
augustss 775d60ecd7 Use lower case "agc" for consistency. 1998-03-04 19:38:28 +00:00
bouyer d411251c64 Fix for the vibra16x from Lennart Augusts: saying that the dsp4.16 was
a SB64 was just a guess. The vibra16x is really a sb16.
1998-01-30 11:55:36 +00:00
mycroft 187df9b86e Set the gain to 1/2 by default; 3/4 is too loud and can damage headphones and
speakers.
1997-12-02 13:17:39 +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 b2004a534c Make sure the 'input' class is used even for the 1345 mixer. 1997-10-16 23:34:57 +00:00
mycroft b551325998 AudioElinear -> AudioEslinear 1997-10-11 12:36:04 +00:00
mycroft 2d019e5efd AudioC[A-Z] -> AudioC[a-z] 1997-10-11 11:28:49 +00:00
augustss d5ecfe9e6b Keep filter when setting source on SB Pro.
Close PR 2593.
1997-10-06 20:16:25 +00:00
augustss 25baf39689 Change the way we determine what interrupt routine to use to make
it work when drq8 == drq16.
1997-09-09 00:57:10 +00:00
augustss e72ff15736 Substantial rewrite of the SB driver to make it do full duplex on an SB16.
Because of the braindead design of the SB the input and output have to
use different precisions (8 and 16 bits).  It is possible to set the driver
to use 8 bits on both and it will the emulate 8 bits on the output by
expanding it to 16 bits.
1997-08-29 21:41:36 +00:00
augustss cd7e93c44d Add mute and channels swap to the mixer capabilites. 1997-08-24 23:50:40 +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 f78dfdfe6e Avoid munging audio_defaults. 1997-08-19 23:35:44 +00:00
augustss b99285b1e4 Round mixer values correctly when setting them.
This is important for the OSS emulation since OSS
uses a different range of values for the mixer.
1997-08-11 01:08:13 +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 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 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 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 86ad297c12 Fix a braino in record source selection and a pasto in detecting
16 bit mode recording.
1997-06-13 19:21:59 +00:00
thorpej 11e78a6b0d Pull thorpej-bus-dma branch into mainline. 1997-06-06 23:43:45 +00:00
jtk 1b429137ae make Jazz16 16-bit output work properly again. Still hangs somewhere
(not yet diagnosed) on occasion in high-speed mode, but a ^C will exit
immediately--no 30-second drainage timeout.
1997-05-29 04:57:02 +00:00
augustss 1bd32f9cad Add Alaw encoding emulation. 1997-05-28 00:07:46 +00:00
augustss 1616170859 A cosmetic name change. 1997-05-27 23:37:53 +00:00
mycroft 6756ff7858 Minor corrections to previous. Notably, make recording work on SBPro again. 1997-05-26 16:13:59 +00:00
augustss 72b5ba3901 Redo the way selecting the mode for SB cards is done completely.
It is now table driven since there are so many different variations
of SB cards out there.
Also fix a bug that stopped SB2 and SBPro from working.
1997-05-23 21:19:59 +00:00
augustss 1fd29f4172 Make the audio default parameters into a globally accessible constant. 1997-05-20 12:51:43 +00:00
augustss 0db08d11e6 Redo the SB mixer code. The driver can now distinguish between the
four different mixer options: none, CT1335, CT1345, and CT1745.
It should now be possible to access most of the SB16 functionality.
1997-05-19 23:14:29 +00:00
augustss 8d6f509439 Mask the level registers as the documentation suggests. 1997-05-18 00:36:03 +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 abdd4ddbea Back to pretending to be a SB v1.0 again, the mixer code for higher
versions is buggy.
1997-05-16 07:07:22 +00:00
augustss 37be371415 Clean up emulation code, SB, and GUS drivers and add some more encoding
emulation to SB.
1997-05-13 19:02:11 +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 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
mikel 383d8e6f79 update sb_printsc() to match current reality. 1997-05-07 04:36:00 +00:00
augustss 2fb1d088c5 XXX Pretend that all SB cards are of model 1.
XXX This way you can at least use SB cards until the real fixes go in.
1997-04-30 02:08:12 +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
jtk dd46e6280e partial fix for PR 3385: correctly identify JAZZ-16 when AUDIO_DEBUG is
enabled
1997-03-29 05:41:28 +00:00
mycroft 6f51eb5c3d Use autoinitialize DMA mode on the SB2 and later. Partly from Torsten Duwe. 1997-03-20 21:42:11 +00:00
mycroft 4f9648674a Make sure we round the block size to a multiple of the sample size. 1997-03-20 20:15:24 +00:00