History log of /freebsd-11-stable/sys/dev/sound/isa/sb16.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 331722 29-Mar-2018 eadler

Revert r330897:

This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)


# 330897 14-Mar-2018 eadler

Partial merge of the SPDX changes

These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from: pfg


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 297862 12-Apr-2016 pfg

Replace 0 with NULL for pointers in misc. device drivers.

Found with devel/coccinelle.


# 297000 17-Mar-2016 jhibbits

Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.

On some architectures, u_long isn't large enough for resource definitions.
Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but
type `long' is only 32-bit. This extends rman's resources to uintmax_t. With
this change, any resource can feasibly be placed anywhere in physical memory
(within the constraints of the driver).

Why uintmax_t and not something machine dependent, or uint64_t? Though it's
possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on
32-bit architectures. 64-bit architectures should have plenty of RAM to absorb
the increase on resource sizes if and when this occurs, and the number of
resources on memory-constrained systems should be sufficiently small as to not
pose a drastic overhead. That being said, uintmax_t was chosen for source
clarity. If it's specified as uint64_t, all printf()-like calls would either
need casts to uintmax_t, or be littered with PRI*64 macros. Casts to uintmax_t
aren't horrible, but it would also bake into the API for
resource_list_print_type() either a hidden assumption that entries get cast to
uintmax_t for printing, or these calls would need the PRI*64 macros. Since
source code is meant to be read more often than written, I chose the clearest
path of simply using uintmax_t.

Tested on a PowerPC p5020-based board, which places all device resources in
0xfxxxxxxxx, and has 8GB RAM.
Regression tested on qemu-system-i386
Regression tested on qemu-system-mips (malta profile)

Tested PAE and devinfo on virtualbox (live CD)

Special thanks to bz for his testing on ARM.

Reviewed By: bz, jhb (previous)
Relnotes: Yes
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D4544


# 274035 03-Nov-2014 bapt

Remove check for obsolete FreeBSD versions

PR: 194517
Submitted by: François Tigeot <ftigeot@wolfpond.org>


# 193640 07-Jun-2009 ariff

Sound Mega-commit. Expect further cleanup until code freeze.

For a slightly thorough explaination, please refer to
[1] http://people.freebsd.org/~ariff/SOUND_4.TXT.html .

Summary of changes includes:

1 Volume Per-Channel (vpc). Provides private / standalone volume control
unique per-stream pcm channel without touching master volume / pcm.
Applications can directly use SNDCTL_DSP_[GET|SET][PLAY|REC]VOL, or for
backwards compatibility, SOUND_MIXER_PCM through the opened dsp device
instead of /dev/mixer. Special "bypass" mode is enabled through
/dev/mixer which will automatically detect if the adjustment is made
through /dev/mixer and forward its request to this private volume
controller. Changes to this volume object will not interfere with
other channels.

Requirements:
- SNDCTL_DSP_[GET|SET][PLAY|REC]_VOL are newer ioctls (OSSv4) which
require specific application modifications (preferred).
- No modifications required for using bypass mode, so applications
like mplayer or xmms should work out of the box.

Kernel hints:
- hint.pcm.%d.vpc (0 = disable vpc).

Kernel sysctls:
- hw.snd.vpc_mixer_bypass (default: 1). Enable or disable /dev/mixer
bypass mode.
- hw.snd.vpc_autoreset (default: 1). By default, closing/opening
/dev/dsp will reset the volume back to 0 db gain/attenuation.
Setting this to 0 will preserve its settings across device
closing/opening.
- hw.snd.vpc_reset (default: 0). Panic/reset button to reset all
volume settings back to 0 db.
- hw.snd.vpc_0db (default: 45). 0 db relative to linear mixer value.

2 High quality fixed-point Bandlimited SINC sampling rate converter,
based on Julius O'Smith's Digital Audio Resampling -
http://ccrma.stanford.edu/~jos/resample/. It includes a filter design
script written in awk (the clumsiest joke I've ever written)
- 100% 32bit fixed-point, 64bit accumulator.
- Possibly among the fastest (if not fastest) of its kind.
- Resampling quality is tunable, either runtime or during kernel
compilation (FEEDER_RATE_PRESETS).
- Quality can be further customized during kernel compilation by
defining FEEDER_RATE_PRESETS in /etc/make.conf.

Kernel sysctls:
- hw.snd.feeder_rate_quality.
0 - Zero-order Hold (ZOH). Fastest, bad quality.
1 - Linear Interpolation (LINEAR). Slightly slower than ZOH,
better quality but still does not eliminate aliasing.
2 - (and above) - Sinc Interpolation(SINC). Best quality. SINC
quality always start from 2 and above.

Rough quality comparisons:
- http://people.freebsd.org/~ariff/z_comparison/

3 Bit-perfect mode. Bypasses all feeder/dsp effects. Pure sound will be
directly fed into the hardware.

4 Parametric (compile time) Software Equalizer (Bass/Treble mixer). Can
be customized by defining FEEDER_EQ_PRESETS in /etc/make.conf.

5 Transparent/Adaptive Virtual Channel. Now you don't have to disable
vchans in order to make digital format pass through. It also makes
vchans more dynamic by choosing a better format/rate among all the
concurrent streams, which means that dev.pcm.X.play.vchanformat/rate
becomes sort of optional.

6 Exclusive Stream, with special open() mode O_EXCL. This will "mute"
other concurrent vchan streams and only allow a single channel with
O_EXCL set to keep producing sound.

Other Changes:
* most feeder_* stuffs are compilable in userland. Let's not
speculate whether we should go all out for it (save that for
FreeBSD 16.0-RELEASE).
* kobj signature fixups, thanks to Andriy Gapon <avg@freebsd.org>
* pull out channel mixing logic out of vchan.c and create its own
feeder_mixer for world justice.
* various refactoring here and there, for good or bad.
* activation of few more OSSv4 ioctls() (see [1] above).
* opt_snd.h for possible compile time configuration:
(mostly for debugging purposes, don't try these at home)
SND_DEBUG
SND_DIAGNOSTIC
SND_FEEDER_MULTIFORMAT
SND_FEEDER_FULL_MULTIFORMAT
SND_FEEDER_RATE_HP
SND_PCM_64
SND_OLDSTEREO

Manual page updates are on the way.

Tested by: joel, Olivier SMEDTS <olivier at gid0 d org>, too many
unsung / unnamed heroes.


# 170873 17-Jun-2007 ariff

Flush remaining malloc() cleanups (M_NOWAIT -> M_WAITOK).


# 170521 10-Jun-2007 ariff

Filter/compress the amount of channel trigger. This should reduce
much of lock/unlock contentions within the interrupt handler. Most
of these drivers only need PCMTRIG_START or STOP (ABORT).

Discussed with: scottl


# 168847 18-Apr-2007 ariff

sndbuf_alloc() now accept dmaflags argument which will be forwarded to
internal bus_dmammem_alloc() for greater flexibility on setting up DMA /
page attributes.


# 166904 23-Feb-2007 netchild

MFp4 (114068):
Use bus_get_dma_tag() to obtain the parent DMA tag to make the drivers
a little bit more non-ia32/amd64 friendly.

There is no man page for bus_get_dma_tag, so this is modelled after
rev. 1.62 of src/sys/dev/sound/pci/es137x.c by marius.

Inspired by: commit by marius


# 166426 02-Feb-2007 joel

Clean up the BSD license to match the preferred license in
/usr/share/examples/etc/bsd-style-copyright. I've fixed a
few minor wording and formatting differences.

Approved by: luigi, Hannu Savolainen <hannu@opensound.com>


# 152418 14-Nov-2005 ariff

Fix left/right channel mixed-up during recording by splitting recdev
mask to recdev_l and recdev_r, since each have its own unique mask.

Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
Approved by: netchild (mentor)


# 149948 10-Sep-2005 netchild

Fix panic caused by full duplex operation.

From the PR:
---snip---
The vibra16X supports full duplex. I traced the Windows driver, and what is
does is that it programs one DMA channel 8-bit, and the other 16-bit. There
might be some kind of auto detection logic here, because it always uses 8-bit
for playback, even if I play 16-bit sound ...
---snip---

PR: 80977
Submitted by: Hans Petter Selasky <hselasky@c2i.net>


# 139749 05-Jan-2005 imp

Start each of the license/copyright comments with /*-, minor shuffle of lines


# 136469 13-Oct-2004 yongari

Audio drivers failed to detect failure condition and attempted to
assign DMA address to the wrong address. It can cause system lockup
or other mysterious errors. Since most sound cards requires low DMA
address(BUS_SPACE_MAXADDR_24BIT) sndbuf_alloc() would fail when the
audio driver is loaded after long running of operations.

Approved by: jake (mentor)
Reviewed by: truckman, matk


# 135115 12-Sep-2004 truckman

Change sb_lock() calls to sbc_lockassert() and remove the sb_unlock()
calls in sb_cmd2() and sb_getmixer(). The lock has already be grabbed
before these functions are called.

This is a RELENG_5 candidate.

PR: 71189
Submitted by: stephane
MFC after: 3 days


# 132236 16-Jul-2004 tanimura

Rename the sound device drivers:

- `sound'
The generic sound driver, always required.

