History log of /netbsd-current/sys/dev/isa/gus.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.119 06-Feb-2021 isaki

Calling halt_{input,output} is done by the MI audio layer if necessary.


Revision tags: thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
# 1.118 29-Feb-2020 isaki

Remove rounding by 4 bytes on round_blocksize().
For drivers which supports only 16bit * 2channels sampling,
rounding by 4 bytes no longer meaningful.


Revision tags: netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.117 08-Jun-2019 isaki

branches: 1.117.4;
Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.


# 1.116 08-May-2019 isaki

Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c


Revision tags: isaki-audio2-base
# 1.115 16-Mar-2019 isaki

branches: 1.115.2;
Use C99 style struct initializer to audio_hw_if.


# 1.114 03-Feb-2019 mrg

- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625
# 1.113 23-Jun-2018 maxv

branches: 1.113.2;
constify


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.112 31-Oct-2017 nat

branches: 1.112.2;
Add padding to gus.c so fields match up when it ts cast to a ad1848_isa
softc for the allocation of hw ring buffers.

Locking fixes as gus KASSERTS / uses the codec locks.

Ok christos@.


Revision tags: matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204
# 1.111 01-Feb-2017 jakllsch

branches: 1.111.6;
Use boolean logical and operation on booleans, rather than bitwise and.

From David Binderman in PR kern/51936.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.110 11-Jul-2016 msaitoh

branches: 1.110.2; 1.110.4;
KNF. No functional change.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.109 27-Oct-2012 chs

branches: 1.109.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base
# 1.108 24-Nov-2011 mrg

branches: 1.108.8;
put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.


# 1.107 23-Nov-2011 jmcneill

Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.


Revision tags: jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.106 02-Jul-2011 mrg

branches: 1.106.2; 1.106.4;
fix sequence point errors. diff explains best:
- sc->sc_playbuf = ++sc->sc_playbuf % sc->sc_nbufs;
+ sc->sc_playbuf = (sc->sc_playbuf + 1) % sc->sc_nbufs;


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase jym-xensuspend-base
# 1.105 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.104 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.103 17-Dec-2008 cegger

branches: 1.103.2;
kill MALLOC and FREE macros.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.102 28-Apr-2008 martin

branches: 1.102.8; 1.102.12;
Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base
# 1.101 08-Apr-2008 cegger

branches: 1.101.2; 1.101.4;
use aprint_*_dev and device_xname


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.100 19-Oct-2007 ad

branches: 1.100.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 vmlocking-base
# 1.99 25-Sep-2007 ad

branches: 1.99.2;
Use splhigh(), not disable_intr().


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base mjf-ufs-trans-base
# 1.98 09-Jul-2007 ad

branches: 1.98.6; 1.98.8; 1.98.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.97 04-Mar-2007 christos

branches: 1.97.2; 1.97.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.96 16-Nov-2006 christos

branches: 1.96.4; 1.96.6;
__unused removal on arguments; approved by core.


Revision tags: yamt-splraiseipl-base2
# 1.95 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


Revision tags: yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 rpaulo-netinet-merge-pcb-base
# 1.94 30-Aug-2006 christos

branches: 1.94.2; 1.94.4;
add missing initializers


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base
# 1.93 14-Apr-2006 christos

Coverity CID 2453: Add negative checks.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.92 25-Mar-2006 thorpej

Use device_parent().


# 1.91 17-Mar-2006 christos

don't use MALLOC with a non-constant size; use malloc instead.


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.90 11-Dec-2005 christos

branches: 1.90.4; 1.90.6; 1.90.8; 1.90.10; 1.90.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.89 30-May-2005 christos

branches: 1.89.2;
- add const
- avoid variable shadowing.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.88 27-Feb-2005 perry

nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base
# 1.87 13-Jan-2005 kent

branches: 1.87.2; 1.87.4;
ansify and KNF


# 1.86 10-Jan-2005 kent

merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes


Revision tags: kent-audio1-beforemerge kent-audio1-base
# 1.85 29-Oct-2004 yamt

branches: 1.85.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.


# 1.84 14-Sep-2004 drochner

Separate the namespace for default (ie unspecified) locators used
by the isa.c bus driver and the "address/whatever not specified"
argument passed to leaf device drivers.
The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter
"ISA_UNKNOWN_XXX", defined in isavar.h.
This way we save a dependency of every ISA device driver on "locators.h".


# 1.83 22-Apr-2004 itojun

sprintf -> snprintf


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.82 21-Nov-2003 gson

Code enabled by option AUDIO_DEBUG exhibited undefined behavior and
caused compiler warnings with gcc 3.3.2.


# 1.81 09-May-2003 fvdl

branches: 1.81.2;
A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.


# 1.80 03-May-2003 wiz

DMA, not dma nor Dma.


# 1.79 06-Apr-2003 wiz

Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge
# 1.78 11-Oct-2002 fvdl

Don't include <i386/isa/icu.h>


Revision tags: kqueue-base
# 1.77 02-Oct-2002 thorpej

Fix sizeof and whitespace bug from the script I'm using to do the
CFATTACH_DECL conversion. (Grumble.)


# 1.76 02-Oct-2002 thorpej

Use CFATTACH_DECL().


# 1.75 27-Sep-2002 thorpej

Declare all cfattach structures const.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base
# 1.74 07-Jan-2002 thorpej

Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
isa_attach_args. If either of these members are non-NULL,
direct configuration of the bus is being performed. Add an
ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
direct configuration is not being performed and the probe fucntion
is returning success.
* Adapt device drivers -- currently, all driver probe routines return
"no match" if ISA_DIRECT_CONFIG() evaluates to true.


# 1.73 13-Nov-2001 lukem

add RCSID


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3
# 1.72 03-Oct-2001 augustss

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).


Revision tags: thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.71 18-Jul-2001 thorpej

branches: 1.71.2;
bcopy -> memcpy


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.70 18-Jan-2001 jdolecek

branches: 1.70.2; 1.70.4;
constify


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.69 23-Mar-2000 thorpej

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.


Revision tags: chs-ubc2-newbase
# 1.68 07-Feb-2000 thorpej

Add a new function call to the ISA DMA API: isa_dmamaxsize(), which returns
the maximum transfer size for the specified DMA channel. Make all clients
of ISA DMA use this call to determine their maximum transfer size.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base kame_141_19991130 comdex-fall-1999-base fvdl-softdep-base netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.67 30-Mar-1999 mycroft

branches: 1.67.8;
The AD1848/CS4231 attachment doesn't create DMA maps any more, so we have to
do it here. This is preferrable anyway, since we're not actually doing DMA
through the AD/CS chip.


# 1.66 19-Feb-1999 mycroft

Fix structure names.


# 1.65 17-Feb-1999 mycroft

Update comments.


# 1.64 17-Feb-1999 mycroft

Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.63 09-Sep-1998 thorpej

Add mmap support for gus and gusmax, PR #5988, Feico Dillema.


# 1.62 06-Sep-1998 jtk

Correct the remaining uses of ad1848_softc to ad1848_isa_softc


# 1.61 01-Sep-1998 jtk

use ad1848_isa_attach, so GUS cards with CS4231 don't panic the kernel


# 1.60 25-Aug-1998 pk

Split the AD1848 driver into MI (dev/ic/ad1848.c) and ISA parts.


# 1.59 17-Aug-1998 augustss

* 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.


Revision tags: eeh-paddr_t-base
# 1.58 02-Jul-1998 mycroft

Cosmetic change.


# 1.57 17-Jun-1998 augustss

Remove a bunch of totally unnecessary #include <machine/pio.h>
left over from the olden days.


# 1.56 09-Jun-1998 thorpej

Nuke __BROKEN_INDIRECT_CONFIG.


# 1.55 09-Jun-1998 thorpej

Adjust for changes to the ISA DMA API.


# 1.54 20-May-1998 augustss

Add a Yamaha OPL3-SA3 driver and clean up all AD1848 drivers.
Submitted by Constantine Sapuntzakis <csapuntz@reeducation-labor.lcs.mit.edu>
and originally written for OpenBSD.


# 1.53 12-Mar-1998 augustss

Update probing for GUS a little. From soren@t.dk,
closes PR kern/5148.


# 1.52 09-Mar-1998 mikel

let panic() call DDB, don't do it ourselves; from Nathan Williams in PR 5131


# 1.51 25-Jan-1998 mycroft

Make sure we create DMA maps if the CD4231 probe fails.


# 1.50 13-Jan-1998 drochner

make it compile without BROKEN_INDIRECT_CONFIG


# 1.49 12-Jan-1998 thorpej

Update for config changes.


Revision tags: netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.48 19-Oct-1997 augustss

branches: 1.48.2;
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.


Revision tags: marc-pcmcia-base
# 1.47 11-Oct-1997 mycroft

AudioElinear -> AudioEslinear


# 1.46 11-Oct-1997 mycroft

AudioC[A-Z] -> AudioC[a-z]


# 1.45 09-Oct-1997 jtc

Fix tipo inherited from old version of TNF copyright template.


# 1.44 12-Sep-1997 augustss

Create DMA maps on ordinary GUS (non-MAX) cards. Now it should work again.


Revision tags: thorpej-signal-base
# 1.43 06-Sep-1997 augustss

Bus-ify the GUS driver.


# 1.42 26-Aug-1997 augustss

XXX Add a drq2 locator for the ISA bus. Many sound cards need
two DMA channels to do e.g. full-duplex. This allows
a way of specifying the second channel in a sane way.
THIS IS TEMPORARY. The drq2 locator will go away when
the locator system has been changed to allow multiple
values per locator.


# 1.41 24-Aug-1997 augustss

- 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.


# 1.40 19-Aug-1997 augustss

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.


# 1.39 07-Aug-1997 augustss

Add A-law support and fix bug on opening GUS max.
From Feico Dillema <dillema@spam.aurum>.


# 1.38 04-Aug-1997 augustss

