Commit Graph

288 Commits

Author SHA1 Message Date
David E. O'Brien
07f5454078 Add PCI identifier for Dell modified SBLive! card
Submitted by:	Joseph Dunn <joseph@magnesium.net>
2004-06-13 22:12:02 +00:00
Maxime Henrion
0547806326 Make the emu10k1 pcm driver INTR_MPSAFE. The locking is modeled
exactly as done in the cmi driver.  I am quite confident this is
safe since I'm runing this for more than two weeks now, on an SMP
box.  A few people tested this patch for me successfully as well.
2004-06-04 16:42:33 +00:00
Seigo Tanimura
a5dc42def9 Axe the old midi drivers and framework. matk has developed a new
module-friendly midi subsystem to be merged soon.
2004-06-01 06:22:59 +00:00
Mathew Kanner
3858fd7a0c Add PCI ID for via 8237.
Submitted by:	Josh Elsasser <jre@vineyard.net>
Approved by:	tanimura (mentor)
PR:		kern/61730
2004-05-26 22:05:50 +00:00
Brian Feldman
a7d7f349bd This driver certainly works fine turning INTR_MPSAFE back on. For those
of you with other cards, please do review and test the drivers for
MP-safety and disable Giant in the interrupt routines when you are
sure of proper functionality.
2004-04-21 04:23:51 +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
Mathew Kanner
236efae6a9 By default, ich4 has NAMBAR and NABMBAR i/o spaces as
read-only.  Need to enable "legacy support", by poking
into pci config space.  (comment from the patch)

Submited by:	Autrijus Tang <autrijus@autrijus.org>
Approved by:	tanimura (mentor)
2004-03-31 00:11:24 +00:00
Marcel Moolenaar
056dc22c4f Actually program the list of recording devices in sv_mix_setrecsrc().
This change has not been tested.

This change was triggered by a gcc(1) warning on ia64 at -O2.  The
variable v was not used after being computed, which resulted in enough
dead code elimination (DCE) to confuse the compiler and emit a bogus
warning about the use of the variable i without prior definition. The
variable i is the loop variable.

Submitted by: des
Responsibility: marcel
2004-03-20 04:38:21 +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
Mathew Kanner
0d8ed52ea5 Augment /dev/sndstat with the module names, if applicable.
Approved by:	  tanimura (mentor)
2004-03-06 15:52:42 +00:00
Poul-Henning Kamp
4555065861 As previously announced: discontinue use of makedev() call in soundcode.
This takes us a lot closer to refcounting dev_t.

This patch originally by cg@ with a few minor changes by me.

It is largely untested, but has been HEADSUP'ed twice, so presumably
people have not found any issues with it.

Submitted by:	cg@
2004-01-17 10:37:11 +00:00
David E. O'Brien
b64a0ad5c1 Specify the right location of the generated header. 2004-01-12 00:06:30 +00:00
David E. O'Brien
21f1e37cbd Add Audigy support.
I started with a year-old patch by Orlando Bassotto
<orlando.bassotto@ieo-research.it>, and ported it to 5.2-CURRENT along with
fixing the problems working with pre-Audigy cards.
2004-01-11 10:30:56 +00:00
David E. O'Brien
c1d6534deb Remove EMUDEBUG [un]def. This should be done in the Makefile. 2004-01-11 01:34:41 +00:00
David E. O'Brien
2511c244ad Sync with Creative's 8010.h rev 1.51. 2004-01-09 06:38:11 +00:00
Scott Long
42c3555cff Fix sound LOR problems:
dsp_open: rearrange to only hold one lock at a time

dsp_close: ditto

mixer_hwvol_init: delete locking, the only consumer seems to
be the ess driver and it only call it a creation time, I
think the device will be stable across the sleepable malloc.

cmi interrupt routine: Release locks while caller chn_intr,
either this or do what emu10k1 does which is have no locks
at in the interrupt handler.

Submitted by:	mat@cnd.mcgill.ca
2003-11-11 05:38:28 +00:00
Dag-Erling Smørgrav
7847079929 A couple of months' worth of back-burner hacking: restructure to better
handle the minor (but significant) differences between the various
Vortex chips; add (incomplete) support for playback.
2003-10-12 11:33:39 +00:00
Nate Lawson
feec6a7a90 Correctly reset ich[3-5] sound cards on resume. This fixes audio playback
after suspend/resume for me.

PR:
Submitted by:	iwasaki
Reviewed by:	orion
Approved by:	cg
Obtained from:
MFC after:
2003-09-15 21:16:47 +00:00
Cameron Grant
3f22597838 update my email address. 2003-09-07 16:28:03 +00:00
David E. O'Brien
bbee264035 Recognize the sound chip on the Opteron-based nForce3 motherboards
(such as the Asus SK8N).
2003-09-03 07:38:21 +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
Orion Hodson
99e082c84d Add Creative SB AudioPCI CT4730 rev A.
Submitted by:	David Xu <davidxu@FreeBSD.org>
PR:		kern/54810
2003-08-29 03:27:26 +00:00
David E. O'Brien
d4aeb0ed01 Add sound support for the AMD64 8111 chip.
PR:		kern/55932
Submitted by:	Mark Kettenis <kettenis@chello.nl>
2003-08-28 19:21:21 +00:00
Ian Dowse
3944d0ff35 When calculating the block size to use for a particular sample rate,
round the result up to a multiple of 4 bytes so that it will always
be a multiple of the sample size. Also use the actual buffer size
from sc->bufsz instead of the default DS1_BUFFSIZE.