- `snd_*'
Device-dependent drivers, named after the sound module names.
Configure accordingly to your hardware.

In addition, rename the `snd_pcm' module to `sound' in order to sync
with the driver names.

Suggested by: cg


# 130472 14-Jun-2004 josef

Improve mapping of relative to absolute volume.

I added bounds checking to the patch and cg improved
the formular.

Submitted by: Andriy Gapon <avg@icyb.net.ua>
PR: kern/65485
Approved by: cg
Reviewed by: imp, rwatson, le


# 129181 13-May-2004 truckman

Remove extraneous spaces.


# 129180 13-May-2004 truckman

Implement sbc_lockassert() and sb_lockassert() functions to allow
proper locking to be checked at runtime.

Remove sb_lock() and sb_unlock() calls from sb_reset_dsp() because the
latter is called from sb_setup() with the lock already held. Add a
call to sb_lockassert().

Surround the call to sb_reset_dsp() in sb16_attach() with sb_lock()
and sb_unlock() calls.

Tested by: Bartek Marcinkiewicz <junior AT p233.if.pwr.wroc.pl>


# 128232 14-Apr-2004 green

The newpcm headers currently #define away INTR_MPSAFE and INTR_TYPE_AV
because they bogusly check for defined(INTR_MPSAFE) -- something which
never was a #define. Correct the definitions.