Get rid of `register'.


# 1.37 04-Aug-1997 augustss

Use gusmax_get_props instead of gus_get_props for gusmax.


# 1.36 31-Jul-1997 augustss

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.


Revision tags: marc-pcmcia-bp
# 1.35 28-Jul-1997 augustss

branches: 1.35.2;
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.


# 1.34 27-Jul-1997 augustss

audio: Simplify handling of AUDIO_SETFD and committing of encoding mode.


# 1.33 27-Jul-1997 augustss

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.


# 1.32 15-Jul-1997 augustss

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.


# 1.31 09-Jul-1997 jtk

fix mixer goof on GUS max


# 1.30 06-Jun-1997 thorpej

Pull thorpej-bus-dma branch into mainline.


Revision tags: thorpej-bus-dma-base
# 1.29 29-May-1997 jtk

fix popping noises on 16-bit ulinear output.
add big-endian support
XXX ULINEAR_BE still needs ad1848 emulation on gusmax


# 1.28 13-May-1997 augustss

Clean up emulation code, SB, and GUS drivers and add some more encoding
emulation to SB.


# 1.27 12-May-1997 jtk

branches: 1.27.2;
restore accidentally-lost set of nchannels in driver layer


# 1.26 10-May-1997 jtk

use normal linear names/values for 8-bit encodings
mark mulaw as emulated (it's done via a mapping table)
use GUS query encoding routine, even on GUS max, since the encoding
stuff is handled by the GF1.
XXX might not be right for recording, but it's correct for playback.


# 1.25 09-May-1997 augustss

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.


# 1.24 07-May-1997 augustss

Convert to new orthogonal audio encoding scheme and implement
some of the new encodings. The change to ioctl AUDIO_GETENC is
NOT backwards compatible.


# 1.23 29-Apr-1997 augustss

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.


# 1.22 06-Apr-1997 augustss

Make sure the bus tag is set where we need it.


# 1.21 20-Mar-1997 mycroft

Combine set_encoding and set_precision into a single set_format interface.


# 1.20 19-Mar-1997 mycroft

Check for errors returned by AD1848 routines.


# 1.19 13-Mar-1997 mycroft

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.


Revision tags: is-newarp-before-merge is-newarp-base
# 1.18 13-Oct-1996 christos

backout kprintf changes


# 1.17 10-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.16 12-May-1996 mycroft

Use intr.h.


# 1.15 03-May-1996 jtk

make it work with GUSPLAYDEBUG defined


# 1.14 29-Apr-1996 christos

- prototype fixes


# 1.13 11-Apr-1996 cgd

update for addition of a machine-dependent cookie as the first argument
to isa_intr_{,dis}establish().


# 1.12 31-Mar-1996 jtk

add include file for function prototypes


# 1.11 17-Mar-1996 thorpej

New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.


# 1.10 01-Mar-1996 mycroft

Add support to the ISA DMA framework for auto-initialize mode.
Add experimental SB16 code, disabled for now.


# 1.9 17-Feb-1996 jtk

fix compile error from gusprobe() cleanup


# 1.8 17-Feb-1996 jtk

avoid panic'ing when driver gets confused--just spit out a message and
keep going.
Improve error messages to include device name.
use STATIC for function declarations/definitions so it's easier to get a
useful symbol table by flipping a switch.


# 1.7 16-Feb-1996 mycroft

Prototype the probe and attach functions.


# 1.6 05-Feb-1996 jtc

Fix error in copyright notice


# 1.5 05-Feb-1996 jtc

Received copyright assignment


# 1.4 24-Dec-1995 mycroft

The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.


# 1.3 10-Nov-1995 mycroft

Convert IRQ, DRQ, and port numbers to int.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.2 24-Jul-1995 cgd

fix function prototypes, usages, to match what the code actually does


# 1.1 19-Jul-1995 brezak

GUS audio driver from John Kohl.


# 1.118 29-Feb-2020 isaki

Remove rounding by 4 bytes on round_blocksize().
For drivers which supports only 16bit * 2channels sampling,
rounding by 4 bytes no longer meaningful.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.117 08-Jun-2019 isaki

Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.


# 1.116 08-May-2019 isaki

Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c


Revision tags: isaki-audio2-base
# 1.115 16-Mar-2019 isaki

branches: 1.115.2;
Use C99 style struct initializer to audio_hw_if.


# 1.114 03-Feb-2019 mrg

- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625
# 1.113 23-Jun-2018 maxv

branches: 1.113.2;
constify


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.112 31-Oct-2017 nat

branches: 1.112.2;
Add padding to gus.c so fields match up when it ts cast to a ad1848_isa
softc for the allocation of hw ring buffers.

Locking fixes as gus KASSERTS / uses the codec locks.

Ok christos@.


Revision tags: matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204
# 1.111 01-Feb-2017 jakllsch

branches: 1.111.6;
Use boolean logical and operation on booleans, rather than bitwise and.

From David Binderman in PR kern/51936.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.110 11-Jul-2016 msaitoh

branches: 1.110.2; 1.110.4;
KNF. No functional change.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.109 27-Oct-2012 chs

branches: 1.109.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base
# 1.108 24-Nov-2011 mrg

branches: 1.108.8;
put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.


# 1.107 23-Nov-2011 jmcneill

Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.


Revision tags: jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.106 02-Jul-2011 mrg

branches: 1.106.2; 1.106.4;
fix sequence point errors. diff explains best:
- sc->sc_playbuf = ++sc->sc_playbuf % sc->sc_nbufs;
+ sc->sc_playbuf = (sc->sc_playbuf + 1) % sc->sc_nbufs;


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase jym-xensuspend-base
# 1.105 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.104 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.103 17-Dec-2008 cegger

branches: 1.103.2;
kill MALLOC and FREE macros.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.102 28-Apr-2008 martin

branches: 1.102.8; 1.102.12;
Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base
# 1.101 08-Apr-2008 cegger

branches: 1.101.2; 1.101.4;
use aprint_*_dev and device_xname


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.100 19-Oct-2007 ad

branches: 1.100.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 vmlocking-base
# 1.99 25-Sep-2007 ad

branches: 1.99.2;
Use splhigh(), not disable_intr().


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base mjf-ufs-trans-base
# 1.98 09-Jul-2007 ad

branches: 1.98.6; 1.98.8; 1.98.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.97 04-Mar-2007 christos

branches: 1.97.2; 1.97.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.96 16-Nov-2006 christos

branches: 1.96.4; 1.96.6;
__unused removal on arguments; approved by core.


Revision tags: yamt-splraiseipl-base2
# 1.95 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


Revision tags: yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 rpaulo-netinet-merge-pcb-base
# 1.94 30-Aug-2006 christos

branches: 1.94.2; 1.94.4;
add missing initializers


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base
# 1.93 14-Apr-2006 christos

Coverity CID 2453: Add negative checks.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.92 25-Mar-2006 thorpej

Use device_parent().


# 1.91 17-Mar-2006 christos

don't use MALLOC with a non-constant size; use malloc instead.


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.90 11-Dec-2005 christos

branches: 1.90.4; 1.90.6; 1.90.8; 1.90.10; 1.90.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.89 30-May-2005 christos

branches: 1.89.2;
- add const
- avoid variable shadowing.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.88 27-Feb-2005 perry

nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base
# 1.87 13-Jan-2005 kent

branches: 1.87.2; 1.87.4;
ansify and KNF


# 1.86 10-Jan-2005 kent

merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes


Revision tags: kent-audio1-beforemerge kent-audio1-base
# 1.85 29-Oct-2004 yamt

branches: 1.85.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.


# 1.84 14-Sep-2004 drochner

Separate the namespace for default (ie unspecified) locators used
by the isa.c bus driver and the "address/whatever not specified"
argument passed to leaf device drivers.
The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter
"ISA_UNKNOWN_XXX", defined in isavar.h.
This way we save a dependency of every ISA device driver on "locators.h".


# 1.83 22-Apr-2004 itojun

sprintf -> snprintf


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.82 21-Nov-2003 gson

Code enabled by option AUDIO_DEBUG exhibited undefined behavior and
caused compiler warnings with gcc 3.3.2.


# 1.81 09-May-2003 fvdl

branches: 1.81.2;
A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.


# 1.80 03-May-2003 wiz

DMA, not dma nor Dma.


# 1.79 06-Apr-2003 wiz

Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge
# 1.78 11-Oct-2002 fvdl

Don't include <i386/isa/icu.h>


Revision tags: kqueue-base
# 1.77 02-Oct-2002 thorpej

Fix sizeof and whitespace bug from the script I'm using to do the
CFATTACH_DECL conversion. (Grumble.)


# 1.76 02-Oct-2002 thorpej

Use CFATTACH_DECL().


# 1.75 27-Sep-2002 thorpej

Declare all cfattach structures const.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base
# 1.74 07-Jan-2002 thorpej

Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
isa_attach_args. If either of these members are non-NULL,
direct configuration of the bus is being performed. Add an
ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
direct configuration is not being performed and the probe fucntion
is returning success.
* Adapt device drivers -- currently, all driver probe routines return
"no match" if ISA_DIRECT_CONFIG() evaluates to true.


# 1.73 13-Nov-2001 lukem

add RCSID


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3
# 1.72 03-Oct-2001 augustss

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).


Revision tags: thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.71 18-Jul-2001 thorpej

branches: 1.71.2;
bcopy -> memcpy


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.70 18-Jan-2001 jdolecek

branches: 1.70.2; 1.70.4;
constify


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.69 23-Mar-2000 thorpej

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.


Revision tags: chs-ubc2-newbase
# 1.68 07-Feb-2000 thorpej

Add a new function call to the ISA DMA API: isa_dmamaxsize(), which returns
the maximum transfer size for the specified DMA channel. Make all clients
of ISA DMA use this call to determine their maximum transfer size.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base kame_141_19991130 comdex-fall-1999-base fvdl-softdep-base netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.67 30-Mar-1999 mycroft

branches: 1.67.8;
The AD1848/CS4231 attachment doesn't create DMA maps any more, so we have to
do it here. This is preferrable anyway, since we're not actually doing DMA
through the AD/CS chip.


# 1.66 19-Feb-1999 mycroft

Fix structure names.


# 1.65 17-Feb-1999 mycroft

Update comments.


# 1.64 17-Feb-1999 mycroft

Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.63 09-Sep-1998 thorpej

Add mmap support for gus and gusmax, PR #5988, Feico Dillema.


# 1.62 06-Sep-1998 jtk

Correct the remaining uses of ad1848_softc to ad1848_isa_softc


# 1.61 01-Sep-1998 jtk

use ad1848_isa_attach, so GUS cards with CS4231 don't panic the kernel


# 1.60 25-Aug-1998 pk

Split the AD1848 driver into MI (dev/ic/ad1848.c) and ISA parts.


# 1.59 17-Aug-1998 augustss

* 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.


Revision tags: eeh-paddr_t-base
# 1.58 02-Jul-1998 mycroft

Cosmetic change.


# 1.57 17-Jun-1998 augustss

Remove a bunch of totally unnecessary #include <machine/pio.h>
left over from the olden days.


# 1.56 09-Jun-1998 thorpej

Nuke __BROKEN_INDIRECT_CONFIG.


# 1.55 09-Jun-1998 thorpej

Adjust for changes to the ISA DMA API.


# 1.54 20-May-1998 augustss

Add a Yamaha OPL3-SA3 driver and clean up all AD1848 drivers.
Submitted by Constantine Sapuntzakis <csapuntz@reeducation-labor.lcs.mit.edu>
and originally written for OpenBSD.


# 1.53 12-Mar-1998 augustss

Update probing for GUS a little. From soren@t.dk,
closes PR kern/5148.


# 1.52 09-Mar-1998 mikel

let panic() call DDB, don't do it ourselves; from Nathan Williams in PR 5131


# 1.51 25-Jan-1998 mycroft

Make sure we create DMA maps if the CD4231 probe fails.


# 1.50 13-Jan-1998 drochner

make it compile without BROKEN_INDIRECT_CONFIG


# 1.49 12-Jan-1998 thorpej

Update for config changes.


Revision tags: netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.48 19-Oct-1997 augustss

branches: 1.48.2;
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.


Revision tags: marc-pcmcia-base
# 1.47 11-Oct-1997 mycroft

AudioElinear -> AudioEslinear


# 1.46 11-Oct-1997 mycroft

AudioC[A-Z] -> AudioC[a-z]


# 1.45 09-Oct-1997 jtc

Fix tipo inherited from old version of TNF copyright template.


# 1.44 12-Sep-1997 augustss

Create DMA maps on ordinary GUS (non-MAX) cards. Now it should work again.


Revision tags: thorpej-signal-base
# 1.43 06-Sep-1997 augustss

Bus-ify the GUS driver.


# 1.42 26-Aug-1997 augustss

XXX Add a drq2 locator for the ISA bus. Many sound cards need
two DMA channels to do e.g. full-duplex. This allows
a way of specifying the second channel in a sane way.
THIS IS TEMPORARY. The drq2 locator will go away when
the locator system has been changed to allow multiple
values per locator.


# 1.41 24-Aug-1997 augustss

- 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.


# 1.40 19-Aug-1997 augustss

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.


# 1.39 07-Aug-1997 augustss

Add A-law support and fix bug on opening GUS max.
From Feico Dillema <dillema@spam.aurum>.


# 1.38 04-Aug-1997 augustss

Get rid of `register'.


# 1.37 04-Aug-1997 augustss

Use gusmax_get_props instead of gus_get_props for gusmax.


# 1.36 31-Jul-1997 augustss

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.


Revision tags: marc-pcmcia-bp
# 1.35 28-Jul-1997 augustss

branches: 1.35.2;
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.


# 1.34 27-Jul-1997 augustss

audio: Simplify handling of AUDIO_SETFD and committing of encoding mode.


# 1.33 27-Jul-1997 augustss

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.


# 1.32 15-Jul-1997 augustss

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.


# 1.31 09-Jul-1997 jtk

fix mixer goof on GUS max


# 1.30 06-Jun-1997 thorpej

Pull thorpej-bus-dma branch into mainline.


Revision tags: thorpej-bus-dma-base
# 1.29 29-May-1997 jtk

fix popping noises on 16-bit ulinear output.
add big-endian support
XXX ULINEAR_BE still needs ad1848 emulation on gusmax


# 1.28 13-May-1997 augustss

Clean up emulation code, SB, and GUS drivers and add some more encoding
emulation to SB.


# 1.27 12-May-1997 jtk

branches: 1.27.2;
restore accidentally-lost set of nchannels in driver layer


# 1.26 10-May-1997 jtk

