Commit Graph

30 Commits

Author SHA1 Message Date
Seigo Tanimura
0739ea1de2 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
2004-07-16 04:00:08 +00:00
Brian Feldman
8fb9a995cf 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>
2004-04-14 14:57:49 +00:00
Nate Lawson
5f96beb9e0 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
John Baldwin
e27951b29c Use PCIR_BAR(x) instead of PCIR_MAPS.
Glanced over by:	imp, gibbs
Tested by:		i386 LINT
2003-09-02 17:30:40 +00:00
Warner Losh
90cf0136c4 Prefer new location of pci include files (which have only been in the
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.
2003-08-22 07:08:17 +00:00
Cameron Grant
8e01d384af disable resume code implementing panic().
this needs to be reimplemented properly.
2003-08-14 22:09:10 +00:00
Doug Ambrisko
fed38951fd Fake a resume method for this chip via calling detach/attach. This lets
ThinkPads using this chip to have sound after a suspend/resume sequence
without resorting to kldunload/kldload.

MFC after:	1 week
2002-07-24 21:27:22 +00:00
Jeroen Ruigrok van der Werven
41425f4fac Remove clkrun_hack for ThinkPad 570.
PR:		28031
Submitted by:	Tan Koan-Sin <freedom@csie.nctu.edu.tw>
MFC after:	2 weeks
2001-11-15 18:51:08 +00:00
Cameron Grant
52eb6afd0c MFS rev 1.8.2.8:
release resources on detach

Submitted by:	"Christopher N . Harrell" <cnh@netvmg.com>
2001-08-27 00:54:26 +00:00
Cameron Grant
67b1dce3bc 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.
2001-08-23 11:30:52 +00:00
Cameron Grant
8e81760b1a the turtle beach santacruz implements ac97 eapd in an inverted sense -
inform the ac97 code of this.
2001-06-23 18:00:06 +00:00
George C A Reid
733a4ea771 Use the M_ZERO flag to malloc(9)
Reviewed by:	cg
MFC after:	1 week
2001-06-21 19:45:59 +00:00
Cameron Grant
b30d115684 stop csa from panicing in clkrun_hack() - we were using free'd memory
don't leak memory in clkrun_hack()

Submitted by:	grog (partially)
2001-06-18 19:58:03 +00:00
Thomas Moestl
916076fefc Call bus_teardown_intr when csa_attach fails after the interrupt has
been set up.

PR:		kern/28178
Reviewed by:	cg
MFC after:	2 weeks
2001-06-18 18:36:34 +00:00
Cameron Grant
7d07ee8c6b get clkrun the right way around
remove debug messages
2001-06-11 00:29:25 +00:00
Cameron Grant
20ac1df714 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
Cameron Grant
15418cf2bb 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
Cameron Grant
66ef8af5b0 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
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Seigo Tanimura
fb0ef52838 Finally merge newmidi.
(I had been busy for my own research activity until the last weekend)

Supported devices:

SB Midi Port			(sbc + midi)
SB OPL3				(sbc + midi)
16550 UART			(midi, needs a trick in your hint)
CS461x Midi Port		(csa + midi)

OSS-compatible sequencer	(seq)

Supported playing software:

playmidi			(We definitely need more)

Notes:

/dev/midistat now reports installed midi drivers. /dev/sndstat reports
only pcm drivers. We need the new name(pcmstat?).

EMU8000(SB AWE) does not sound yet but does get probed so that the OPL3
synth on an AWE card works.

TODO:

MSS/PCI bridge drivers
Midi-tty interface to support general serial devices
Modules
2000-07-11 11:49:33 +00:00
Cameron Grant
f314f3dad2 add module metadata. this is a hack, sound drivers will eventually present a
bus to which pcm, mixer, etc will attach.
2000-07-03 20:52:27 +00:00
Cameron Grant
2f9aa04e7f this driver does not support the cs4281 and probably never will, different code
will be required
2000-06-06 22:42:57 +00:00
Peter Wemm
5775b1a2b6 Tidy up stray or bogus #if NFOO > 0 and #include "foo.h". 2000-01-29 18:48:30 +00:00
Seigo Tanimura
f259d7eed5 - Handle an interrupt for csa primarily in the bridge driver,
then invoke the children. As the value of HISR can be read
  only once, pass the HISR to the children via struct
  csa_bridgeinfo, stored in the ivars of them.
- Clear the contents of serial FIFO upon stopping the DMA for
  playing. This may eliminate buzz on playing. Experimental.
2000-01-03 02:51:16 +00:00
Seigo Tanimura
f7e00c54d1 Correct the delay durations as in the sample sources provided by Crystal Semiconductor. 2000-01-01 09:07:03 +00:00
Seigo Tanimura
7012990a73 Make the origins clear.
Pointed out by:	Tatoku Ogaito <tacha@trap.fukui-med.ac.jp>
1999-12-10 01:20:08 +00:00
Peter Wemm
c2af6f650c 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)
1999-12-06 18:26:33 +00:00
Matthew N. Dodd
fe0d408987 Remove the 'ivars' arguement to device_add_child() and
device_add_child_ordered().  'ivars' may now be set using the
device_set_ivars() function.

This makes it easier for us to change how arbitrary data structures are
associated with a device_t.  Eventually we won't be modifying device_t
to add additional pointers for ivars, softc data etc.

Despite my best efforts I've probably forgotten something so let me know
if this breaks anything.  I've been running with this change for months
and its been quite involved actually isolating all the changes from
the rest of the local changes in my tree.

Reviewed by:	peter, dfr
1999-12-03 08:41:24 +00:00
Seigo Tanimura
125fdb9848 Comment out the newmidi stuff. 1999-11-22 10:28:05 +00:00
Seigo Tanimura
fe1a5d1c2f - 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>
1999-11-22 06:07:49 +00:00