This make INTR_TYPE_AV finally get used instead of the lower-priority
INTR_TYPE_TTY, so it's quite possible some improvement will be had
on sound driver performance. It would also make all the drivers
marked INTR_MPSAFE actually run without Giant (which does seem to
work for me), but:
INTR_MPSAFE HAS BEEN REMOVED FROM EVERY SOUND DRIVER!
It needs to be re-added on a case-by-case basis since there is no one
who will vouch for which sound drivers, if any, willy actually operate
correctly without Giant, since there hasn't been testing because of
this bug disabling INTR_MPSAFE.

Found by: "Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru>


# 127135 17-Mar-2004 njl

Convert callers to the new bus_alloc_resource_any(9) API.

Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde


# 126695 06-Mar-2004 matk

Augment /dev/sndstat with the module names, if applicable.

Approved by: tanimura (mentor)


# 119853 07-Sep-2003 cg

update my email address.


# 117126 01-Jul-2003 scottl

Mega busdma API commit.

Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg.
Lockfunc allows a driver to provide a function for managing its locking
semantics while using busdma. At the moment, this is used for the
asynchronous busdma_swi and callback mechanism. Two lockfunc implementations
are provided: busdma_lock_mutex() performs standard mutex operations on the
mutex that is specified from lockfuncarg. dftl_lock() is a panic
implementation and is defaulted to when NULL, NULL are passed to
bus_dma_tag_create(). The only time that NULL, NULL should ever be used is
when the driver ensures that bus_dmamap_load() will not be deferred.
Drivers that do not provide their own locking can pass
busdma_lock_mutex,&Giant args in order to preserve the former behaviour.

sparc64 and powerpc do not provide real busdma_swi functions, so this is
largely a noop on those platforms. The busdma_swi on is64 is not properly
locked yet, so warnings will be emitted on this platform when busdma
callback deferrals happen.