use normal linear names/values for 8-bit encodings
mark mulaw as emulated (it's done via a mapping table)
use GUS query encoding routine, even on GUS max, since the encoding
stuff is handled by the GF1.
XXX might not be right for recording, but it's correct for playback.


# 1.25 09-May-1997 augustss

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.


# 1.24 07-May-1997 augustss

Convert to new orthogonal audio encoding scheme and implement
some of the new encodings. The change to ioctl AUDIO_GETENC is
NOT backwards compatible.


# 1.23 29-Apr-1997 augustss

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.


# 1.22 06-Apr-1997 augustss

Make sure the bus tag is set where we need it.


# 1.21 20-Mar-1997 mycroft

Combine set_encoding and set_precision into a single set_format interface.


# 1.20 19-Mar-1997 mycroft

Check for errors returned by AD1848 routines.


# 1.19 13-Mar-1997 mycroft

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.


Revision tags: is-newarp-before-merge is-newarp-base
# 1.18 13-Oct-1996 christos

backout kprintf changes


# 1.17 10-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.16 12-May-1996 mycroft

Use intr.h.


# 1.15 03-May-1996 jtk

make it work with GUSPLAYDEBUG defined


# 1.14 29-Apr-1996 christos

- prototype fixes


# 1.13 11-Apr-1996 cgd

update for addition of a machine-dependent cookie as the first argument
to isa_intr_{,dis}establish().


# 1.12 31-Mar-1996 jtk

add include file for function prototypes


# 1.11 17-Mar-1996 thorpej

New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.


# 1.10 01-Mar-1996 mycroft

Add support to the ISA DMA framework for auto-initialize mode.
Add experimental SB16 code, disabled for now.


# 1.9 17-Feb-1996 jtk

fix compile error from gusprobe() cleanup


# 1.8 17-Feb-1996 jtk

avoid panic'ing when driver gets confused--just spit out a message and
keep going.
Improve error messages to include device name.
use STATIC for function declarations/definitions so it's easier to get a
useful symbol table by flipping a switch.


# 1.7 16-Feb-1996 mycroft

Prototype the probe and attach functions.


# 1.6 05-Feb-1996 jtc

Fix error in copyright notice


# 1.5 05-Feb-1996 jtc

Received copyright assignment


# 1.4 24-Dec-1995 mycroft

The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.


# 1.3 10-Nov-1995 mycroft

Convert IRQ, DRQ, and port numbers to int.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.2 24-Jul-1995 cgd

fix function prototypes, usages, to match what the code actually does


# 1.1 19-Jul-1995 brezak

GUS audio driver from John Kohl.


# 1.117 08-Jun-2019 isaki

Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
This eliminates need for audio.c to take care of such (old)
drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
It is handled in the audio layer now.


# 1.116 08-May-2019 isaki

Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c


Revision tags: isaki-audio2-base
# 1.115 16-Mar-2019 isaki

branches: 1.115.2;
Use C99 style struct initializer to audio_hw_if.


# 1.114 03-Feb-2019 mrg

- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625
# 1.113 23-Jun-2018 maxv

constify


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.112 31-Oct-2017 nat

branches: 1.112.2;
Add padding to gus.c so fields match up when it ts cast to a ad1848_isa
softc for the allocation of hw ring buffers.

Locking fixes as gus KASSERTS / uses the codec locks.

Ok christos@.


Revision tags: matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204
# 1.111 01-Feb-2017 jakllsch

branches: 1.111.6;
Use boolean logical and operation on booleans, rather than bitwise and.

From David Binderman in PR kern/51936.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.110 11-Jul-2016 msaitoh

branches: 1.110.2; 1.110.4;
KNF. No functional change.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.109 27-Oct-2012 chs

branches: 1.109.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base
# 1.108 24-Nov-2011 mrg

branches: 1.108.8;
put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.


# 1.107 23-Nov-2011 jmcneill

Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.


Revision tags: jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.106 02-Jul-2011 mrg

branches: 1.106.2; 1.106.4;
fix sequence point errors. diff explains best:
- sc->sc_playbuf = ++sc->sc_playbuf % sc->sc_nbufs;
+ sc->sc_playbuf = (sc->sc_playbuf + 1) % sc->sc_nbufs;


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase jym-xensuspend-base
# 1.105 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.104 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.103 17-Dec-2008 cegger

branches: 1.103.2;
kill MALLOC and FREE macros.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.102 28-Apr-2008 martin

branches: 1.102.8; 1.102.12;
Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base
# 1.101 08-Apr-2008 cegger

branches: 1.101.2; 1.101.4;
use aprint_*_dev and device_xname


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.100 19-Oct-2007 ad

branches: 1.100.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 vmlocking-base
# 1.99 25-Sep-2007 ad

branches: 1.99.2;
Use splhigh(), not disable_intr().


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base mjf-ufs-trans-base
# 1.98 09-Jul-2007 ad

branches: 1.98.6; 1.98.8; 1.98.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.97 04-Mar-2007 christos

branches: 1.97.2; 1.97.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.96 16-Nov-2006 christos

branches: 1.96.4; 1.96.6;
__unused removal on arguments; approved by core.


Revision tags: yamt-splraiseipl-base2
# 1.95 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


Revision tags: yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 rpaulo-netinet-merge-pcb-base
# 1.94 30-Aug-2006 christos

branches: 1.94.2; 1.94.4;
add missing initializers


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base
# 1.93 14-Apr-2006 christos

Coverity CID 2453: Add negative checks.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.92 25-Mar-2006 thorpej

Use device_parent().


# 1.91 17-Mar-2006 christos

don't use MALLOC with a non-constant size; use malloc instead.


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.90 11-Dec-2005 christos

branches: 1.90.4; 1.90.6; 1.90.8; 1.90.10; 1.90.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.89 30-May-2005 christos

branches: 1.89.2;
- add const
- avoid variable shadowing.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.88 27-Feb-2005 perry

nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base
# 1.87 13-Jan-2005 kent

branches: 1.87.2; 1.87.4;
ansify and KNF


# 1.86 10-Jan-2005 kent

merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes


Revision tags: kent-audio1-beforemerge kent-audio1-base
# 1.85 29-Oct-2004 yamt

branches: 1.85.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.


# 1.84 14-Sep-2004 drochner

Separate the namespace for default (ie unspecified) locators used
by the isa.c bus driver and the "address/whatever not specified"
argument passed to leaf device drivers.
The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter
"ISA_UNKNOWN_XXX", defined in isavar.h.
This way we save a dependency of every ISA device driver on "locators.h".


# 1.83 22-Apr-2004 itojun

sprintf -> snprintf


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.82 21-Nov-2003 gson

Code enabled by option AUDIO_DEBUG exhibited undefined behavior and
caused compiler warnings with gcc 3.3.2.


# 1.81 09-May-2003 fvdl

branches: 1.81.2;
A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.


# 1.80 03-May-2003 wiz

DMA, not dma nor Dma.


# 1.79 06-Apr-2003 wiz

Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge
# 1.78 11-Oct-2002 fvdl

Don't include <i386/isa/icu.h>


Revision tags: kqueue-base
# 1.77 02-Oct-2002 thorpej

Fix sizeof and whitespace bug from the script I'm using to do the
CFATTACH_DECL conversion. (Grumble.)


# 1.76 02-Oct-2002 thorpej

Use CFATTACH_DECL().


# 1.75 27-Sep-2002 thorpej

Declare all cfattach structures const.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base
# 1.74 07-Jan-2002 thorpej

Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
isa_attach_args. If either of these members are non-NULL,
direct configuration of the bus is being performed. Add an
ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
direct configuration is not being performed and the probe fucntion
is returning success.
* Adapt device drivers -- currently, all driver probe routines return
"no match" if ISA_DIRECT_CONFIG() evaluates to true.


# 1.73 13-Nov-2001 lukem

add RCSID


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3
# 1.72 03-Oct-2001 augustss

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).


Revision tags: thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.71 18-Jul-2001 thorpej

branches: 1.71.2;
bcopy -> memcpy


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.70 18-Jan-2001 jdolecek

branches: 1.70.2; 1.70.4;
constify


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.69 23-Mar-2000 thorpej

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.


Revision tags: chs-ubc2-newbase
# 1.68 07-Feb-2000 thorpej

Add a new function call to the ISA DMA API: isa_dmamaxsize(), which returns
the maximum transfer size for the specified DMA channel. Make all clients
of ISA DMA use this call to determine their maximum transfer size.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base kame_141_19991130 comdex-fall-1999-base fvdl-softdep-base netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.67 30-Mar-1999 mycroft

branches: 1.67.8;
The AD1848/CS4231 attachment doesn't create DMA maps any more, so we have to
do it here. This is preferrable anyway, since we're not actually doing DMA
through the AD/CS chip.


# 1.66 19-Feb-1999 mycroft

Fix structure names.


# 1.65 17-Feb-1999 mycroft

Update comments.


# 1.64 17-Feb-1999 mycroft

Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.63 09-Sep-1998 thorpej

Add mmap support for gus and gusmax, PR #5988, Feico Dillema.


# 1.62 06-Sep-1998 jtk

Correct the remaining uses of ad1848_softc to ad1848_isa_softc


# 1.61 01-Sep-1998 jtk

use ad1848_isa_attach, so GUS cards with CS4231 don't panic the kernel


# 1.60 25-Aug-1998 pk

Split the AD1848 driver into MI (dev/ic/ad1848.c) and ISA parts.


# 1.59 17-Aug-1998 augustss

* 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.


Revision tags: eeh-paddr_t-base
# 1.58 02-Jul-1998 mycroft

Cosmetic change.


# 1.57 17-Jun-1998 augustss

Remove a bunch of totally unnecessary #include <machine/pio.h>
left over from the olden days.


# 1.56 09-Jun-1998 thorpej

Nuke __BROKEN_INDIRECT_CONFIG.


# 1.55 09-Jun-1998 thorpej

Adjust for changes to the ISA DMA API.


# 1.54 20-May-1998 augustss

Add a Yamaha OPL3-SA3 driver and clean up all AD1848 drivers.
Submitted by Constantine Sapuntzakis <csapuntz@reeducation-labor.lcs.mit.edu>
and originally written for OpenBSD.


# 1.53 12-Mar-1998 augustss

Update probing for GUS a little. From soren@t.dk,
closes PR kern/5148.


# 1.52 09-Mar-1998 mikel

let panic() call DDB, don't do it ourselves; from Nathan Williams in PR 5131


# 1.51 25-Jan-1998 mycroft

Make sure we create DMA maps if the CD4231 probe fails.


# 1.50 13-Jan-1998 drochner

make it compile without BROKEN_INDIRECT_CONFIG


# 1.49 12-Jan-1998 thorpej

Update for config changes.


Revision tags: netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.48 19-Oct-1997 augustss

branches: 1.48.2;
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.


Revision tags: marc-pcmcia-base
# 1.47 11-Oct-1997 mycroft

AudioElinear -> AudioEslinear


# 1.46 11-Oct-1997 mycroft

AudioC[A-Z] -> AudioC[a-z]


# 1.45 09-Oct-1997 jtc

Fix tipo inherited from old version of TNF copyright template.


# 1.44 12-Sep-1997 augustss

Create DMA maps on ordinary GUS (non-MAX) cards. Now it should work again.


Revision tags: thorpej-signal-base
# 1.43 06-Sep-1997 augustss

Bus-ify the GUS driver.


# 1.42 26-Aug-1997 augustss

XXX Add a drq2 locator for the ISA bus. Many sound cards need
two DMA channels to do e.g. full-duplex. This allows
a way of specifying the second channel in a sane way.
THIS IS TEMPORARY. The drq2 locator will go away when
the locator system has been changed to allow multiple
values per locator.


# 1.41 24-Aug-1997 augustss

- 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.


# 1.40 19-Aug-1997 augustss

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.


# 1.39 07-Aug-1997 augustss

Add A-law support and fix bug on opening GUS max.
From Feico Dillema <dillema@spam.aurum>.


# 1.38 04-Aug-1997 augustss

