Commit Graph

766 Commits

Author SHA1 Message Date
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
Don Lewis
a3193a9ca3 Create a new mutex type for virtual channels. This allows us to get
rid of the MTX_DUPOK flag on channel mutexes, which allows witness to
do a better job of lock order checking.  Nuke snd_chnmtxcreate() since
it is no longer needed.

Tested by:	matk
2004-02-28 19:47:02 +00:00
Don Lewis
466f31e55b Lock channels only as necessary in dsp_ioctl(), and only lock one
channel at a time unless it is actually necessary to lock both.
This avoids problems with lock order reversal and malloc() calls
with a mutex held when lower level code unlocks a channel, calls malloc(),
and relocks the channel.  This also avoids the cost of some  unnecessary
locking and unlocking.

Tested by:	matk
2004-02-28 19:42:48 +00:00
Poul-Henning Kamp
816d62bbb9 Device megapatch 5/6:
Remove the unused second argument from udev2dev().

Convert all remaining users of makedev() to use udev2dev().  The
semantic difference is that udev2dev() will only locate a pre-existing
dev_t, it will not line makedev() create a new one.

Apart from the tiny well controlled windown in D_PSEUDO drivers,
there should no longer be any "anonymous" dev_t's in the system
now, only dev_t's created with make_dev() and make_dev_alias()
2004-02-21 21:32:15 +00:00
Poul-Henning Kamp
dc08ffec87 Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
2004-02-21 21:10:55 +00:00
Mathew Kanner
0a2a8111d2 Fix a glitch in my last commit and revert to using selwakeuppri
Noticed by:	tanimura
Noticed by:	truckman
2004-02-20 01:24:57 +00:00
Mathew Kanner
e0b6c8a1da Fix a long-standing bug where select on vchans doesn't work
(never wake up) by iterating over them when they exist.

Approved by:	tanimura (mentor)
2004-02-19 01:07:15 +00:00
Michael Reifenberger
a905454644 Add dependency to snd_via8233 2004-01-29 14:11:03 +00:00
Don Lewis
12e524a290 Change KASSERT() in feed_vchan16() into an explicit test and call to
panic() so that the buffer overflow just beyond this point is always
caught, even when the code is not compiled with INVARIANTS.

Change chn_setblocksize() buffer reallocation code to attempt to avoid
the feed_vchan16() buffer overflow by attempting to always keep the
bufsoft buffer at least as large as the bufhard buffer.

Print a diagnositic message
	Danger! %s bufsoft size increasing from %d to %d after CHANNEL_SETBLOCKSIZE()
if our best attempts fail.  If feed_vchan16() were to be called by
the interrupt handler while locks are dropped in chn_setblocksize()
to increase the size bufsoft to match the size of bufhard, the panic()
code in feed_vchan16() will be triggered.  If the diagnostic message
is printed, it is a warning that a panic is possible if the system
were to see events in an "unlucky" order.

Change the locking code to avoid the need for MTX_RECURSIVE mutexes.

Add the MTX_DUPOK option to the channel mutexes and change the locking
sequence to always lock the parent channel before its children to avoid
the possibility of deadlock.

Actually implement locking assertions for the channel mutexes and fix
the problems found by the resulting assertion violations.

Clean up the locking code in dsp_ioctl().

Allocate the channel buffers using the malloc() M_WAITOK option instead
of M_NOWAIT so that buffer allocation won't fail.  Drop locks across
the malloc() calls.

Add/modify KASSERTS() in attempt to detect problems early.

Abuse layering by adding a pointer to the snd_dbuf structure that points
back to the pcm_channel that owns it.  This allows sndbuf_resize() to do
proper locking without having to change the its API, which is used by
the hardware drivers.

Don't dereference a NULL pointer when setting hw.snd.maxautovchans
if a hardware driver is not loaded.  Noticed by Ryan Sommers
<ryans at gamersimpact.com>.