If anyone gets panics or warnings from dflt_lock() being called, please
let me know right away.

Reviewed by: tmm, gibbs


# 110499 07-Feb-2003 nyan

- Clean up ISA DMA supports.
- Rename all sndbuf_isadma* functions to sndbuf_dma* and move them into
sys/dev/sound/isa/sndbuf_dma.c.

No response from: sound


# 108064 18-Dec-2002 semenu

Do not return(foo()) in void function.

Submitted by: marius@alchemy.franken.de
MFC after: 3 days


# 100953 30-Jul-2002 sobomax

Add support for controlling line1 mixer device, which on some cards represents
onboard FM tuner.

MFC after: 2 weeks


# 89774 25-Jan-2002 scottl

Fix code that had rotted behind debugging macros.

Approved by: cg (in principle)
MFC after: 2 weeks


# 84111 29-Sep-2001 cg

allow the hardware buffer size to be controlled with hints
release isa dma channels on unload (ad1816, ess, sb8)


# 83366 12-Sep-2001 julian

KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after: ha ha ha ha


# 82180 23-Aug-2001 cg

many changes:

* add new channels to the end of the list so channels used in order of
addition

* de-globalise definition of struct snddev_info and provide accessor
functions where necessary.

* move the $FreeBSD$ tag in each .c file into a macro and allow the
/dev/sndstat handler to display these when set to maximum verbosity to aid
debugging.

* allow each device to register its own sndstat handler to reduce the amount
of groping sndstat must do in foreign structs.


# 79116 02-Jul-2001 green

Correct obviously wrong mistakes.


# 79090 02-Jul-2001 green

Make all this compile on 4.3, modulus sbuf.


# 78564 21-Jun-2001 greid

Use the M_ZERO flag to malloc(9)

Reviewed by: cg
MFC after: 1 week


# 78362 16-Jun-2001 cg

use a global devclass for all drivers - i'm not entirely sure why this
worked before.

mixer, dsp and sndstat are seperate devices - give them their own cdevsws
instead of demuxing requests sent to a single cdevsw.

use the si_drv1/si_drv2 fields in dev_t structures for holding information
specific to an open instance of mixer/dsp.

nuke /dev/{dsp,dspW,audio}[0-9]* links - this functionality is now provided
using cloning.

various locking fixes.


# 74797 25-Mar-2001 cg

fix whitespace bogons


# 74763 24-Mar-2001 cg

mega-commit.

this introduces a new buffering mechanism which results in dramatic
simplification of the channel manager.

as several structures have changed, we take the opportunity to move their
definitions into the source files where they are used, make them private and
de-typedef them.

the sound drivers are updated to use snd_setup_intr instead of
bus_setup_intr, and to comply with the de-typedefed structures.

the ac97, mixer and channel layers have been updated with finegrained
locking, as have some drivers- not all though. the rest will follow soon.


# 74364 16-Mar-2001 cg

fix a typo preventing the second dma channel being released
use isa_dma_release when releasing dma channels


# 70291 23-Dec-2000 cg

update code dealing with snd_dbuf objects to do so using a functional interface

modify chn_setblocksize() to pick a default soft-blocksize appropriate to the
sample rate and format in use. it will aim for a power of two size small
enough to generate block sizes of at most 20ms. it will also set the
hard-blocksize taking into account rate/format conversions in use.

update drivers to implement setblocksize correctly:
updated, tested: sb16, emu10k1, maestro, solo
updated, untested: ad1816, ess, mss, sb8, csa
not updated: ds1, es137x, fm801, neomagic, t4dwave, via82c686

i lack hardware to test: ad1816, csa, fm801, neomagic
others will be updated/tested in the next few days.


# 70134 17-Dec-2000 cg

kobjify.

this gives us several benefits, including:

* easier extensibility- new optional methods can be added to
ac97/mixer/channel classes without having to fixup every driver.

* forward compatibility for drivers, provided no new mandatory methods are
added.


# 68414 06-Nov-2000 cg

adjust dma channels for vibra16x; recording should now work. full duplex does
not work on vibra16x, so is disabled.