Get rid of `register'.


# 1.37 04-Aug-1997 augustss

Use gusmax_get_props instead of gus_get_props for gusmax.


# 1.36 31-Jul-1997 augustss

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.


Revision tags: marc-pcmcia-bp
# 1.35 28-Jul-1997 augustss

branches: 1.35.2;
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.


# 1.34 27-Jul-1997 augustss

audio: Simplify handling of AUDIO_SETFD and committing of encoding mode.


# 1.33 27-Jul-1997 augustss

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.


# 1.32 15-Jul-1997 augustss

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.


# 1.31 09-Jul-1997 jtk

fix mixer goof on GUS max


# 1.30 06-Jun-1997 thorpej

Pull thorpej-bus-dma branch into mainline.


Revision tags: thorpej-bus-dma-base
# 1.29 29-May-1997 jtk

fix popping noises on 16-bit ulinear output.
add big-endian support
XXX ULINEAR_BE still needs ad1848 emulation on gusmax


# 1.28 13-May-1997 augustss

Clean up emulation code, SB, and GUS drivers and add some more encoding
emulation to SB.


# 1.27 12-May-1997 jtk

branches: 1.27.2;
restore accidentally-lost set of nchannels in driver layer


# 1.26 10-May-1997 jtk

use normal linear names/values for 8-bit encodings
mark mulaw as emulated (it's done via a mapping table)
use GUS query encoding routine, even on GUS max, since the encoding
stuff is handled by the GF1.
XXX might not be right for recording, but it's correct for playback.


# 1.25 09-May-1997 augustss

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.


# 1.24 07-May-1997 augustss

Convert to new orthogonal audio encoding scheme and implement
some of the new encodings. The change to ioctl AUDIO_GETENC is
NOT backwards compatible.


# 1.23 29-Apr-1997 augustss

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.


# 1.22 06-Apr-1997 augustss

Make sure the bus tag is set where we need it.


# 1.21 20-Mar-1997 mycroft

Combine set_encoding and set_precision into a single set_format interface.


# 1.20 19-Mar-1997 mycroft

Check for errors returned by AD1848 routines.


# 1.19 13-Mar-1997 mycroft

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.


Revision tags: is-newarp-before-merge is-newarp-base
# 1.18 13-Oct-1996 christos

backout kprintf changes


# 1.17 10-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.16 12-May-1996 mycroft

Use intr.h.


# 1.15 03-May-1996 jtk

make it work with GUSPLAYDEBUG defined


# 1.14 29-Apr-1996 christos

- prototype fixes


# 1.13 11-Apr-1996 cgd

update for addition of a machine-dependent cookie as the first argument
to isa_intr_{,dis}establish().


# 1.12 31-Mar-1996 jtk

add include file for function prototypes


# 1.11 17-Mar-1996 thorpej

New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.


# 1.10 01-Mar-1996 mycroft

Add support to the ISA DMA framework for auto-initialize mode.
Add experimental SB16 code, disabled for now.


# 1.9 17-Feb-1996 jtk

fix compile error from gusprobe() cleanup


# 1.8 17-Feb-1996 jtk

avoid panic'ing when driver gets confused--just spit out a message and
keep going.
Improve error messages to include device name.
use STATIC for function declarations/definitions so it's easier to get a
useful symbol table by flipping a switch.


# 1.7 16-Feb-1996 mycroft

Prototype the probe and attach functions.


# 1.6 05-Feb-1996 jtc

Fix error in copyright notice


# 1.5 05-Feb-1996 jtc

Received copyright assignment


# 1.4 24-Dec-1995 mycroft

The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.


# 1.3 10-Nov-1995 mycroft

Convert IRQ, DRQ, and port numbers to int.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.2 24-Jul-1995 cgd

fix function prototypes, usages, to match what the code actually does


# 1.1 19-Jul-1995 brezak

GUS audio driver from John Kohl.


# 1.116 08-May-2019 isaki

Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c


Revision tags: isaki-audio2-base
# 1.115 16-Mar-2019 isaki

branches: 1.115.2;
Use C99 style struct initializer to audio_hw_if.


# 1.114 03-Feb-2019 mrg

- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625
# 1.113 23-Jun-2018 maxv

constify


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.112 31-Oct-2017 nat

branches: 1.112.2;
Add padding to gus.c so fields match up when it ts cast to a ad1848_isa
softc for the allocation of hw ring buffers.

Locking fixes as gus KASSERTS / uses the codec locks.

Ok christos@.


Revision tags: matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204
# 1.111 01-Feb-2017 jakllsch

branches: 1.111.6;
Use boolean logical and operation on booleans, rather than bitwise and.

From David Binderman in PR kern/51936.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.110 11-Jul-2016 msaitoh

branches: 1.110.2; 1.110.4;
KNF. No functional change.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.109 27-Oct-2012 chs

branches: 1.109.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base
# 1.108 24-Nov-2011 mrg

branches: 1.108.8;
put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.


# 1.107 23-Nov-2011 jmcneill

Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.


Revision tags: jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.106 02-Jul-2011 mrg

branches: 1.106.2; 1.106.4;
fix sequence point errors. diff explains best:
- sc->sc_playbuf = ++sc->sc_playbuf % sc->sc_nbufs;
+ sc->sc_playbuf = (sc->sc_playbuf + 1) % sc->sc_nbufs;


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase jym-xensuspend-base
# 1.105 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.104 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.103 17-Dec-2008 cegger

branches: 1.103.2;
kill MALLOC and FREE macros.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.102 28-Apr-2008 martin

branches: 1.102.8; 1.102.12;
Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base
# 1.101 08-Apr-2008 cegger

branches: 1.101.2; 1.101.4;
use aprint_*_dev and device_xname


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.100 19-Oct-2007 ad

branches: 1.100.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 vmlocking-base
# 1.99 25-Sep-2007 ad

branches: 1.99.2;
Use splhigh(), not disable_intr().


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base mjf-ufs-trans-base
# 1.98 09-Jul-2007 ad

branches: 1.98.6; 1.98.8; 1.98.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.97 04-Mar-2007 christos

branches: 1.97.2; 1.97.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.96 16-Nov-2006 christos

branches: 1.96.4; 1.96.6;
__unused removal on arguments; approved by core.


Revision tags: yamt-splraiseipl-base2
# 1.95 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


Revision tags: yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 rpaulo-netinet-merge-pcb-base
# 1.94 30-Aug-2006 christos

branches: 1.94.2; 1.94.4;
add missing initializers


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base
# 1.93 14-Apr-2006 christos

Coverity CID 2453: Add negative checks.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.92 25-Mar-2006 thorpej

Use device_parent().


# 1.91 17-Mar-2006 christos

don't use MALLOC with a non-constant size; use malloc instead.


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.90 11-Dec-2005 christos

branches: 1.90.4; 1.90.6; 1.90.8; 1.90.10; 1.90.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.89 30-May-2005 christos

branches: 1.89.2;
- add const
- avoid variable shadowing.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.88 27-Feb-2005 perry

nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base
# 1.87 13-Jan-2005 kent

branches: 1.87.2; 1.87.4;
ansify and KNF


# 1.86 10-Jan-2005 kent

merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes


Revision tags: kent-audio1-beforemerge kent-audio1-base
# 1.85 29-Oct-2004 yamt

branches: 1.85.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.


# 1.84 14-Sep-2004 drochner

Separate the namespace for default (ie unspecified) locators used
by the isa.c bus driver and the "address/whatever not specified"
argument passed to leaf device drivers.
The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter
"ISA_UNKNOWN_XXX", defined in isavar.h.
This way we save a dependency of every ISA device driver on "locators.h".


# 1.83 22-Apr-2004 itojun

sprintf -> snprintf


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.82 21-Nov-2003 gson

Code enabled by option AUDIO_DEBUG exhibited undefined behavior and
caused compiler warnings with gcc 3.3.2.


# 1.81 09-May-2003 fvdl

branches: 1.81.2;
A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.


# 1.80 03-May-2003 wiz

DMA, not dma nor Dma.


# 1.79 06-Apr-2003 wiz

Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge
# 1.78 11-Oct-2002 fvdl

Don't include <i386/isa/icu.h>


Revision tags: kqueue-base
# 1.77 02-Oct-2002 thorpej

Fix sizeof and whitespace bug from the script I'm using to do the
CFATTACH_DECL conversion. (Grumble.)


# 1.76 02-Oct-2002 thorpej

Use CFATTACH_DECL().


# 1.75 27-Sep-2002 thorpej

Declare all cfattach structures const.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base
# 1.74 07-Jan-2002 thorpej

Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
isa_attach_args. If either of these members are non-NULL,
direct configuration of the bus is being performed. Add an
ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
direct configuration is not being performed and the probe fucntion
is returning success.
* Adapt device drivers -- currently, all driver probe routines return
"no match" if ISA_DIRECT_CONFIG() evaluates to true.


# 1.73 13-Nov-2001 lukem

add RCSID


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3
# 1.72 03-Oct-2001 augustss

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).


Revision tags: thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.71 18-Jul-2001 thorpej

branches: 1.71.2;
bcopy -> memcpy


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.70 18-Jan-2001 jdolecek

branches: 1.70.2; 1.70.4;
constify


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.69 23-Mar-2000 thorpej

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.


Revision tags: chs-ubc2-newbase
# 1.68 07-Feb-2000 thorpej

Add a new function call to the ISA DMA API: isa_dmamaxsize(), which returns
the maximum transfer size for the specified DMA channel. Make all clients
of ISA DMA use this call to determine their maximum transfer size.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base kame_141_19991130 comdex-fall-1999-base fvdl-softdep-base netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.67 30-Mar-1999 mycroft

branches: 1.67.8;
The AD1848/CS4231 attachment doesn't create DMA maps any more, so we have to
do it here. This is preferrable anyway, since we're not actually doing DMA
through the AD/CS chip.


# 1.66 19-Feb-1999 mycroft

Fix structure names.


# 1.65 17-Feb-1999 mycroft

Update comments.


# 1.64 17-Feb-1999 mycroft

Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.63 09-Sep-1998 thorpej

Add mmap support for gus and gusmax, PR #5988, Feico Dillema.


# 1.62 06-Sep-1998 jtk

Correct the remaining uses of ad1848_softc to ad1848_isa_softc


# 1.61 01-Sep-1998 jtk

use ad1848_isa_attach, so GUS cards with CS4231 don't panic the kernel


# 1.60 25-Aug-1998 pk

Split the AD1848 driver into MI (dev/ic/ad1848.c) and ISA parts.


# 1.59 17-Aug-1998 augustss

* 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.


Revision tags: eeh-paddr_t-base
# 1.58 02-Jul-1998 mycroft

Cosmetic change.


# 1.57 17-Jun-1998 augustss

Remove a bunch of totally unnecessary #include <machine/pio.h>
left over from the olden days.


# 1.56 09-Jun-1998 thorpej

Nuke __BROKEN_INDIRECT_CONFIG.


# 1.55 09-Jun-1998 thorpej

Adjust for changes to the ISA DMA API.


# 1.54 20-May-1998 augustss

Add a Yamaha OPL3-SA3 driver and clean up all AD1848 drivers.
Submitted by Constantine Sapuntzakis <csapuntz@reeducation-labor.lcs.mit.edu>
and originally written for OpenBSD.


# 1.53 12-Mar-1998 augustss

Update probing for GUS a little. From soren@t.dk,
closes PR kern/5148.


# 1.52 09-Mar-1998 mikel

let panic() call DDB, don't do it ourselves; from Nathan Williams in PR 5131


# 1.51 25-Jan-1998 mycroft

Make sure we create DMA maps if the CD4231 probe fails.


# 1.50 13-Jan-1998 drochner

make it compile without BROKEN_INDIRECT_CONFIG


# 1.49 12-Jan-1998 thorpej

Update for config changes.


Revision tags: netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.48 19-Oct-1997 augustss

branches: 1.48.2;
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.


Revision tags: marc-pcmcia-base
# 1.47 11-Oct-1997 mycroft

AudioElinear -> AudioEslinear


# 1.46 11-Oct-1997 mycroft

AudioC[A-Z] -> AudioC[a-z]


# 1.45 09-Oct-1997 jtc

Fix tipo inherited from old version of TNF copyright template.


# 1.44 12-Sep-1997 augustss

Create DMA maps on ordinary GUS (non-MAX) cards. Now it should work again.


Revision tags: thorpej-signal-base
# 1.43 06-Sep-1997 augustss

Bus-ify the GUS driver.


# 1.42 26-Aug-1997 augustss

XXX Add a drq2 locator for the ISA bus. Many sound cards need
two DMA channels to do e.g. full-duplex. This allows
a way of specifying the second channel in a sane way.
THIS IS TEMPORARY. The drq2 locator will go away when
the locator system has been changed to allow multiple
values per locator.


# 1.41 24-Aug-1997 augustss

- 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.


# 1.40 19-Aug-1997 augustss

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.


# 1.39 07-Aug-1997 augustss

Add A-law support and fix bug on opening GUS max.
From Feico Dillema <dillema@spam.aurum>.


# 1.38 04-Aug-1997 augustss

Get rid of `register'.


# 1.37 04-Aug-1997 augustss

Use gusmax_get_props instead of gus_get_props for gusmax.


# 1.36 31-Jul-1997 augustss

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.


Revision tags: marc-pcmcia-bp
# 1.35 28-Jul-1997 augustss

branches: 1.35.2;
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.


# 1.34 27-Jul-1997 augustss

audio: Simplify handling of AUDIO_SETFD and committing of encoding mode.


# 1.33 27-Jul-1997 augustss

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.


# 1.32 15-Jul-1997 augustss

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.


# 1.31 09-Jul-1997 jtk

fix mixer goof on GUS max


# 1.30 06-Jun-1997 thorpej

Pull thorpej-bus-dma branch into mainline.


Revision tags: thorpej-bus-dma-base
# 1.29 29-May-1997 jtk

fix popping noises on 16-bit ulinear output.
add big-endian support
XXX ULINEAR_BE still needs ad1848 emulation on gusmax


# 1.28 13-May-1997 augustss

Clean up emulation code, SB, and GUS drivers and add some more encoding
emulation to SB.


# 1.27 12-May-1997 jtk

branches: 1.27.2;
restore accidentally-lost set of nchannels in driver layer


# 1.26 10-May-1997 jtk

