Commit Graph

46 Commits

Author SHA1 Message Date
isaki c55e051ca1 Correct indent... 2002-06-04 14:02:32 +00:00
isaki ef44888b70 Correct wrong comment about factor_denom.
In case of recording, it doesn't make coding space small.
2002-06-04 13:59:23 +00:00
kleink af131f109a Add an `aux' audio device sub-type, to be used to attach parent
device-specific children to an audio device; per discussion with
Lennart Augustsson.
2002-04-25 00:50:39 +00:00
kent 2b2d118e66 Rename aurateconvproto.h to aurateconv.h. 2002-03-17 11:36:37 +00:00
isaki ae997346b5 Add factor_denom, a denominator of factor,
in 'struct audio_param' for vs0 on x68k.

{hw,user}_bytes_per_sample is changed to {hw,user}_bits_per_sample
to handle 4bit/sampling.
2002-03-16 08:58:49 +00:00
kent 3d212e0ce0 Fix a typo in a comment. 2002-03-13 03:48:19 +00:00
kent 289a98c007 Fix a typo in a comment.
Remove some unnecessary whitespace.
2002-03-11 14:59:57 +00:00
kent c329c38eef Sampling rate and mono-stereo conversion described in
http://mail-index.netbsd.org/tech-kern/2002/03/04/0005.html

auconv.c: Add conversion functions

audio.c: Sample alignment, calling conversion functions, etc.

audio_if.h: Add four hw_* members to "struct audio_params"

audiovar.h: Add conversion buffers, etc.

auich and uaudio: Add conversion request code to *_set_params().
2002-03-07 14:37:02 +00:00
augustss 3d2be4cf9b Fix pasto in type of dev_ioctl method. 2001-10-03 20:48:41 +00:00
augustss 1339e88a86 Add a new optional method, dev_ioctl, to the audio hardware driver interface.
It is called when an unrecognized ioctl() is performed on a device,
thus allowing ioctl()s that frob the hardware driver (like loading
microcode).
2001-10-03 00:04:47 +00:00
augustss 9cf205c410 ANSIfy. 2001-10-02 23:31:54 +00:00
simonb 889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
augustss a85a08c2fb Add support for detaching audio devices. 1999-09-09 10:24:39 +00:00
eeh dca7a79c9d Guys, let's get real. We don't really want an #if !defined() for every possible
machine that could concievably have defined an IPL_AUDIO, do we?
1999-06-05 16:51:39 +00:00
mrg eca7784d58 XXX avoid redefiing splaudio and IPL_AUDIO on the sparc XXX 1999-06-05 14:26:07 +00:00
mycroft e5f5e628d2 Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.
1999-02-17 02:37:38 +00:00
augustss cd09067eb4 * Redo the way the way the MIDI driver attaches to audio devices.
* Improve the midisyn layer a little.
* Add a driver for the Yamaha OPL[23] FM synths.
  The opl driver is not finished yet; it sounds pretty awful.

For some strange reason I cannot get any FM sound from my SB64 cards,
but a regular SB16 works fine.
1998-08-17 21:16:09 +00:00
augustss 27c5df27d1 Tidy up and rename some functions in the MIDI driver. 1998-08-12 18:11:53 +00:00
mycroft 17431823fb Add trigger_output and trigger_input entry points, which replace
init_{in,out}put and start_{in,out}put, and are only called once.
1998-08-09 20:28:07 +00:00
mycroft 7795559d04 Use splaudio on the arm32 port. 1998-08-08 23:40:03 +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 44c6ce78d2 Avoid the name free so the MALLOCLOG option works again.
Fix some typos.
1998-03-03 09:16:15 +00:00
tv 24ca7df4ba don't run minor() macro twice in ISDEV...() macro definitions 1998-01-10 14:07:25 +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
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
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 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 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 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 1fd29f4172 Make the audio default parameters into a globally accessible constant. 1997-05-20 12:51:43 +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 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
mycroft cf83d6c33f Use native IPL_AUDIO for i386. 1997-03-21 04:36:29 +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 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
christos d318abdbc4 prototypes for ccd audio and ncr5380 1996-03-07 15:00:07 +00:00
mycroft 3da4b2a160 The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.
1995-12-24 02:29:35 +00:00
brezak 693043d786 GUS audio driver from John Kohl. 1995-07-19 19:58:09 +00:00
brezak 106dafc42e Common splaudio and ISA_IPL_AUDIO 1995-07-07 01:58:04 +00:00
brezak c68110e043 Remove strings 1995-05-08 22:01:34 +00:00
mycroft ff6c206c3f Use void* rather than caddr_t in many places. 1995-03-25 00:00:53 +00:00
brezak 1f5bdc75a9 New audio subsystem 1995-02-21 01:35:58 +00:00