Tested by:	Stefan Ehmann <shoesoft AT gmx.net>
Tested by:	matk (Mathew Kanner)
Tested by:	Gordon Bergling <gbergling AT 0xfce3.net>
2004-01-28 08:02:15 +00:00
Mathew Kanner
e7245381b9 Fix a panic in dsp_clone when trying to access a sound
device that doesn't exists.  I'm using my discretion and
committing without mentor approval since Seigo is away.

Noticed by:	Maxime Henrion <mux@freebsd.org>
2004-01-25 22:46:22 +00:00
Mathew Kanner
3c6b655dff Sync with DFBSD v.1.16. Add new codecs IDs, fix some spelling.
Approved by:    des (interim mentor)
2004-01-23 16:38:54 +00:00
Mathew Kanner
222d2384ef Reduce latency when using the SNDCTL_DSP_RESET ioctl by calling
chn_resetbuf().

Submited by:	Pyun YongHyeon <yongari@kt-is.co.kr>
Approved by:	tanimura (mentor)
2004-01-20 05:30:09 +00:00
Mathew Kanner
5ee30e277a Fix a panic when kldloading a sound driver. Do this by replacing the
link-list of dev_t's with named variables.  Remove used code.

Approved by:		tanimura (mentor)
2004-01-20 03:58:57 +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
Don Lewis
55a3845131 The last argument to mtx_init() should be MTX_DEF, not 0. This is not a
functional change since MTX_DEF happens to be defined as 0.
2003-12-08 01:08:03 +00:00
Mathew Kanner
bc38932a58 Fix some locking violations by creating seperate mutex classes
for play and record channels.

Approved by:	seigo (mentor)
Approved by:	scottl (re)
2003-12-05 02:08:13 +00:00
Mathew Kanner
8e2d74a486 Fix a panic due to holding a lock over calls to uiomove.
Pointed out by:	Artur Poplawski
Explained by:	Don Lewis (truckman)
Approved by:	tanimura (mentor)
Approved by:	scottl	(re)
2003-11-27 19:51:44 +00:00
Jun Kuriyama
94ed763dee Add ID for ALC658 CODEC.
Tested on:	GIGABYTE GA-8S655FX-L
Reviewed by:	orion
2003-11-11 22:15:17 +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
Seigo Tanimura
512824f8f7 - Implement selwakeuppri() which allows raising the priority of a
thread being waken up.  The thread waken up can run at a priority as
  high as after tsleep().

- Replace selwakeup()s with selwakeuppri()s and pass appropriate
  priorities.

- Add cv_broadcastpri() which raises the priority of the broadcast
  threads.  Used by selwakeuppri() if collision occurs.

Not objected in:	-arch, -current
2003-11-09 09:17:26 +00:00
Daniel Eischen
ec49974ac2 Don't attempt to destroy the driver mutex when it hasn't yet
been created.  This has been sitting in my local tree for
far too long; I can't believe noone else has come across this
yet.
2003-10-29 21:54:37 +00:00
Dag-Erling Smørgrav
5197cdc1aa Recognize the Avance Logic ALC655 codec found on some ICH4/5-based
motherboards, such as the Gigabyte I848P.

PR:		kern/54176
Submitted by:	Chris Keladis <chris@cmc.optus.net.au>
Forgotten by:	orion
2003-10-12 11:51:24 +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
Bruce Evans
6ab09ca79b Fixed world breakage in previous commit. Somehow the wrong include was
removed in the world although the correct one was removed in the universe.
2003-09-17 01:09:10 +00:00
Bruce Evans
4b60a21e0c Don't include another driver's private reg.h file (sioreg.h). Including
ns16550.h is now sufficient.
2003-09-16 11:04:22 +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
Orion Hodson
6f0182bd0c Add Creative EV1938.
Submitted by:	David Xu <davidxu@FreeBSD.org>
PR:		kern/54810
2003-08-29 03:24:08 +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
Orion Hodson
cfd5696d22 When present use ogain instead of master for surround sound channels.
The latter has lead to reports of broken audio.