use normal linear names/values for 8-bit encodings
mark mulaw as emulated (it's done via a mapping table)
use GUS query encoding routine, even on GUS max, since the encoding
stuff is handled by the GF1.
XXX might not be right for recording, but it's correct for playback.


# 1.25 09-May-1997 augustss

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.


# 1.24 07-May-1997 augustss

Convert to new orthogonal audio encoding scheme and implement
some of the new encodings. The change to ioctl AUDIO_GETENC is
NOT backwards compatible.


# 1.23 29-Apr-1997 augustss

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.


# 1.22 06-Apr-1997 augustss

Make sure the bus tag is set where we need it.


# 1.21 20-Mar-1997 mycroft

Combine set_encoding and set_precision into a single set_format interface.


# 1.20 19-Mar-1997 mycroft

Check for errors returned by AD1848 routines.


# 1.19 13-Mar-1997 mycroft

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.


Revision tags: is-newarp-before-merge is-newarp-base
# 1.18 13-Oct-1996 christos

backout kprintf changes


# 1.17 10-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.16 12-May-1996 mycroft

Use intr.h.


# 1.15 03-May-1996 jtk

make it work with GUSPLAYDEBUG defined


# 1.14 29-Apr-1996 christos

- prototype fixes


# 1.13 11-Apr-1996 cgd

update for addition of a machine-dependent cookie as the first argument
to isa_intr_{,dis}establish().


# 1.12 31-Mar-1996 jtk

add include file for function prototypes


# 1.11 17-Mar-1996 thorpej

New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.


# 1.10 01-Mar-1996 mycroft

Add support to the ISA DMA framework for auto-initialize mode.
Add experimental SB16 code, disabled for now.


# 1.9 17-Feb-1996 jtk

fix compile error from gusprobe() cleanup


# 1.8 17-Feb-1996 jtk

avoid panic'ing when driver gets confused--just spit out a message and
keep going.
Improve error messages to include device name.
use STATIC for function declarations/definitions so it's easier to get a
useful symbol table by flipping a switch.


# 1.7 16-Feb-1996 mycroft

Prototype the probe and attach functions.


# 1.6 05-Feb-1996 jtc

Fix error in copyright notice


# 1.5 05-Feb-1996 jtc

Received copyright assignment


# 1.4 24-Dec-1995 mycroft

The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.


# 1.3 10-Nov-1995 mycroft

Convert IRQ, DRQ, and port numbers to int.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.2 24-Jul-1995 cgd

fix function prototypes, usages, to match what the code actually does


# 1.1 19-Jul-1995 brezak

GUS audio driver from John Kohl.


Revision tags: isaki-audio2-base
# 1.115 16-Mar-2019 isaki

branches: 1.115.2;
Use C99 style struct initializer to audio_hw_if.


# 1.114 03-Feb-2019 mrg

- add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625
# 1.113 23-Jun-2018 maxv

constify


Revision tags: pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
# 1.112 31-Oct-2017 nat

branches: 1.112.2;
Add padding to gus.c so fields match up when it ts cast to a ad1848_isa
softc for the allocation of hw ring buffers.

Locking fixes as gus KASSERTS / uses the codec locks.

Ok christos@.


Revision tags: matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204
# 1.111 01-Feb-2017 jakllsch

branches: 1.111.6;
Use boolean logical and operation on booleans, rather than bitwise and.

From David Binderman in PR kern/51936.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.110 11-Jul-2016 msaitoh

branches: 1.110.2; 1.110.4;
KNF. No functional change.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.109 27-Oct-2012 chs

branches: 1.109.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base
# 1.108 24-Nov-2011 mrg

branches: 1.108.8;
put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.


# 1.107 23-Nov-2011 jmcneill

Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.


Revision tags: jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.106 02-Jul-2011 mrg

branches: 1.106.2; 1.106.4;
fix sequence point errors. diff explains best:
- sc->sc_playbuf = ++sc->sc_playbuf % sc->sc_nbufs;
+ sc->sc_playbuf = (sc->sc_playbuf + 1) % sc->sc_nbufs;


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase jym-xensuspend-base
# 1.105 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.104 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.103 17-Dec-2008 cegger

branches: 1.103.2;
kill MALLOC and FREE macros.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.102 28-Apr-2008 martin

branches: 1.102.8; 1.102.12;
Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base
# 1.101 08-Apr-2008 cegger

branches: 1.101.2; 1.101.4;
use aprint_*_dev and device_xname


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.100 19-Oct-2007 ad

branches: 1.100.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 vmlocking-base
# 1.99 25-Sep-2007 ad

branches: 1.99.2;
Use splhigh(), not disable_intr().


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base mjf-ufs-trans-base
# 1.98 09-Jul-2007 ad

branches: 1.98.6; 1.98.8; 1.98.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.97 04-Mar-2007 christos

branches: 1.97.2; 1.97.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.96 16-Nov-2006 christos

branches: 1.96.4; 1.96.6;
__unused removal on arguments; approved by core.


Revision tags: yamt-splraiseipl-base2
# 1.95 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


Revision tags: yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 rpaulo-netinet-merge-pcb-base
# 1.94 30-Aug-2006 christos

branches: 1.94.2; 1.94.4;
add missing initializers


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base
# 1.93 14-Apr-2006 christos

Coverity CID 2453: Add negative checks.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.92 25-Mar-2006 thorpej

Use device_parent().


# 1.91 17-Mar-2006 christos

don't use MALLOC with a non-constant size; use malloc instead.


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.90 11-Dec-2005 christos

branches: 1.90.4; 1.90.6; 1.90.8; 1.90.10; 1.90.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.89 30-May-2005 christos

branches: 1.89.2;
- add const
- avoid variable shadowing.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.88 27-Feb-2005 perry

nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base
# 1.87 13-Jan-2005 kent

branches: 1.87.2; 1.87.4;
ansify and KNF


# 1.86 10-Jan-2005 kent

merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes


Revision tags: kent-audio1-beforemerge kent-audio1-base
# 1.85 29-Oct-2004 yamt

branches: 1.85.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.


# 1.84 14-Sep-2004 drochner

Separate the namespace for default (ie unspecified) locators used
by the isa.c bus driver and the "address/whatever not specified"
argument passed to leaf device drivers.
The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter
"ISA_UNKNOWN_XXX", defined in isavar.h.
This way we save a dependency of every ISA device driver on "locators.h".


# 1.83 22-Apr-2004 itojun

sprintf -> snprintf


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.82 21-Nov-2003 gson

Code enabled by option AUDIO_DEBUG exhibited undefined behavior and
caused compiler warnings with gcc 3.3.2.


# 1.81 09-May-2003 fvdl

branches: 1.81.2;
A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.


# 1.80 03-May-2003 wiz

DMA, not dma nor Dma.


# 1.79 06-Apr-2003 wiz

Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge
# 1.78 11-Oct-2002 fvdl

Don't include <i386/isa/icu.h>


Revision tags: kqueue-base
# 1.77 02-Oct-2002 thorpej

Fix sizeof and whitespace bug from the script I'm using to do the
CFATTACH_DECL conversion. (Grumble.)


# 1.76 02-Oct-2002 thorpej

Use CFATTACH_DECL().


# 1.75 27-Sep-2002 thorpej

Declare all cfattach structures const.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base
# 1.74 07-Jan-2002 thorpej

Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
isa_attach_args. If either of these members are non-NULL,
direct configuration of the bus is being performed. Add an
ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
direct configuration is not being performed and the probe fucntion
is returning success.
* Adapt device drivers -- currently, all driver probe routines return
"no match" if ISA_DIRECT_CONFIG() evaluates to true.


# 1.73 13-Nov-2001 lukem

add RCSID


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3
# 1.72 03-Oct-2001 augustss

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).


Revision tags: thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.71 18-Jul-2001 thorpej

branches: 1.71.2;
bcopy -> memcpy


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.70 18-Jan-2001 jdolecek

branches: 1.70.2; 1.70.4;
constify


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.69 23-Mar-2000 thorpej

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.


Revision tags: chs-ubc2-newbase
# 1.68 07-Feb-2000 thorpej

Add a new function call to the ISA DMA API: isa_dmamaxsize(), which returns
the maximum transfer size for the specified DMA channel. Make all clients
of ISA DMA use this call to determine their maximum transfer size.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base kame_141_19991130 comdex-fall-1999-base fvdl-softdep-base netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.67 30-Mar-1999 mycroft

branches: 1.67.8;
The AD1848/CS4231 attachment doesn't create DMA maps any more, so we have to
do it here. This is preferrable anyway, since we're not actually doing DMA
through the AD/CS chip.


# 1.66 19-Feb-1999 mycroft

Fix structure names.


# 1.65 17-Feb-1999 mycroft

Update comments.


# 1.64 17-Feb-1999 mycroft

Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.63 09-Sep-1998 thorpej

Add mmap support for gus and gusmax, PR #5988, Feico Dillema.


# 1.62 06-Sep-1998 jtk

Correct the remaining uses of ad1848_softc to ad1848_isa_softc


# 1.61 01-Sep-1998 jtk

use ad1848_isa_attach, so GUS cards with CS4231 don't panic the kernel


# 1.60 25-Aug-1998 pk

Split the AD1848 driver into MI (dev/ic/ad1848.c) and ISA parts.


# 1.59 17-Aug-1998 augustss

* 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.


Revision tags: eeh-paddr_t-base
# 1.58 02-Jul-1998 mycroft

Cosmetic change.


# 1.57 17-Jun-1998 augustss

Remove a bunch of totally unnecessary #include <machine/pio.h>
left over from the olden days.


# 1.56 09-Jun-1998 thorpej

Nuke __BROKEN_INDIRECT_CONFIG.


# 1.55 09-Jun-1998 thorpej

Adjust for changes to the ISA DMA API.


# 1.54 20-May-1998 augustss

Add a Yamaha OPL3-SA3 driver and clean up all AD1848 drivers.
Submitted by Constantine Sapuntzakis <csapuntz@reeducation-labor.lcs.mit.edu>
and originally written for OpenBSD.


# 1.53 12-Mar-1998 augustss

Update probing for GUS a little. From soren@t.dk,
closes PR kern/5148.


# 1.52 09-Mar-1998 mikel

let panic() call DDB, don't do it ourselves; from Nathan Williams in PR 5131


# 1.51 25-Jan-1998 mycroft

Make sure we create DMA maps if the CD4231 probe fails.


# 1.50 13-Jan-1998 drochner

make it compile without BROKEN_INDIRECT_CONFIG


# 1.49 12-Jan-1998 thorpej

Update for config changes.


Revision tags: netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.48 19-Oct-1997 augustss

branches: 1.48.2;
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.


Revision tags: marc-pcmcia-base
# 1.47 11-Oct-1997 mycroft

AudioElinear -> AudioEslinear


# 1.46 11-Oct-1997 mycroft

AudioC[A-Z] -> AudioC[a-z]


# 1.45 09-Oct-1997 jtc

Fix tipo inherited from old version of TNF copyright template.


# 1.44 12-Sep-1997 augustss

Create DMA maps on ordinary GUS (non-MAX) cards. Now it should work again.


Revision tags: thorpej-signal-base
# 1.43 06-Sep-1997 augustss

Bus-ify the GUS driver.


# 1.42 26-Aug-1997 augustss

XXX Add a drq2 locator for the ISA bus. Many sound cards need
two DMA channels to do e.g. full-duplex. This allows
a way of specifying the second channel in a sane way.
THIS IS TEMPORARY. The drq2 locator will go away when
the locator system has been changed to allow multiple
values per locator.


# 1.41 24-Aug-1997 augustss

- 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.


# 1.40 19-Aug-1997 augustss

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.


# 1.39 07-Aug-1997 augustss

Add A-law support and fix bug on opening GUS max.
From Feico Dillema <dillema@spam.aurum>.


# 1.38 04-Aug-1997 augustss

