Commit Graph

389 Commits

Author SHA1 Message Date
cg
b696243291 this file has been unused for some time now 2001-05-05 05:32:22 +00:00
markm
bcca5847d5 Undo part of the tangle of having sys/lock.h and sys/mutex.h included in
other "system" header files.

Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.

Sort sys/*.h includes where possible in affected files.

OK'ed by:	bde (with reservations)
2001-05-01 08:13:21 +00:00
cg
92d7ad4004 don't unlock the channel in chn_read, msleep will do it for us.
PR:		kern/26430
2001-04-29 02:31:02 +00:00
cg
1021a9005e be more specific in identifying the chip type 2001-04-27 22:26:36 +00:00
cg
b92d41b0e9 get the parameters to pci_write_config the right way round. this may fix
some non-functional cards/machines
2001-04-24 22:35:11 +00:00
orion
9b6cff350c Initial version of Avance Logic ALS4000 pcm driver. 2001-04-23 21:53:12 +00:00
orion
783e5f7b88 Add power on to start sequence for 4.x kernels.
PR:		kern/26255
Submitted by:	WATANABE Kiyoshi <aab10490@pop16.odn.ne.jp>
2001-04-19 13:23:50 +00:00
greid
adb816942e Add another card to the list of Neomagic 256AV's which don't have AC97
codecs. Also, add some additional code to check for future cards without
this feature - attempting to initialise them as AC97 cards will hang the
machine.

PR:		26427
Reviewed by:	cg
2001-04-10 14:28:21 +00:00
cg
5bd038eff8 lock the mutex, not the softc pointer. 2001-04-10 13:52:26 +00:00
cg
b6c262a50b comment out a boot-time debug message 2001-04-09 21:33:47 +00:00
greid
dbd4bd55a8 Reinitialise the DSP and mixer after a resume from suspend
PR:		22372
Submitted by:	Hiroyuki Aizu <aizu@jaist.ac.jp>
Reviewed by:	cg
2001-04-08 23:02:06 +00:00
cg
1c1d868e78 add a software sample rate conversion feeder. this uses linear
interpolation for reasonable quality whilst not using too much cpu time.
2001-04-08 20:26:22 +00:00
cg
f9db4ec2f7 minor tweaks in speed and format setting routines.
don't stop exploring the feeders if a feeder fails to initialise.
2001-04-08 20:20:52 +00:00
cg
ae6962d6df fix feeder initialisation methods to return correct result codes. 2001-04-08 20:17:03 +00:00
cg
d51c99ac75 if the feeder chain returned no data, do not try to acquire the data. 2001-04-08 20:14:14 +00:00
greid
c02f2b7615 Add yet another chip revision of the ES1371 which requires initialisation
delays

PR:		26415
Submitted by:	Jose M. Alcaide <jose@we.lc.ehu.es>
Reviewed by:	cg
2001-04-08 00:07:53 +00:00
orion
7ead6384b7 Quieten when re-triggering. 2001-04-07 14:12:53 +00:00
orion
98f3e45dfe Centralize DMA buffer configuration.
Simplify initialization and remove offending DMA channel resets there.
The resets trash whatever is pointed to DMA registers, but at cmi_attach()
time the DMA registers have not been initialized with valid addresses.

Reviewed by:	Cameron Grant <gandalf@vilnya.demon.co.uk>
2001-04-04 13:48:33 +00:00
tanimura
14d1b86bc5 Again initialize a mutex well, then lock it.
PR:		kern/26188
Submitted by:	Jim Bloom <bloom@acm.org>
2001-04-03 05:15:58 +00:00
orion
67b8adb447 - Added suspend/resume support.
- Added 4 speaker enable to initialization sequence.

- Removed delays between register pokes which appear to aggravate a
  problem this card has sampling at 44.1kHz.  With any form of delay,
  skew relative to system clock at 44.1kHz is usually in range 0-25%
  (now 0-3%).  No other rates exhibit this problem.

- Changed structs cmi_* to sc_*.

Approved by:    Cameron Grant <gandalf@vilnya.demon.co.uk>
2001-03-29 15:36:31 +00:00
jhb
3e3a661612 Switch from save/disable/restore_intr() to critical_enter/exit(). 2001-03-28 03:06:10 +00:00
phk
c47745e977 Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
cg
da985f2067 fix whitespace bogons 2001-03-25 21:43:24 +00:00
cg
6f7cfa9511 release resources if one of the speculative probes in opti_detect() fails,
otherwise resource_list_alloc panics when opti_detect tries its next probe.
2001-03-25 19:09:06 +00:00
cg
631f456c95 the softc is not a mutex, don't try to lock it.
Submitted by:		George Reid <greid@ukug.uk.freebsd.org>
2001-03-25 18:56:48 +00:00
cg
1144277580 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.
2001-03-24 23:10:29 +00:00
cg
250b6a9c42 when writing to one of the setup registers, a 32-bit write is required.
this apparently fixes problems initialising certain es1371/es1373/ct5880
revisions.

Confirmed working by: Richard J Kuhns <rjk@grauel.com>
PR:		i386/25944
2001-03-24 20:36:59 +00:00
cg
3d10dbbf55 add support for opti924 and opti930 chips
both should work in non-pnp mode, the 924 should also work in its rather
braindead pnp mode- it will adopt port 0x530 unless given hints due to it
starting up in soundblaster mode and thus not requesting a valid mss port
address.

Submitted by:	George Reid <greid@ukug.uk.freebsd.org>
2001-03-24 00:22:01 +00:00
cg
c987c179af * power up the external amplifier
* after chip reset, reapply power settings
2001-03-23 16:39:01 +00:00
cg
3df62c9849 add/correct a bunch of codec ids
Obtained from:	linux, alsa, various datasheets
2001-03-22 02:41:24 +00:00
orion
c5f8fef9c1 Change type of channel speed variable from "int" to "u_int32_t" to
avoid overflow when scaling playback rate.  Fixes 44.1k playback from
being 48k (I am deaf to this difference...).
2001-03-21 14:10:51 +00:00
orion
ebb670b334 Change ordering of SPDIF register pokes. SPDIF enable needs to be the
last poke in sequence.  Enabling SPDIF was coercing output rate to
48K, not good for 44.1K tracks.
2001-03-21 12:51:37 +00:00
orion
1601ad0a45 pcm driver for S3 Sonicvibes chipset.
Reviewed by:	Cameron Grant
2001-03-19 00:26:41 +00:00
cg
9b5050ffec destroy child devices on detach to prevent ever-increasing numbers of
pcm/midi devices trying to attach if the module is repeatedly loaded and
unloaded.
2001-03-17 16:04:25 +00:00
cg
28bc69fede fix a typo preventing the second dma channel being released
use isa_dma_release when releasing dma channels
2001-03-16 21:04:14 +00:00
cg
fe5c8c72aa don't leak memory allocated for feeders at module unload
kill the fake channel when unregistering
2001-03-16 20:58:44 +00:00
tanimura
a6f258c4f0 - Do not touch the Giant.
Requested by:	jhb

- Initialize a mutex prior to locking it.

Spotted by:	dcs
2001-03-14 07:29:47 +00:00
cg
9c788987ab fix a panic triggerable by anyone with read/write access to the audio
devices.  opening /dev/{dsp,dspW,audio}0 and then opening a different device
from that list and closing it resulted in a panic when any operation is
performed on the first fd.

we prevent this happening by denying the second open unless it uses the same
minor device as the first.

PR:		kern/25519
2001-03-13 18:43:22 +00:00
cg
c7461529fc increase timeouts for ad_wait_init() 2001-03-05 17:59:36 +00:00
cg
443c2165d8 MFS: don't ignore the result of mixer_init() 2001-03-05 17:51:28 +00:00
cg
9a7836a16f only mess with the power state on 5.x 2001-03-05 17:30:43 +00:00
cg
90a1957e93 MFS: add kobj.h to reduce diffs from -stable 2001-03-05 16:47:35 +00:00
cg
e4893b3d9a MFS: don't pagefault in sndbuf_clear 2001-03-05 16:45:38 +00:00
cg
8da20439de MFS: #ifdef dynamic sysctl stuff to reduce diffs from -stable 2001-03-05 16:43:43 +00:00
cg
2a183691bf MFS: add '# KOBJ' as the first line of each .m file to reduce diffs from
-stable
2001-03-05 16:42:06 +00:00
cg
b9ad4c6e6b enable per-device sysctls unconditionally 2001-03-05 15:58:05 +00:00
cg
074032460a nuke the splstack stuff, snd_mtx* will now be no-ops on 4.x 2001-03-05 15:49:42 +00:00
scottl
79a9a14093 Don't re-init the mixer on resume. This keeps the channel volumes from
being trashed when you suspend, though this may need to be revisited if we
ever get suspend-to-disk implememted.
2001-02-27 18:40:07 +00:00
cg
a7aa01b9b6 Add speaker volume adjusting support
Submitted by:	Tai-hwa Liang <avatar@mmlab.cse.yzu.edu.tw>
PR:		i386/21452
2001-02-27 12:44:31 +00:00
cg
38f9230afb add functions for sound drivers to use for locking and setting up interrupt
handlers.  these are not yet used, but will allow compatibility for driver
modules from 5.x to 4.x.
2001-02-27 07:45:09 +00:00