Commit Graph

409 Commits

Author SHA1 Message Date
cg
2ec7f0d19f various locking fixes, rework open logic and channel registration
PR:             kern/28084
2001-06-14 13:31:30 +00:00
cg
1fe6e1636a identify es1371 revision a 2001-06-11 00:32:18 +00:00
cg
dad803d9ac get clkrun the right way around
remove debug messages
2001-06-11 00:29:25 +00:00
des
23c38e4e7c sbuf_new(9) now returns a struct sbuf * instead of an int. If the caller
does not provide a struct sbuf, sbuf_new(9) will allocate one and return
a pointer to it.
2001-06-10 15:48:04 +00:00
tanimura
f432beaf0e Catch up to csareg.h rev 1.3.
Forgotten by:	cg
2001-06-08 11:57:39 +00:00
peter
4b91e2ecf0 "Fix" the previous initial attempt at fixing TUNABLE_INT(). This time
around, use a common function for looking up and extracting the tunables
from the kernel environment.  This saves duplicating the same function
over and over again.  This way typically has an overhead of 8 bytes + the
path string, versus about 26 bytes + the path string.
2001-06-08 05:24:21 +00:00
cg
88b6f276b2 lock sound device when adding/removing channels
implement setblocksize for vchans
don't panic when doing certain ioctls or aborting on a vchan
xmms now works with vchans
2001-06-07 20:06:22 +00:00
peter
c1df44ae51 Back out part of my previous commit. This was a last minute change
and I botched testing.  This is a perfect example of how NOT to do
this sort of thing. :-(
2001-06-07 03:17:26 +00:00
peter
0732738ec4 Make the TUNABLE_*() macros look and behave more consistantly like the
SYSCTL_*() macros.  TUNABLE_INT_DECL() was an odd name because it didn't
actually declare the int, which is what the name suggests it would do.
2001-06-06 22:17:08 +00:00
joerg
9c040b1c43 Move out the files from src/sys/isa/ic/ to src/sys/dev/ic/, so they
can be made userland-visible as <dev/ic/...>.  Also, those files are
not supposed to contain any bus-specific details at all, so placing
them under .../isa/ has been a misnomer from the beginning.

The files in src/sys/dev/ic/ have been repo-copied from their old
location (this commit is a forced null commit there to record this
message).
2001-06-04 21:04:14 +00:00
cg
92de892cfa fix typo 2001-05-30 22:46:40 +00:00
cg
8829613a30 no longer used 2001-05-30 22:41:04 +00:00
cg
67fa2b23c6 update this driver to use new firmware and incorporate many fixes.
this works on cs4630 chips, and should implement the clkrun hack for
thinkpads- this will display diagnostic messages when triggered until its
correctness is established.
2001-05-30 22:38:31 +00:00
cg
a188d3be39 state the licencing terms for this file
Obtained From:	Yamaha
2001-05-30 19:05:47 +00:00
cg
c86d13a3e1 beginnings of virtual playback channel support
instead of using two malloced arrays for storing channel lists, use an
slist.  convert the sndstat device to use sbufs and optionally provide more
detail about channel state.

vchans are software mixed playback channels.  they are not enabled by this
commit.  they use the feeder infrastructure to emulate normal playback
channels in a manner transparent to applications, whilst providing as many
channels are desired, especially suitable for devices with only one hardware
playback channel.  in the future they will provide additional features.

those wishing to test this functionality will need to add vchan.c to
sys/conf/files and use 'sysctl -w hw.snd.pcm0.vchans' to enable it.

blocksize and auto-rate selection are not yet supported.
2001-05-27 17:22:00 +00:00
cg
55c514ea72 add a new method for retrieving feeder parameters 2001-05-27 14:49:14 +00:00
cg
ebee48177e don't erase info in sndbuf_setup()
set free'd pointers to NULL in sndbuf_free()
add a new function
2001-05-27 14:39:34 +00:00
scottl
e91d658fc3 Fix DMA on machines with more than 128MB.
Obtained from:	cg
MFC after:	5 days
2001-05-25 16:05:22 +00:00
greid
ddc2812fcb Remove a bogus comment which I forgot to get rid of after testing 2001-05-15 20:05:19 +00:00
tanimura
0f839f42de - Eliminate locks in functions called only during probe and attach.
- Finish transmitting data to mpu when a buffer gets empty.

Submitted by:	KUROSAWA Takahiro <fwkg7679@mb.infoweb.ne.jp>
2001-05-08 12:15:26 +00:00
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