Get rid of `register'.


# 1.37 04-Aug-1997 augustss

Use gusmax_get_props instead of gus_get_props for gusmax.


# 1.36 31-Jul-1997 augustss

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.


Revision tags: marc-pcmcia-bp
# 1.35 28-Jul-1997 augustss

branches: 1.35.2;
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.


# 1.34 27-Jul-1997 augustss

audio: Simplify handling of AUDIO_SETFD and committing of encoding mode.


# 1.33 27-Jul-1997 augustss

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.


# 1.32 15-Jul-1997 augustss

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.


# 1.31 09-Jul-1997 jtk

fix mixer goof on GUS max


# 1.30 06-Jun-1997 thorpej

Pull thorpej-bus-dma branch into mainline.


Revision tags: thorpej-bus-dma-base
# 1.29 29-May-1997 jtk

fix popping noises on 16-bit ulinear output.
add big-endian support
XXX ULINEAR_BE still needs ad1848 emulation on gusmax


# 1.28 13-May-1997 augustss

Clean up emulation code, SB, and GUS drivers and add some more encoding
emulation to SB.


# 1.27 12-May-1997 jtk

branches: 1.27.2;
restore accidentally-lost set of nchannels in driver layer


# 1.26 10-May-1997 jtk

use normal linear names/values for 8-bit encodings
mark mulaw as emulated (it's done via a mapping table)
use GUS query encoding routine, even on GUS max, since the encoding
stuff is handled by the GF1.
XXX might not be right for recording, but it's correct for playback.


# 1.25 09-May-1997 augustss

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.


# 1.24 07-May-1997 augustss

Convert to new orthogonal audio encoding scheme and implement
some of the new encodings. The change to ioctl AUDIO_GETENC is
NOT backwards compatible.


# 1.23 29-Apr-1997 augustss

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.


# 1.22 06-Apr-1997 augustss

Make sure the bus tag is set where we need it.


# 1.21 20-Mar-1997 mycroft

Combine set_encoding and set_precision into a single set_format interface.


# 1.20 19-Mar-1997 mycroft

Check for errors returned by AD1848 routines.


# 1.19 13-Mar-1997 mycroft

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.


Revision tags: is-newarp-before-merge is-newarp-base
# 1.18 13-Oct-1996 christos

backout kprintf changes


# 1.17 10-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.16 12-May-1996 mycroft

Use intr.h.


# 1.15 03-May-1996 jtk

make it work with GUSPLAYDEBUG defined


# 1.14 29-Apr-1996 christos

- prototype fixes


# 1.13 11-Apr-1996 cgd

update for addition of a machine-dependent cookie as the first argument
to isa_intr_{,dis}establish().


# 1.12 31-Mar-1996 jtk

add include file for function prototypes


# 1.11 17-Mar-1996 thorpej

New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.


# 1.10 01-Mar-1996 mycroft

Add support to the ISA DMA framework for auto-initialize mode.
Add experimental SB16 code, disabled for now.


# 1.9 17-Feb-1996 jtk

fix compile error from gusprobe() cleanup


# 1.8 17-Feb-1996 jtk

avoid panic'ing when driver gets confused--just spit out a message and
keep going.
Improve error messages to include device name.
use STATIC for function declarations/definitions so it's easier to get a
useful symbol table by flipping a switch.


# 1.7 16-Feb-1996 mycroft

Prototype the probe and attach functions.


# 1.6 05-Feb-1996 jtc

Fix error in copyright notice


# 1.5 05-Feb-1996 jtc

Received copyright assignment


# 1.4 24-Dec-1995 mycroft

The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.


# 1.3 10-Nov-1995 mycroft

Convert IRQ, DRQ, and port numbers to int.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.2 24-Jul-1995 cgd

fix function prototypes, usages, to match what the code actually does


# 1.1 19-Jul-1995 brezak

GUS audio driver from John Kohl.


# 1.112 31-Oct-2017 nat

Add padding to gus.c so fields match up when it ts cast to a ad1848_isa
softc for the allocation of hw ring buffers.

Locking fixes as gus KASSERTS / uses the codec locks.

Ok christos@.


Revision tags: matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204
# 1.111 01-Feb-2017 jakllsch

Use boolean logical and operation on booleans, rather than bitwise and.

From David Binderman in PR kern/51936.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.110 11-Jul-2016 msaitoh

branches: 1.110.2; 1.110.4;
KNF. No functional change.


Revision tags: netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.109 27-Oct-2012 chs

branches: 1.109.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base
# 1.108 24-Nov-2011 mrg

branches: 1.108.8;
put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.


# 1.107 23-Nov-2011 jmcneill

Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.


Revision tags: jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.106 02-Jul-2011 mrg

branches: 1.106.2; 1.106.4;
fix sequence point errors. diff explains best:
- sc->sc_playbuf = ++sc->sc_playbuf % sc->sc_nbufs;
+ sc->sc_playbuf = (sc->sc_playbuf + 1) % sc->sc_nbufs;


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase jym-xensuspend-base
# 1.105 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.104 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.103 17-Dec-2008 cegger

branches: 1.103.2;
kill MALLOC and FREE macros.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.102 28-Apr-2008 martin

branches: 1.102.8; 1.102.12;
Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base
# 1.101 08-Apr-2008 cegger

branches: 1.101.2; 1.101.4;
use aprint_*_dev and device_xname


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.100 19-Oct-2007 ad

branches: 1.100.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 vmlocking-base
# 1.99 25-Sep-2007 ad

branches: 1.99.2;
Use splhigh(), not disable_intr().


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base mjf-ufs-trans-base
# 1.98 09-Jul-2007 ad

branches: 1.98.6; 1.98.8; 1.98.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.97 04-Mar-2007 christos

branches: 1.97.2; 1.97.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.96 16-Nov-2006 christos

branches: 1.96.4; 1.96.6;
__unused removal on arguments; approved by core.


Revision tags: yamt-splraiseipl-base2
# 1.95 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


Revision tags: yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 rpaulo-netinet-merge-pcb-base
# 1.94 30-Aug-2006 christos

branches: 1.94.2; 1.94.4;
add missing initializers


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base
# 1.93 14-Apr-2006 christos

Coverity CID 2453: Add negative checks.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.92 25-Mar-2006 thorpej

Use device_parent().


# 1.91 17-Mar-2006 christos

don't use MALLOC with a non-constant size; use malloc instead.


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.90 11-Dec-2005 christos

branches: 1.90.4; 1.90.6; 1.90.8; 1.90.10; 1.90.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.89 30-May-2005 christos

branches: 1.89.2;
- add const
- avoid variable shadowing.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.88 27-Feb-2005 perry

nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base
# 1.87 13-Jan-2005 kent

branches: 1.87.2; 1.87.4;
ansify and KNF


# 1.86 10-Jan-2005 kent

merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes


Revision tags: kent-audio1-beforemerge kent-audio1-base
# 1.85 29-Oct-2004 yamt

branches: 1.85.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.


# 1.84 14-Sep-2004 drochner

Separate the namespace for default (ie unspecified) locators used
by the isa.c bus driver and the "address/whatever not specified"
argument passed to leaf device drivers.
The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter
"ISA_UNKNOWN_XXX", defined in isavar.h.
This way we save a dependency of every ISA device driver on "locators.h".


# 1.83 22-Apr-2004 itojun

sprintf -> snprintf


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.82 21-Nov-2003 gson

Code enabled by option AUDIO_DEBUG exhibited undefined behavior and
caused compiler warnings with gcc 3.3.2.


# 1.81 09-May-2003 fvdl

branches: 1.81.2;
A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.


# 1.80 03-May-2003 wiz

DMA, not dma nor Dma.


# 1.79 06-Apr-2003 wiz

Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge
# 1.78 11-Oct-2002 fvdl

Don't include <i386/isa/icu.h>


Revision tags: kqueue-base
# 1.77 02-Oct-2002 thorpej

Fix sizeof and whitespace bug from the script I'm using to do the
CFATTACH_DECL conversion. (Grumble.)


# 1.76 02-Oct-2002 thorpej

Use CFATTACH_DECL().


# 1.75 27-Sep-2002 thorpej

Declare all cfattach structures const.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base
# 1.74 07-Jan-2002 thorpej

Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
isa_attach_args. If either of these members are non-NULL,
direct configuration of the bus is being performed. Add an
ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
direct configuration is not being performed and the probe fucntion
is returning success.
* Adapt device drivers -- currently, all driver probe routines return
"no match" if ISA_DIRECT_CONFIG() evaluates to true.


# 1.73 13-Nov-2001 lukem

add RCSID


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3
# 1.72 03-Oct-2001 augustss

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).


Revision tags: thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.71 18-Jul-2001 thorpej

branches: 1.71.2;
bcopy -> memcpy


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.70 18-Jan-2001 jdolecek

branches: 1.70.2; 1.70.4;
constify


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.69 23-Mar-2000 thorpej

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.


Revision tags: chs-ubc2-newbase
# 1.68 07-Feb-2000 thorpej

Add a new function call to the ISA DMA API: isa_dmamaxsize(), which returns
the maximum transfer size for the specified DMA channel. Make all clients
of ISA DMA use this call to determine their maximum transfer size.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base kame_141_19991130 comdex-fall-1999-base fvdl-softdep-base netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.67 30-Mar-1999 mycroft

branches: 1.67.8;
The AD1848/CS4231 attachment doesn't create DMA maps any more, so we have to
do it here. This is preferrable anyway, since we're not actually doing DMA
through the AD/CS chip.


# 1.66 19-Feb-1999 mycroft

Fix structure names.


# 1.65 17-Feb-1999 mycroft

Update comments.


# 1.64 17-Feb-1999 mycroft

Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.63 09-Sep-1998 thorpej

Add mmap support for gus and gusmax, PR #5988, Feico Dillema.


# 1.62 06-Sep-1998 jtk

Correct the remaining uses of ad1848_softc to ad1848_isa_softc


# 1.61 01-Sep-1998 jtk

use ad1848_isa_attach, so GUS cards with CS4231 don't panic the kernel


# 1.60 25-Aug-1998 pk

Split the AD1848 driver into MI (dev/ic/ad1848.c) and ISA parts.


# 1.59 17-Aug-1998 augustss

* 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.


Revision tags: eeh-paddr_t-base
# 1.58 02-Jul-1998 mycroft

Cosmetic change.


# 1.57 17-Jun-1998 augustss

Remove a bunch of totally unnecessary #include <machine/pio.h>
left over from the olden days.


# 1.56 09-Jun-1998 thorpej

Nuke __BROKEN_INDIRECT_CONFIG.


# 1.55 09-Jun-1998 thorpej

Adjust for changes to the ISA DMA API.


# 1.54 20-May-1998 augustss

Add a Yamaha OPL3-SA3 driver and clean up all AD1848 drivers.
Submitted by Constantine Sapuntzakis <csapuntz@reeducation-labor.lcs.mit.edu>
and originally written for OpenBSD.


# 1.53 12-Mar-1998 augustss

Update probing for GUS a little. From soren@t.dk,
closes PR kern/5148.


# 1.52 09-Mar-1998 mikel

let panic() call DDB, don't do it ourselves; from Nathan Williams in PR 5131


# 1.51 25-Jan-1998 mycroft

Make sure we create DMA maps if the CD4231 probe fails.


# 1.50 13-Jan-1998 drochner

make it compile without BROKEN_INDIRECT_CONFIG


# 1.49 12-Jan-1998 thorpej

Update for config changes.


Revision tags: netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.48 19-Oct-1997 augustss

branches: 1.48.2;
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.


Revision tags: marc-pcmcia-base
# 1.47 11-Oct-1997 mycroft

AudioElinear -> AudioEslinear


# 1.46 11-Oct-1997 mycroft

AudioC[A-Z] -> AudioC[a-z]


# 1.45 09-Oct-1997 jtc

Fix tipo inherited from old version of TNF copyright template.


# 1.44 12-Sep-1997 augustss

Create DMA maps on ordinary GUS (non-MAX) cards. Now it should work again.


Revision tags: thorpej-signal-base
# 1.43 06-Sep-1997 augustss

Bus-ify the GUS driver.


# 1.42 26-Aug-1997 augustss

XXX Add a drq2 locator for the ISA bus. Many sound cards need
two DMA channels to do e.g. full-duplex. This allows
a way of specifying the second channel in a sane way.
THIS IS TEMPORARY. The drq2 locator will go away when
the locator system has been changed to allow multiple
values per locator.


# 1.41 24-Aug-1997 augustss

- 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.


# 1.40 19-Aug-1997 augustss

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.


# 1.39 07-Aug-1997 augustss

Add A-law support and fix bug on opening GUS max.
From Feico Dillema <dillema@spam.aurum>.


# 1.38 04-Aug-1997 augustss

Get rid of `register'.


# 1.37 04-Aug-1997 augustss

Use gusmax_get_props instead of gus_get_props for gusmax.


# 1.36 31-Jul-1997 augustss

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.


Revision tags: marc-pcmcia-bp
# 1.35 28-Jul-1997 augustss

branches: 1.35.2;
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.


# 1.34 27-Jul-1997 augustss

audio: Simplify handling of AUDIO_SETFD and committing of encoding mode.


# 1.33 27-Jul-1997 augustss

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.


# 1.32 15-Jul-1997 augustss

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.


# 1.31 09-Jul-1997 jtk

fix mixer goof on GUS max


# 1.30 06-Jun-1997 thorpej

Pull thorpej-bus-dma branch into mainline.


Revision tags: thorpej-bus-dma-base
# 1.29 29-May-1997 jtk

fix popping noises on 16-bit ulinear output.
add big-endian support
XXX ULINEAR_BE still needs ad1848 emulation on gusmax


# 1.28 13-May-1997 augustss

Clean up emulation code, SB, and GUS drivers and add some more encoding
emulation to SB.


# 1.27 12-May-1997 jtk

branches: 1.27.2;
restore accidentally-lost set of nchannels in driver layer


# 1.26 10-May-1997 jtk