Do not swap ogain and master when headphones detected.
2003-08-23 21:39:51 +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
Ian Dowse
72d173fa8f Fix an off-by-one error in feed_monotostereo16() that caused the
first sample in the buffer to be ignored. The bug caused a repetitive
glitch in one of the stereo channels when playing mono sound on
configurations that use the monotostereo16 feeder.

Reviewed by:	orion
2003-08-23 12:18:30 +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
Orion Hodson
49fd69053e Additional VT1616 id.
Submitted by: Greg Lewis
2003-08-21 23:22:51 +00:00
Orion Hodson
a52604cf48 Apply Rudolf Cejka's patch for:
o AD1980 hook.
o ac97_fix_auxout.

and:

o Associate AC97_MIX_AUXOUT with SOUND_MIXER_OGAIN rather than
SOUND_MIXER_MONITOR.

o Add ac97_fix_tone to remove tone controls from mixer if invalid.
2003-08-21 15:50:32 +00:00
Orion Hodson
daa738f848 Add patch for AD198x.
Submitted by: Oleg Sharoiko, Rudolf Cejka.
2003-08-21 15:44:55 +00:00
Cameron Grant
a527dbc77c handle locking when creating or destroying vchans better 2003-08-18 23:20:39 +00:00
Cameron Grant
a5dc588839 try to make really sshort sounds actually play 2003-08-18 23:18:47 +00:00
Cameron Grant
b9c6d8cdcf modify comments 2003-08-15 02:31:13 +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
Diomidis Spinellis
5987356569 Change gcc-specific aggregate initialization member specifiers
into C9X initializer designators.

Reviewed by:	schweikh (mentor)
MFC after:	4 weeks
2003-08-05 07:23:35 +00:00
Cameron Grant
eaa69ee9a9 * add a function to display a complete feeder chain on the console, for
debugging.

* set the parent of non-format feeders, so that sndstat doesn't miss out
things like feeder_rate.

MFC:		1 week
2003-07-07 17:40:02 +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
Matthew N. Dodd
f1e875be01 Set a lower bound on fragment size rather than returning a failure
when the user specifies a maximum fragment size < 2.

This is the behavior that Linux provides and fixes the problem I've
observed in Tribes2 where sounds effects are delayed by 1/2 a second.
2003-06-26 13:13:18 +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
Orion Hodson
4f3204ef22 Fix lock order reversal when opening device and chn_reset fails.
Submitted by: Jan-Espen Pettersen <sigsegv@leakingmemory.org>
Tested by: Georg Funk <georgfunk@web.de>
2003-05-01 16:31:21 +00:00
Alexander Kabaev
104a9b7e3e Deprecate machine/limits.h in favor of new sys/limits.h.
Change all in-tree consumers to include <sys/limits.h>

Discussed on:	standards@
Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
2003-04-29 13:36:06 +00:00
John Baldwin
6faa2f6d6e Comment out the mixer entry for igain for the mic 20dB boost for now since
it can cause feedback problems on some laptops.

Reviewed by:	orion
2003-04-23 16:49:53 +00:00
Orion Hodson
61a0da1de5 Add eMicro codec ids. 2003-04-21 04:48:40 +00:00
Orion Hodson
96524a52b6 Use SOUND_MIXER_IGAIN to toggle 20dB mic boost for want of a better
place for it.

Assorted comments.

Submitted by: luigi
2003-04-21 03:47:28 +00:00
Orion Hodson
6635978f23 Additional malloc failure checks. 2003-04-20 17:08:56 +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
ba548c643a Additional codec ids. 2003-04-04 07:37:25 +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
Jake Burkholder
227f9a1c58 - Add vm_paddr_t, a physical address type. This is required for systems
where physical addresses larger than virtual addresses, such as i386s
  with PAE.
- Use this to represent physical addresses in the MI vm system and in the
  i386 pmap code.  This also changes the paddr parameter to d_mmap_t.