# 68376 06-Nov-2000 cg

fix paste-o in mixer code - actually set right channel volume instead of
doing the left channel twice.


# 67803 28-Oct-2000 cg

split up sb16 and sb/sbpro drivers

we do not support sb versions <2.00, and the sb8 driver has not been tested
yet.

these drivers are not yet enabled by default.


# 67652 26-Oct-2000 cg

add reinit functions to mixers
unstaticize chn_start()
add reset/resetdone functions to channels


# 65644 09-Sep-2000 cg

detach support
remove un-needed setdir functions
add bus_teardown_intr calls where necessary
destroy our dma tags where necessary
destroy ac97 before releasing resources


# 65340 01-Sep-2000 cg

change mixer api slightly
change channel interface - kobj implementation coming soonish
make pcm_makelinks not panic if modular
add pcm_unregister()

these changes support newpcm kld unloading, but this is only implemented
by ds1.c


# 64881 20-Aug-2000 cg

rework feeder sytem to allow feeders in klds

modify driver capability reporting format to list every audio format
seperately- required for above and because we could not previously indicate
that mono was unsupported.

there should be no functional impact.


# 62483 03-Jul-2000 cg

add module metadata. this is a hack, sound drivers will eventually present a
bus to which pcm, mixer, etc will attach.


# 61478 10-Jun-2000 peter

Unused include: #include "sbc.h"


# 60958 26-May-2000 cg

handle emulated dma reads

don't try to get sample size from snd_dbuf


# 58756 28-Mar-2000 cg

split up ess and sb code
rewrite ess mixer to use native registers
rewrite play/rec code to use more accurate timer when available
add code to use audio2 for playback, but disable it as no irqs are generated


# 57973 13-Mar-2000 phk

Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags.

Define ISADMA_{READ,WRITE,RAW} macros with the same numeric
values as the B_{READ,WRITE,RAW} and use them instead throughout.


# 57209 14-Feb-2000 cg

fix ess end-of-buffer repeating

Submitted by: nhibma
Approved by: jkh


# 55706 10-Jan-2000 cg

general tidyup


# 55428 05-Jan-2000 cg

argh, forgot the bus_dma_tag_creates.
also, panic if channel init fails instead of derefing null.


# 55424 04-Jan-2000 cg

allocate isa bounce buffers of the right size for ess/mss cards, fixes
panics reported


# 55254 30-Dec-1999 cg

make ess cards use a 64k buffer again, by implementing esschan_init()


# 55204 29-Dec-1999 cg

- latest 2ndbuffer patch
- make chn_setdir work for rec on isa cards
- note: es1371 does not irq in smp

Submitted by: tanimura


# 55092 24-Dec-1999 dfr

Don't pass u_int32_t pointers to BUS_READ_IVAR since it tends to make
alphas panic.


# 54930 21-Dec-1999 cg

don't use the sbpro mic vol register during init on ess cards; it causes
feedback and we use the native one elsewhere.


# 54888 20-Dec-1999 cg

minor cosmetics


# 54845 19-Dec-1999 cg

fix for ess cards to use auto-init dma mode, so they work


# 54823 19-Dec-1999 cg

remove the restriction limiting the vibra16x to 8 bit

Noticed By: Clive Lin <clive@CirX.ORG>


# 54793 18-Dec-1999 cg

make vibra16x cards announce what they are in /dev/sndstat


# 54791 18-Dec-1999 cg

make the vibra16x work for playback at least, record is untested


# 54462 12-Dec-1999 cg

make sb dependant on sbc
add support for non-pnp cards to sbc
move card identification to sbc
channel-swapping code is in sb now instead of dsp
vibra16x support is still broken, but will be fixed soon

note: sbc is now compulsory for sb cards

for pnp cards use:
device sbc0

for non-pnp cards eg:
device sbc0 at isa? port 0x240 irq 5 drq 3 flags 0x15
(hints as oldpcm)

both in addition to:
device pcm0

Reviewed by: tanimura,dfr
Said he liked it: peter


# 54237 06-Dec-1999 billf

Reckognize the 'Avance Asound 100'

Submitted by: Oliver Fromme <olli@dorifer.heim3.tu-clausthal.de>