use normal linear names/values for 8-bit encodings
mark mulaw as emulated (it's done via a mapping table)
use GUS query encoding routine, even on GUS max, since the encoding
stuff is handled by the GF1.
XXX might not be right for recording, but it's correct for playback.


# 1.25 09-May-1997 augustss

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.


# 1.24 07-May-1997 augustss

Convert to new orthogonal audio encoding scheme and implement
some of the new encodings. The change to ioctl AUDIO_GETENC is
NOT backwards compatible.


# 1.23 29-Apr-1997 augustss

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.


# 1.22 06-Apr-1997 augustss

Make sure the bus tag is set where we need it.


# 1.21 20-Mar-1997 mycroft

Combine set_encoding and set_precision into a single set_format interface.


# 1.20 19-Mar-1997 mycroft

Check for errors returned by AD1848 routines.


# 1.19 13-Mar-1997 mycroft

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.


Revision tags: is-newarp-before-merge is-newarp-base
# 1.18 13-Oct-1996 christos

backout kprintf changes


# 1.17 10-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.16 12-May-1996 mycroft

Use intr.h.


# 1.15 03-May-1996 jtk

make it work with GUSPLAYDEBUG defined


# 1.14 29-Apr-1996 christos

- prototype fixes


# 1.13 11-Apr-1996 cgd

update for addition of a machine-dependent cookie as the first argument
to isa_intr_{,dis}establish().


# 1.12 31-Mar-1996 jtk

add include file for function prototypes


# 1.11 17-Mar-1996 thorpej

New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.


# 1.10 01-Mar-1996 mycroft

Add support to the ISA DMA framework for auto-initialize mode.
Add experimental SB16 code, disabled for now.


# 1.9 17-Feb-1996 jtk

fix compile error from gusprobe() cleanup


# 1.8 17-Feb-1996 jtk

avoid panic'ing when driver gets confused--just spit out a message and
keep going.
Improve error messages to include device name.
use STATIC for function declarations/definitions so it's easier to get a
useful symbol table by flipping a switch.


# 1.7 16-Feb-1996 mycroft

Prototype the probe and attach functions.


# 1.6 05-Feb-1996 jtc

Fix error in copyright notice


# 1.5 05-Feb-1996 jtc

Received copyright assignment


# 1.4 24-Dec-1995 mycroft

The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.


# 1.3 10-Nov-1995 mycroft

Convert IRQ, DRQ, and port numbers to int.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.2 24-Jul-1995 cgd

fix function prototypes, usages, to match what the code actually does


# 1.1 19-Jul-1995 brezak

GUS audio driver from John Kohl.


Revision tags: nick-nhusb-base-20170204
# 1.111 01-Feb-2017 jakllsch

Use boolean logical and operation on booleans, rather than bitwise and.

From David Binderman in PR kern/51936.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.110 11-Jul-2016 msaitoh

KNF. No functional change.


Revision tags: netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.109 27-Oct-2012 chs

branches: 1.109.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base
# 1.108 24-Nov-2011 mrg

branches: 1.108.8;
put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.


# 1.107 23-Nov-2011 jmcneill

Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.


Revision tags: jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.106 02-Jul-2011 mrg

branches: 1.106.2; 1.106.4;
fix sequence point errors. diff explains best:
- sc->sc_playbuf = ++sc->sc_playbuf % sc->sc_nbufs;
+ sc->sc_playbuf = (sc->sc_playbuf + 1) % sc->sc_nbufs;


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase jym-xensuspend-base
# 1.105 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.104 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.103 17-Dec-2008 cegger

branches: 1.103.2;
kill MALLOC and FREE macros.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.102 28-Apr-2008 martin

branches: 1.102.8; 1.102.12;
Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base
# 1.101 08-Apr-2008 cegger

branches: 1.101.2; 1.101.4;
use aprint_*_dev and device_xname


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.100 19-Oct-2007 ad

branches: 1.100.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 vmlocking-base
# 1.99 25-Sep-2007 ad

branches: 1.99.2;
Use splhigh(), not disable_intr().


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base mjf-ufs-trans-base
# 1.98 09-Jul-2007 ad

branches: 1.98.6; 1.98.8; 1.98.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.97 04-Mar-2007 christos

branches: 1.97.2; 1.97.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.96 16-Nov-2006 christos

branches: 1.96.4; 1.96.6;
__unused removal on arguments; approved by core.


Revision tags: yamt-splraiseipl-base2
# 1.95 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


Revision tags: yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 rpaulo-netinet-merge-pcb-base
# 1.94 30-Aug-2006 christos

branches: 1.94.2; 1.94.4;
add missing initializers


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base
# 1.93 14-Apr-2006 christos

Coverity CID 2453: Add negative checks.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.92 25-Mar-2006 thorpej

Use device_parent().


# 1.91 17-Mar-2006 christos

don't use MALLOC with a non-constant size; use malloc instead.


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.90 11-Dec-2005 christos

branches: 1.90.4; 1.90.6; 1.90.8; 1.90.10; 1.90.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.89 30-May-2005 christos

branches: 1.89.2;
- add const
- avoid variable shadowing.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.88 27-Feb-2005 perry

nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base
# 1.87 13-Jan-2005 kent

branches: 1.87.2; 1.87.4;
ansify and KNF


# 1.86 10-Jan-2005 kent

merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes


Revision tags: kent-audio1-beforemerge kent-audio1-base
# 1.85 29-Oct-2004 yamt

branches: 1.85.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.


# 1.84 14-Sep-2004 drochner

Separate the namespace for default (ie unspecified) locators used
by the isa.c bus driver and the "address/whatever not specified"
argument passed to leaf device drivers.
The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter
"ISA_UNKNOWN_XXX", defined in isavar.h.
This way we save a dependency of every ISA device driver on "locators.h".


# 1.83 22-Apr-2004 itojun

sprintf -> snprintf


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.82 21-Nov-2003 gson

Code enabled by option AUDIO_DEBUG exhibited undefined behavior and
caused compiler warnings with gcc 3.3.2.


# 1.81 09-May-2003 fvdl

branches: 1.81.2;
A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.


# 1.80 03-May-2003 wiz

DMA, not dma nor Dma.


# 1.79 06-Apr-2003 wiz

Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge
# 1.78 11-Oct-2002 fvdl

Don't include <i386/isa/icu.h>


Revision tags: kqueue-base
# 1.77 02-Oct-2002 thorpej

Fix sizeof and whitespace bug from the script I'm using to do the
CFATTACH_DECL conversion. (Grumble.)


# 1.76 02-Oct-2002 thorpej

Use CFATTACH_DECL().


# 1.75 27-Sep-2002 thorpej

Declare all cfattach structures const.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base
# 1.74 07-Jan-2002 thorpej

Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
isa_attach_args. If either of these members are non-NULL,
direct configuration of the bus is being performed. Add an
ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
direct configuration is not being performed and the probe fucntion
is returning success.
* Adapt device drivers -- currently, all driver probe routines return
"no match" if ISA_DIRECT_CONFIG() evaluates to true.


# 1.73 13-Nov-2001 lukem

add RCSID


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3
# 1.72 03-Oct-2001 augustss

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).


Revision tags: thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.71 18-Jul-2001 thorpej

branches: 1.71.2;
bcopy -> memcpy


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.70 18-Jan-2001 jdolecek

branches: 1.70.2; 1.70.4;
constify


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.69 23-Mar-2000 thorpej

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.


Revision tags: chs-ubc2-newbase
# 1.68 07-Feb-2000 thorpej

Add a new function call to the ISA DMA API: isa_dmamaxsize(), which returns
the maximum transfer size for the specified DMA channel. Make all clients
of ISA DMA use this call to determine their maximum transfer size.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base kame_141_19991130 comdex-fall-1999-base fvdl-softdep-base netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.67 30-Mar-1999 mycroft

branches: 1.67.8;
The AD1848/CS4231 attachment doesn't create DMA maps any more, so we have to
do it here. This is preferrable anyway, since we're not actually doing DMA
through the AD/CS chip.


# 1.66 19-Feb-1999 mycroft

Fix structure names.


# 1.65 17-Feb-1999 mycroft

Update comments.


# 1.64 17-Feb-1999 mycroft

Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.63 09-Sep-1998 thorpej

Add mmap support for gus and gusmax, PR #5988, Feico Dillema.


# 1.62 06-Sep-1998 jtk

Correct the remaining uses of ad1848_softc to ad1848_isa_softc


# 1.61 01-Sep-1998 jtk

use ad1848_isa_attach, so GUS cards with CS4231 don't panic the kernel


# 1.60 25-Aug-1998 pk

Split the AD1848 driver into MI (dev/ic/ad1848.c) and ISA parts.


# 1.59 17-Aug-1998 augustss

* 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.


Revision tags: eeh-paddr_t-base
# 1.58 02-Jul-1998 mycroft

Cosmetic change.


# 1.57 17-Jun-1998 augustss

Remove a bunch of totally unnecessary #include <machine/pio.h>
left over from the olden days.


# 1.56 09-Jun-1998 thorpej

Nuke __BROKEN_INDIRECT_CONFIG.


# 1.55 09-Jun-1998 thorpej

Adjust for changes to the ISA DMA API.


# 1.54 20-May-1998 augustss

Add a Yamaha OPL3-SA3 driver and clean up all AD1848 drivers.
Submitted by Constantine Sapuntzakis <csapuntz@reeducation-labor.lcs.mit.edu>
and originally written for OpenBSD.


# 1.53 12-Mar-1998 augustss

Update probing for GUS a little. From soren@t.dk,
closes PR kern/5148.


# 1.52 09-Mar-1998 mikel

let panic() call DDB, don't do it ourselves; from Nathan Williams in PR 5131


# 1.51 25-Jan-1998 mycroft

Make sure we create DMA maps if the CD4231 probe fails.


# 1.50 13-Jan-1998 drochner

make it compile without BROKEN_INDIRECT_CONFIG


# 1.49 12-Jan-1998 thorpej

Update for config changes.


Revision tags: netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.48 19-Oct-1997 augustss

branches: 1.48.2;
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.


Revision tags: marc-pcmcia-base
# 1.47 11-Oct-1997 mycroft

AudioElinear -> AudioEslinear


# 1.46 11-Oct-1997 mycroft

AudioC[A-Z] -> AudioC[a-z]


# 1.45 09-Oct-1997 jtc

Fix tipo inherited from old version of TNF copyright template.


# 1.44 12-Sep-1997 augustss

Create DMA maps on ordinary GUS (non-MAX) cards. Now it should work again.


Revision tags: thorpej-signal-base
# 1.43 06-Sep-1997 augustss

Bus-ify the GUS driver.


# 1.42 26-Aug-1997 augustss

XXX Add a drq2 locator for the ISA bus. Many sound cards need
two DMA channels to do e.g. full-duplex. This allows
a way of specifying the second channel in a sane way.
THIS IS TEMPORARY. The drq2 locator will go away when
the locator system has been changed to allow multiple
values per locator.


# 1.41 24-Aug-1997 augustss

- 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.


# 1.40 19-Aug-1997 augustss

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.


# 1.39 07-Aug-1997 augustss

Add A-law support and fix bug on opening GUS max.
From Feico Dillema <dillema@spam.aurum>.


# 1.38 04-Aug-1997 augustss

Get rid of `register'.


# 1.37 04-Aug-1997 augustss

Use gusmax_get_props instead of gus_get_props for gusmax.


# 1.36 31-Jul-1997 augustss

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.


Revision tags: marc-pcmcia-bp
# 1.35 28-Jul-1997 augustss

branches: 1.35.2;
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.


# 1.34 27-Jul-1997 augustss

audio: Simplify handling of AUDIO_SETFD and committing of encoding mode.


# 1.33 27-Jul-1997 augustss

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.


# 1.32 15-Jul-1997 augustss

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.


# 1.31 09-Jul-1997 jtk

fix mixer goof on GUS max


# 1.30 06-Jun-1997 thorpej

Pull thorpej-bus-dma branch into mainline.


Revision tags: thorpej-bus-dma-base
# 1.29 29-May-1997 jtk

fix popping noises on 16-bit ulinear output.
add big-endian support
XXX ULINEAR_BE still needs ad1848 emulation on gusmax


# 1.28 13-May-1997 augustss

Clean up emulation code, SB, and GUS drivers and add some more encoding
emulation to SB.


# 1.27 12-May-1997 jtk

branches: 1.27.2;
restore accidentally-lost set of nchannels in driver layer


# 1.26 10-May-1997 jtk

use normal linear names/values for 8-bit encodings
mark mulaw as emulated (it's done via a mapping table)
use GUS query encoding routine, even on GUS max, since the encoding
stuff is handled by the GF1.
XXX might not be right for recording, but it's correct for playback.


# 1.25 09-May-1997 augustss

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.


# 1.24 07-May-1997 augustss

Convert to new orthogonal audio encoding scheme and implement
some of the new encodings. The change to ioctl AUDIO_GETENC is
NOT backwards compatible.


# 1.23 29-Apr-1997 augustss

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.


# 1.22 06-Apr-1997 augustss

Make sure the bus tag is set where we need it.


# 1.21 20-Mar-1997 mycroft

Combine set_encoding and set_precision into a single set_format interface.


# 1.20 19-Mar-1997 mycroft

Check for errors returned by AD1848 routines.


# 1.19 13-Mar-1997 mycroft

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.


Revision tags: is-newarp-before-merge is-newarp-base
# 1.18 13-Oct-1996 christos

backout kprintf changes


# 1.17 10-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.16 12-May-1996 mycroft

Use intr.h.


# 1.15 03-May-1996 jtk

make it work with GUSPLAYDEBUG defined


# 1.14 29-Apr-1996 christos

- prototype fixes


# 1.13 11-Apr-1996 cgd

update for addition of a machine-dependent cookie as the first argument
to isa_intr_{,dis}establish().


# 1.12 31-Mar-1996 jtk

add include file for function prototypes


# 1.11 17-Mar-1996 thorpej

New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.


# 1.10 01-Mar-1996 mycroft

Add support to the ISA DMA framework for auto-initialize mode.
Add experimental SB16 code, disabled for now.


# 1.9 17-Feb-1996 jtk

fix compile error from gusprobe() cleanup


# 1.8 17-Feb-1996 jtk

avoid panic'ing when driver gets confused--just spit out a message and
keep going.
Improve error messages to include device name.
use STATIC for function declarations/definitions so it's easier to get a
useful symbol table by flipping a switch.


# 1.7 16-Feb-1996 mycroft

Prototype the probe and attach functions.


# 1.6 05-Feb-1996 jtc

Fix error in copyright notice


# 1.5 05-Feb-1996 jtc

Received copyright assignment


# 1.4 24-Dec-1995 mycroft

The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.


# 1.3 10-Nov-1995 mycroft

Convert IRQ, DRQ, and port numbers to int.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.2 24-Jul-1995 cgd

fix function prototypes, usages, to match what the code actually does


# 1.1 19-Jul-1995 brezak

GUS audio driver from John Kohl.


Revision tags: nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.110 11-Jul-2016 msaitoh

KNF. No functional change.


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
# 1.109 27-Oct-2012 chs

branches: 1.109.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base
# 1.108 24-Nov-2011 mrg

branches: 1.108.8;
put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.


# 1.107 23-Nov-2011 jmcneill

Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

Add MP locking to the audio drivers.

Making the audio drivers MP safe is necessary before efforts
can be made to make the VM system MP safe.

The are two locks per device instance, an ISR lock and
a character device lock. The ISR lock replaces calls to
splaudio()/splx(), and will be held across calls to device
methods which were called at splaudio() before (e.g.
trigger_output). The character device lock is held across
calls to nearly all of the methods, excluding some only
used for initialization, e.g. get_locks.

Welcome to 5.99.57.


Revision tags: jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.106 02-Jul-2011 mrg

branches: 1.106.2; 1.106.4;
fix sequence point errors. diff explains best:
- sc->sc_playbuf = ++sc->sc_playbuf % sc->sc_nbufs;
+ sc->sc_playbuf = (sc->sc_playbuf + 1) % sc->sc_nbufs;


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase jym-xensuspend-base
# 1.105 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.104 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.103 17-Dec-2008 cegger

branches: 1.103.2;
kill MALLOC and FREE macros.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base
# 1.102 28-Apr-2008 martin

branches: 1.102.8; 1.102.12;
Remove clause 3 and 4 from TNF licenses


Revision tags: yamt-pf42-baseX yamt-nfs-mp-base yamt-pf42-base
# 1.101 08-Apr-2008 cegger

branches: 1.101.2; 1.101.4;
use aprint_*_dev and device_xname


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.100 19-Oct-2007 ad

branches: 1.100.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 vmlocking-base
# 1.99 25-Sep-2007 ad

branches: 1.99.2;
Use splhigh(), not disable_intr().


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base mjf-ufs-trans-base
# 1.98 09-Jul-2007 ad

branches: 1.98.6; 1.98.8; 1.98.10;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.97 04-Mar-2007 christos

branches: 1.97.2; 1.97.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.96 16-Nov-2006 christos

branches: 1.96.4; 1.96.6;
__unused removal on arguments; approved by core.


Revision tags: yamt-splraiseipl-base2
# 1.95 12-Oct-2006 christos

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386


Revision tags: yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 rpaulo-netinet-merge-pcb-base
# 1.94 30-Aug-2006 christos

branches: 1.94.2; 1.94.4;
add missing initializers


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base
# 1.93 14-Apr-2006 christos

Coverity CID 2453: Add negative checks.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.92 25-Mar-2006 thorpej

Use device_parent().


# 1.91 17-Mar-2006 christos

don't use MALLOC with a non-constant size; use malloc instead.


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.90 11-Dec-2005 christos

branches: 1.90.4; 1.90.6; 1.90.8; 1.90.10; 1.90.12;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.89 30-May-2005 christos

branches: 1.89.2;
- add const
- avoid variable shadowing.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.88 27-Feb-2005 perry

nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base
# 1.87 13-Jan-2005 kent

branches: 1.87.2; 1.87.4;
ansify and KNF


# 1.86 10-Jan-2005 kent

merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
- remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels. Conversion information
is conveyed by stream_filter_list_t.
- change the type of sample_rate: u_long -> u_int
- add `validbits,' which represents the valid data size in
precision bits. It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
- add two parameters to set_params()
stream_filter_list_t *pfil, stream_filter_list *rfil
A HW driver should set filter recipes for requested formats
- constify audio_params parameters of trigger_output() and
trigger_input(). They represent audio formats for the hardware.
- make open() and close() optional
- add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
to round_blocksize()