- Fix printf formats to handle physical addresses >4G in the i386 memory
  detection code, and due to kvtop returning vm_paddr_t instead of u_long.

Note that this is a name change only; vm_paddr_t is still the same as
vm_offset_t on all currently supported platforms.

Sponsored by:	DARPA, Network Associates Laboratories
Discussed with:	re, phk (cdevsw change)
2003-03-25 00:07:06 +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
9963235abc Correct vendor id for ALC101. 2003-03-20 18:17:39 +00:00
Orion Hodson
b2a0f525e6 Correct CS4205 base vendor id.
Reported by:    Christophe Juniet and Mark Santcroos.
2003-03-12 15:11:25 +00:00
Orion Hodson
a7576e2e4b Back out last commit, which is fine in theory, but ignores the fact
that a lock is held whilst the allocations are made (M_WAITOK -> M_NOWAIT).
2003-03-05 14:48:28 +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
Poul-Henning Kamp
7ac40f5f59 Gigacommit to improve device-driver source compatibility between
branches:

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.

Approved by:    re(scottl)
2003-03-03 12:15:54 +00:00
Orion Hodson
19921b23b5 o Move vendor ids into separate table.
o Add assorted vendor and codec ids.
2003-02-28 18:04:52 +00:00
Scott Long
4bc7efe837 Add the ID for the CS4205 codec found in Dell laptops. Obtained from
the CS4205 spec.
2003-02-27 03:51:43 +00:00
Olivier Houchard
7ee68e82e7 Add SigmaTel STAC9750 entry.
Submitted by:	Paulius Bulotas <paulius.bulotas@microlink.lt>
2003-02-26 18:39:04 +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
a4273e83bc Replicate OSS behaviour when rate settings fails.
PR:	kern/26563
2003-02-26 14:38:19 +00:00
Maxime Henrion
07159f9c56 Cleanup of the d_mmap_t interface.
- Get rid of the useless atop() / pmap_phys_address() detour.  The
  device mmap handlers must now give back the physical address
  without atop()'ing it.
- Don't borrow the physical address of the mapping in the returned
  int.  Now we properly pass a vm_offset_t * and expect it to be
  filled by the mmap handler when the mapping was successful.  The
  mmap handler must now return 0 when successful, any other value
  is considered as an error.  Previously, returning -1 was the only
  way to fail.  This change thus accidentally fixes some devices
  which were bogusly returning errno constants which would have been
  considered as addresses by the device pager.
- Garbage collect the poorly named pmap_phys_address() now that it's
  no longer used.
- Convert all the d_mmap_t consumers to the new API.

I'm still not sure wheter we need a __FreeBSD_version bump for this,
since and we didn't guarantee API/ABI stability until 5.1-RELEASE.

Discussed with:		alc, phk, jake
Reviewed by:		peter
Compile-tested on:	LINT (i386), GENERIC (alpha and sparc64)
Runtime-tested on:	i386
2003-02-25 03:21:22 +00:00
Brian Feldman
3fbe138ca9 It seems that sound(4)'s feeder routines don't need to allocate memory
without waiting, since they are called from a system-call context only.
This appears to fix all sorts of problems with open("/dev/dsp", O_WRONLY)
randomly returning ENXIO.

Found by:	cognet
2003-02-23 20:49:45 +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
Olivier Houchard
38cc994207 Implement a "sndbuf_getbufaddr" function and use it instead of vtophys().
Reviewed by:	orion
2003-02-20 17:31:12 +00:00
Warner Losh
a163d034fa Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
Brian Feldman
d00d7d5c39 Sound devices were being leaked by dsp_open() not actually releasing the
channels it allocates if chn_reset() on them resulted in failure.
ARROW'D!
2003-02-11 16:58:54 +00:00
Yoshihiro Takahashi
ac7b094dca Include <isa/isavar.h> to fix building on alpha. 2003-02-08 07:05:07 +00:00
Yoshihiro Takahashi
3febcc57ec - 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
2003-02-07 14:05:34 +00:00