# 54212 06-Dec-1999 peter

Update for pnp adjustments regarding NPNP.

Also, optimize out a mess of #if's that were duplicating work already
done by config(8). For example, if a file is marked as
"dev/sound/pci/foo.c optional pcm pci" then it's only added if pcm *and*
pci are present, so #if NPCM > 0 and #if NPCI > 0 are totally redundant.
A bit more work is still needed.

Discussed with: cg (a few weeks ago)


# 53947 30-Nov-1999 dfr

Add ESS1879.

Submitted by: MIHIRA Sanpei Yoshiro <sanpei@sanpei.org>


# 53718 26-Nov-1999 dcs

Add id for ESS 1869 OEM to Compaq on Presario 1621.


# 53553 22-Nov-1999 tanimura

- Introduce the bridge drivers for Sound Blaser, GUS and Crystal
Semiconductor CS461x/428x.
- Add support for GUS and CS461x/428x pcm.

Bridges reviewed by: dfr, cg
GUS non-PnP support submitted by: Ville-Pertti Keinonen <will@iki.fi>
GUS PnP support tested by: Michiru Saito <mich@mtci.ne.jp>


# 53465 20-Nov-1999 cg

repo-copied to make way for newmidi, this commit updates include paths


# 53126 13-Nov-1999 dfr

* Ignore the wierd fakechan workarounds for simplex in dsp_ioctl().
Without this, ioctl commands for setting formats and speeds were
essentially ignored for simplex devices until the application actually
performed a read or write.
* Make sure that both channels are set in the SB mixer code and provide a
mixer table specifically for the ess18xx which supports the extended
accuracy available on this part.
* Fix a stupid bug in ess_format() which ignored the passed-in format and
changed the hardware based on the value which was set last time. This
meant that the hardware setting was often not set correctly at all.
* Add a custom identify driver for the ESS1888 which automagically detects
and adds the device in a pseudo-PnP way. This driver also emits the magic
sequence which enables the sound hardware after a hard reset, allowing
it to work correctly for the sound hardware of a PWS 433au (and probably
all other PWS class alpha machines).

With these changes, I was able to play back simple sounds on my 433au. I
have not tested recording or any other formats other than 8bit ulaw and
16bit stereo.


# 52318 16-Oct-1999 obrien

The CTL0044 is more properly known as a "Creative SB AWE64 Gold".


# 52174 12-Oct-1999 dfr

* Add struct resource_list* argument to resource_list_alloc and
resource_list_release. This removes the dependancy on the
layout of ivars.

* Move set_resource, get_resource and delete_resource from
isa_if.m to bus_if.m.

* Simplify driver code by providing wrappers to those methods:

bus_set_resource(dev, type, rid, start, count);
bus_get_resource(dev, type, rid, startp, countp);
bus_get_resource_start(dev, type, rid);
bus_get_resource_count(dev, type, rid);
bus_delete_resource(dev, type, rid);

* Delete isa_get_rsrc and use bus_get_resource_start instead.

* Fix a stupid typo in isa_alloc_resource reported by Takahashi
Yoshihiro <nyan@FreeBSD.org>.

* Print a diagnostic message if we can't assign resources to a PnP
device.

* Change device_print_prettyname() so that it doesn't print
"(no driver assigned)-1" for anonymous devices.


# 51911 03-Oct-1999 obrien

Detect CTL0044 & CTL0045 as "Creative AWE64 PnP" rather than "SB16 PnP".

Reviewed by: dfr


# 51788 29-Sep-1999 dfr

Add ID for ESS ES1869.


# 51768 28-Sep-1999 cg

add a missing blank line


# 51755 28-Sep-1999 dfr

Add another ID for the AWE64.


# 51052 07-Sep-1999 dfr

Change isa_get/set_flags() to device_get/set_flags().


# 50959 05-Sep-1999 peter

$Id$ -> $FreeBSD$


# 50925 04-Sep-1999 cg

incorporate better ess support

Obtained From: KUROSAWA Takahiro <fwkg7679@mb.infoweb.ne.jp>
Tested By: peter


# 50733 01-Sep-1999 peter