* sw_code is replaced with stream_filter_t.
stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
- audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
- audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
- audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
- ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes


Revision tags: kent-audio1-beforemerge kent-audio1-base
# 1.85 29-Oct-2004 yamt

branches: 1.85.2;
constify audio_hw_if, midi_hw_if, and radio_hw_if.


# 1.84 14-Sep-2004 drochner

Separate the namespace for default (ie unspecified) locators used
by the isa.c bus driver and the "address/whatever not specified"
argument passed to leaf device drivers.
The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter
"ISA_UNKNOWN_XXX", defined in isavar.h.
This way we save a dependency of every ISA device driver on "locators.h".


# 1.83 22-Apr-2004 itojun

sprintf -> snprintf


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.82 21-Nov-2003 gson

Code enabled by option AUDIO_DEBUG exhibited undefined behavior and
caused compiler warnings with gcc 3.3.2.


# 1.81 09-May-2003 fvdl

branches: 1.81.2;
A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.


# 1.80 03-May-2003 wiz

DMA, not dma nor Dma.


# 1.79 06-Apr-2003 wiz

Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge
# 1.78 11-Oct-2002 fvdl

Don't include <i386/isa/icu.h>


Revision tags: kqueue-base
# 1.77 02-Oct-2002 thorpej

Fix sizeof and whitespace bug from the script I'm using to do the
CFATTACH_DECL conversion. (Grumble.)


# 1.76 02-Oct-2002 thorpej

Use CFATTACH_DECL().


# 1.75 27-Sep-2002 thorpej

Declare all cfattach structures const.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base gehenna-devsw-base eeh-devprop-base newlock-base ifpoll-base
# 1.74 07-Jan-2002 thorpej

Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
isa_attach_args. If either of these members are non-NULL,
direct configuration of the bus is being performed. Add an
ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
direct configuration is not being performed and the probe fucntion
is returning success.
* Adapt device drivers -- currently, all driver probe routines return
"no match" if ISA_DIRECT_CONFIG() evaluates to true.


# 1.73 13-Nov-2001 lukem

add RCSID


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3
# 1.72 03-Oct-2001 augustss

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).


Revision tags: thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.71 18-Jul-2001 thorpej

branches: 1.71.2;
bcopy -> memcpy


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.70 18-Jan-2001 jdolecek

branches: 1.70.2; 1.70.4;
constify


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.69 23-Mar-2000 thorpej

New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.


Revision tags: chs-ubc2-newbase
# 1.68 07-Feb-2000 thorpej

Add a new function call to the ISA DMA API: isa_dmamaxsize(), which returns
the maximum transfer size for the specified DMA channel. Make all clients
of ISA DMA use this call to determine their maximum transfer size.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 wrstuden-devbsize-19991221 wrstuden-devbsize-base kame_141_19991130 comdex-fall-1999-base fvdl-softdep-base netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.67 30-Mar-1999 mycroft

branches: 1.67.8;
The AD1848/CS4231 attachment doesn't create DMA maps any more, so we have to
do it here. This is preferrable anyway, since we're not actually doing DMA
through the AD/CS chip.


# 1.66 19-Feb-1999 mycroft

Fix structure names.


# 1.65 17-Feb-1999 mycroft

Update comments.


# 1.64 17-Feb-1999 mycroft

Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.63 09-Sep-1998 thorpej

Add mmap support for gus and gusmax, PR #5988, Feico Dillema.


# 1.62 06-Sep-1998 jtk

Correct the remaining uses of ad1848_softc to ad1848_isa_softc


# 1.61 01-Sep-1998 jtk

use ad1848_isa_attach, so GUS cards with CS4231 don't panic the kernel


# 1.60 25-Aug-1998 pk

Split the AD1848 driver into MI (dev/ic/ad1848.c) and ISA parts.


# 1.59 17-Aug-1998 augustss

* 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.


Revision tags: eeh-paddr_t-base
# 1.58 02-Jul-1998 mycroft

Cosmetic change.


# 1.57 17-Jun-1998 augustss

Remove a bunch of totally unnecessary #include <machine/pio.h>
left over from the olden days.


# 1.56 09-Jun-1998 thorpej

Nuke __BROKEN_INDIRECT_CONFIG.


# 1.55 09-Jun-1998 thorpej

Adjust for changes to the ISA DMA API.


# 1.54 20-May-1998 augustss

Add a Yamaha OPL3-SA3 driver and clean up all AD1848 drivers.
Submitted by Constantine Sapuntzakis <csapuntz@reeducation-labor.lcs.mit.edu>
and originally written for OpenBSD.


# 1.53 12-Mar-1998 augustss

Update probing for GUS a little. From soren@t.dk,
closes PR kern/5148.


# 1.52 09-Mar-1998 mikel

let panic() call DDB, don't do it ourselves; from Nathan Williams in PR 5131


# 1.51 25-Jan-1998 mycroft

Make sure we create DMA maps if the CD4231 probe fails.


# 1.50 13-Jan-1998 drochner

make it compile without BROKEN_INDIRECT_CONFIG


# 1.49 12-Jan-1998 thorpej

Update for config changes.


Revision tags: netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.48 19-Oct-1997 augustss

branches: 1.48.2;
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.


Revision tags: marc-pcmcia-base
# 1.47 11-Oct-1997 mycroft

AudioElinear -> AudioEslinear


# 1.46 11-Oct-1997 mycroft

AudioC[A-Z] -> AudioC[a-z]


# 1.45 09-Oct-1997 jtc

Fix tipo inherited from old version of TNF copyright template.


# 1.44 12-Sep-1997 augustss

Create DMA maps on ordinary GUS (non-MAX) cards. Now it should work again.


Revision tags: thorpej-signal-base
# 1.43 06-Sep-1997 augustss

Bus-ify the GUS driver.


# 1.42 26-Aug-1997 augustss

XXX Add a drq2 locator for the ISA bus. Many sound cards need
two DMA channels to do e.g. full-duplex. This allows
a way of specifying the second channel in a sane way.
THIS IS TEMPORARY. The drq2 locator will go away when
the locator system has been changed to allow multiple
values per locator.


# 1.41 24-Aug-1997 augustss

- 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.


# 1.40 19-Aug-1997 augustss

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.


# 1.39 07-Aug-1997 augustss

Add A-law support and fix bug on opening GUS max.
From Feico Dillema <dillema@spam.aurum>.


# 1.38 04-Aug-1997 augustss

Get rid of `register'.


# 1.37 04-Aug-1997 augustss

Use gusmax_get_props instead of gus_get_props for gusmax.


# 1.36 31-Jul-1997 augustss

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.


Revision tags: marc-pcmcia-bp
# 1.35 28-Jul-1997 augustss

branches: 1.35.2;
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.


# 1.34 27-Jul-1997 augustss

audio: Simplify handling of AUDIO_SETFD and committing of encoding mode.


# 1.33 27-Jul-1997 augustss

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.


# 1.32 15-Jul-1997 augustss

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.


# 1.31 09-Jul-1997 jtk

fix mixer goof on GUS max


# 1.30 06-Jun-1997 thorpej

Pull thorpej-bus-dma branch into mainline.


Revision tags: thorpej-bus-dma-base
# 1.29 29-May-1997 jtk

fix popping noises on 16-bit ulinear output.
add big-endian support
XXX ULINEAR_BE still needs ad1848 emulation on gusmax


# 1.28 13-May-1997 augustss

Clean up emulation code, SB, and GUS drivers and add some more encoding
emulation to SB.


# 1.27 12-May-1997 jtk

branches: 1.27.2;
restore accidentally-lost set of nchannels in driver layer


# 1.26 10-May-1997 jtk

use normal linear names/values for 8-bit encodings
mark mulaw as emulated (it's done via a mapping table)
use GUS query encoding routine, even on GUS max, since the encoding
stuff is handled by the GF1.
XXX might not be right for recording, but it's correct for playback.


# 1.25 09-May-1997 augustss

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.


# 1.24 07-May-1997 augustss

Convert to new orthogonal audio encoding scheme and implement
some of the new encodings. The change to ioctl AUDIO_GETENC is
NOT backwards compatible.


# 1.23 29-Apr-1997 augustss

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.


# 1.22 06-Apr-1997 augustss

Make sure the bus tag is set where we need it.


# 1.21 20-Mar-1997 mycroft

Combine set_encoding and set_precision into a single set_format interface.


# 1.20 19-Mar-1997 mycroft

Check for errors returned by AD1848 routines.


# 1.19 13-Mar-1997 mycroft

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.


Revision tags: is-newarp-before-merge is-newarp-base
# 1.18 13-Oct-1996 christos

backout kprintf changes


# 1.17 10-Oct-1996 christos

printf -> kprintf, sprintf -> ksprintf


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.16 12-May-1996 mycroft

Use intr.h.


# 1.15 03-May-1996 jtk

make it work with GUSPLAYDEBUG defined


# 1.14 29-Apr-1996 christos

- prototype fixes


# 1.13 11-Apr-1996 cgd

update for addition of a machine-dependent cookie as the first argument
to isa_intr_{,dis}establish().


# 1.12 31-Mar-1996 jtk

add include file for function prototypes


# 1.11 17-Mar-1996 thorpej

New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.


# 1.10 01-Mar-1996 mycroft

Add support to the ISA DMA framework for auto-initialize mode.
Add experimental SB16 code, disabled for now.


# 1.9 17-Feb-1996 jtk

fix compile error from gusprobe() cleanup


# 1.8 17-Feb-1996 jtk

avoid panic'ing when driver gets confused--just spit out a message and
keep going.
Improve error messages to include device name.
use STATIC for function declarations/definitions so it's easier to get a
useful symbol table by flipping a switch.


# 1.7 16-Feb-1996 mycroft

Prototype the probe and attach functions.


# 1.6 05-Feb-1996 jtc

Fix error in copyright notice


# 1.5 05-Feb-1996 jtc

Received copyright assignment


# 1.4 24-Dec-1995 mycroft

The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.


# 1.3 10-Nov-1995 mycroft

Convert IRQ, DRQ, and port numbers to int.


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.2 24-Jul-1995 cgd

fix function prototypes, usages, to match what the code actually does


# 1.1 19-Jul-1995 brezak

GUS audio driver from John Kohl.