This fixes panics and bad distortion I have seen on Yamaha DS-1
hardware, mainly when playing certain Real Audio media.

Reviewed by:	orion (an earlier version of the patch)
2003-08-23 13:00:48 +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
Orion Hodson
4cca7f0aed Switch from legacy to native mode for ICH4 and ICH5.
Submitted by: Shin-ichi YOSHIMOTO <yosimoto@waishi.jp>
Test by: Markko Merzin <markko@short.cut.ee>
PR: kern/53242
MFC after: 5 days
2003-08-10 14:57:47 +00:00
Cameron Grant
e2df178350 * support ich5
PR:		kern/53242
Submitted by:	Shin-ichi Yoshimoto <yosimoto@waishi.jp>  (partly)
Tested by:	Dominic Marks <dom@cus.org.uk> (version in PR)
MFC after:	1 week
2003-07-06 23:54:00 +00:00
Cameron Grant
b6eb8f8a31 * add support for amd-768 audio, as used on many dual athlon boards. only
tested for playback.

* modify device name strings for ich chips to better conform with their
common names.

* remove superflous 'AC97 controller' from nforce device names.

MFC after: 1 week
2003-07-06 03:11:06 +00:00
Scott Long
f6b1c44d1f 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
2003-07-01 15:52:06 +00:00
Dag-Erling Smørgrav
f834a1168c Add (but do not connect) a half-finished driver for Aureal Vortex cards.
The mixer works, pcm support is half done.
2003-06-01 11:58:46 +00:00
David E. O'Brien
82d4d32d65 more style(9) changes. 2003-04-20 09:07:14 +00:00
David E. O'Brien
e3da61d733 more style(9) changes. 2003-04-20 08:37:29 +00:00
David E. O'Brien
ee1ca8b7f5 A few style(9) fixes. 2003-04-20 07:43:09 +00:00
David E. O'Brien
aca6bb0d8c Sync with Creative's 8010.h rev 1.39. 2003-04-18 04:13:38 +00:00
Orion Hodson
5a289baba9 Perform warm or cold reset AC97 per the spec depending on state of the
codec during initialization.  This code mirrors the reset code used on
the VIA82c686 and fixes a codec initialization failure (SoundMAX
AD1885) reported by Matthias Schuendehuette.
2003-04-17 15:04:11 +00:00
Hidetoshi Shimokawa
30eaffaf6c Fix bogus maxsegsz parameter for bus_dma_tag_create().
MFC: 1 week
2003-04-16 05:03:35 +00:00
Matthew N. Dodd
533294b956 - Don't call pci_enable_io() in drivers (unless needed for resume).
- Don't test memory/port status and emit an error message; the PCI
  bus code will do this now.
2003-04-16 03:16:57 +00:00
Orion Hodson
538b04e4ad Fix mismatch between bus address stored for buffer descriptors and
actual address of buffer descriptor.  This should fix the reported
calibration failures and subsequent speed problems with ich chipsets.

Minor calibration comment updates.
2003-04-04 07:15:19 +00:00
Orion Hodson
6084370fe4 Perform warm reset if codec reports ready on attach.
Move AC97 link control power up poke so it is always performed on attach.
2003-03-28 16:33:15 +00:00
Orion Hodson
abe88fc972 Re-work ac97 initialization to match cold reset described in AC97r.23
and be prepared to wait much longer for codec to become ready.

Credit to Hugo D. Valentim <hvalentim@gmx.net> for reporting the
problem, providing useful pointers, and repeated diff testing.
2003-03-26 06:11:36 +00:00
Orion Hodson
8f832fd0ba For the VIA8233A use multi-sgd register set for primary playback
channel and disable DXS3.  Several users have reported DXS3 as playing
at half speed on the 8233A revision of the chipset.  This implicitly
means no SPDIF for VIA8233A users.
2003-03-26 05:51:13 +00:00
Orion Hodson
78a248c1db Add defines for low power and second codec ready. 2003-03-26 05:35:38 +00:00
Orion Hodson
600f6cbaa2 Distinguish between register sets that depend on ac97 caps (wr0, wr1,
msgd) and those that don't (dxs0-3) when reporting format caps.
2003-03-20 20:07:18 +00:00
Orion Hodson
876d09d890 Attempt a hard reset if AC97 codec is not ready on attach.
Halt attach if mixer_init fails.

Prompted by: points raised by Hugo Valentim <hvalentim@gmx.net>.
2003-03-05 05:56:18 +00:00
Olivier Houchard
33673595a6 Unbreak emu10k1 by properly using the buffer address.
New contestant for the lamest commit of the year award:	cognet
2003-02-26 16:11:18 +00:00
Orion Hodson
148f84cf1e Fix compilation on alpha. Pointy hat to Marcel. 2003-02-23 01:06:58 +00:00
Orion Hodson
c7bbf97e00 o Add back support for DXS channels.
o Make DXS3 the primary playback channel.  It may be the only
universally supported channel with the assorted revisions of this
chipset.

o Add sysctl and handler for enabling s/pdif output from DXS3.
2003-02-22 23:28:15 +00:00
Orion Hodson
3299968464 Clean up viachan_init. 2003-02-21 01:47:59 +00:00
Orion Hodson
439fa3dd0a Fix assignment of record sgd_addr and clean up via8233chan_init. 2003-02-21 01:47:17 +00:00