$Id$ -> $FreeBSD$


# 50723 01-Sep-1999 cg

mss and sb drivers updated for newpcm

Reviewed by: peter, dfr


# 47536 27-May-1999 roger

Add support for ASound Gold card using the ALS120
chipset (a vibra 16x clone)
Identified automatically by its PnP ID

Approved by: Luigi


# 47074 12-May-1999 peter

Fix dev_t/minor problems


# 42192 31-Dec-1998 luigi

Extend the callback mechanism and add hooks to support PCI cards.
Remove a few unused variables.


# 41653 10-Dec-1998 brian

Support ESS1868 (and probably ESS688 & ESS1668).
Submitted by: Max Khon <fjoe@husky.iclub.nsu.ru>


# 41514 04-Dec-1998 archie

Examine all occurrences of sprintf(), strcat(), and str[n]cpy()
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.

These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.

Reviewed by: Bruce Evans <bde@zeta.org.au>
Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by: Mike Spengler <mks@networkcs.com>


# 40898 04-Nov-1998 luigi

Remove an error message from sb interrupt driver -- it
does not apply to all situations.


# 40079 08-Oct-1998 des

Make that annoying "device busy" message dependent on DEBUG (using the
DEB macro). There are probably quite a few other messages that warrant
a similar treatment, and many more that should be converted to plain
log messages (e.g. "WARNING: wrintr but write DMA inactive!"). Now
that I think of it, same goes for the CAM code (e.g. the famed "tagged
openings" message)


# 39899 02-Oct-1998 luigi

Update the pcm driver to the most recent version. This should
add support for Vibra16X, OPTi925, and bring in several assorted
fixes to the code and documentation.
Also present here are apm hooks so that laptops can properly
reconfigure the hardware after suspend (tested on the Libretto50).
Reviewed by: jordan


# 37044 17-Jun-1998 bde

Renambed sbintr to sb_intr to avoid a conflict with the (now
unconditionally declared although it can't be configured together
with snd) extern function sbintr.


# 36764 08-Jun-1998 sos

Correct even more ioctl breakage :(
Doesn't people check their code before committing anymore, it could
at least compile ????


# 33717 21-Feb-1998 nate

there is a minor bug in sb_dsp.c -- the driver
reports ESS cards as able to do 16-bit, but it has no support for it.

Submitted by: Luigi Rizzo <luigi@labinfo.iet.unipi.it>


# 33505 17-Feb-1998 nate

- Updated to Luigi's 2-15-98 code. The code in 2.2 is the same except for
select/poll and DEVFS changes, which are limited to an include/define
in sound.h and the actual select/poll implementation in sound.c

[ This commit is blind, but the code is similar enough that there will
hopefully be no problems. ]


# 33474 17-Feb-1998 scrappy

Upgrade Luigi's audio driver to Jan/23 version... will bring in Feb/15th
version as soon as I've tested it...

Installed/tested on my home machine...any problems, please report directly
to me.


# 31361 23-Nov-1997 jmg

update of Luigi's sound drivers...

this updates to 971117 plus a small sb change that was after that release..


# 30869 31-Oct-1997 jmg

This updates Luigi's sound code to the basic code in snd971023...
changes:
o rip the old select from his distribution to prevent extra pollution
o the code now uses audio dma, helps reduce clicks
o improved card support, should work in full duplex on sb16 cards
o add better voxware ioctl support pointed out by Joao Carlos Mendes
Luis <jonny@coppe.ufrj.br>
o remove an unused file that I included for more complete history
o and MANY other changes

I have personally tested this code with a CS4237 based card and an AWE32
(non-PnP). Both cards worked fine in 8bit and 16bit mode.


# 29651 21-Sep-1997 peter

Fix a comment-within-a-comment


# 29565 18-Sep-1997 jmg

update Luigi's driver to poll interface (Peter, you might want to check
that I've done this properly, it does work though :) )...

a few minor fixes to code

part-Submitted-by: Luigi


# 29415 14-Sep-1997 jmg

Import of Luigi Rizzo's sound code. For more information about the driver
check out the README that is included.

Submitted by: Luigi Rizzo <luigi@labinfo.iet.unipi.it>