Cameron Grant
5bc2a29c8c
add commented-out dependancies on the new sb8 and sb16 drivers
2000-10-28 19:35:54 +00:00
Cameron Grant
eadd0f839e
split up sb16 and sb/sbpro drivers
...
we do not support sb versions <2.00, and the sb8 driver has not been tested
yet.
these drivers are not yet enabled by default.
2000-10-28 19:20:03 +00:00
Cameron Grant
d16b567379
implement SNDCTL_DSP_POST
2000-10-27 22:20:45 +00:00
Poul-Henning Kamp
46aa3347cb
Convert all users of fldoff() to offsetof(). fldoff() is bad
...
because it only takes a struct tag which makes it impossible to
use unions, typedefs etc.
Define __offsetof() in <machine/ansi.h>
Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>
Remove myriad of local offsetof() definitions.
Remove includes of <stddef.h> in kernel code.
NB: Kernelcode should *never* include from /usr/include !
Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API.
Deprecate <struct.h> with a warning. The warning turns into an error on
01-12-2000 and the file gets removed entirely on 01-01-2001.
Paritials reviews by: various.
Significant brucifications by: bde
2000-10-27 11:45:49 +00:00
Cameron Grant
9ec437a334
add reinit functions to mixers
...
unstaticize chn_start()
add reset/resetdone functions to channels
2000-10-26 20:46:58 +00:00
Cameron Grant
badd7dc127
do not attach to soundblaster 1.x - they are unsupported
2000-10-26 20:31:16 +00:00
Cameron Grant
c0960a5e91
handle AFMT_QUERY right
2000-10-26 01:34:54 +00:00
Poul-Henning Kamp
db7e3af111
Remove unneeded #include <machine/clock.h>
2000-10-15 14:19:01 +00:00
Maxim Sobolev
6e3c38712b
Reduce buffer size from 64K to 4K.
...
Approved by: cg
2000-10-09 14:54:32 +00:00
Nick Sayer
04c24efdc1
Add suspend/resume hooks.
...
Submitted by: sean@stat.duke.edu
2000-09-28 14:02:49 +00:00
Cameron Grant
c9c6ba09e4
prepare for adding a rate conversion feeder.
...
move format conversion feeders to feeder_fmt.c - no pertinent history so no
repo-copy.
2000-09-23 22:11:32 +00:00
Cameron Grant
33c878f034
only probe mandatory channels on known bad codecs
2000-09-23 22:00:09 +00:00
John Baldwin
1204fd85a4
Enable the snd_maestro module and have the snd_driver module depend on it.
...
Approved by: cg
2000-09-23 17:35:37 +00:00
Seigo Tanimura
c74c29ca6b
Since the unit number of a midi/sequencer device is expressed in 4
...
bits, we can configure only up to 16 units.
2000-09-18 10:17:38 +00:00
Cameron Grant
341f16cc60
dynamify- probe codec for supported channels
...
add channel mappings for mixer
2000-09-17 23:51:00 +00:00
Cameron Grant
7dfc932548
fix warnings
2000-09-17 23:46:32 +00:00
Cameron Grant
0a1fe8922f
disable 16bit mono support- this will be handled by software conversion to
...
stereo as hardware mono is very noisy
2000-09-09 21:31:06 +00:00
Cameron Grant
58359dc594
add 16bit mono/stereo conversion feeder
...
prefer feeder chains of length 1 over length 2
2000-09-09 21:24:03 +00:00
Cameron Grant
306f91b60b
detach support
...
remove un-needed setdir functions
add bus_teardown_intr calls where necessary
destroy our dma tags where necessary
destroy ac97 before releasing resources
2000-09-09 19:21:04 +00:00
Cameron Grant
7d60928719
ess maestro driver - not enabled by default
...
Submitted by: Taku YAMAMOTO <taku@cent.saitama-u.ac.jp>
2000-09-06 20:10:55 +00:00
Cameron Grant
cd2c103ae0
initial support for multiple ac97 codecs
2000-09-05 21:08:01 +00:00
Cameron Grant
c02f3f7aee
add detach support
2000-09-05 21:06:11 +00:00
Cameron Grant
85a6a5dce4
allow a null setdir implementation
2000-09-05 21:00:45 +00:00
Cameron Grant
c9b53085be
be more verbose about failed unload attempts
2000-09-05 20:58:51 +00:00
Cameron Grant
37ab02c0ed
tidy up a little, add a mask for 32bit formats
2000-09-05 20:56:31 +00:00
Peter Wemm
8ac2d635c4
Fix warnings by moving static functions before they are used.
2000-09-03 05:32:09 +00:00
Cameron Grant
f776b5abb8
update for phk's last devfs commit
2000-09-02 23:14:46 +00:00
Poul-Henning Kamp
db90128160
Avoid the modules madness I inadvertently introduced by making the
...
cloning infrastructure standard in kern_conf. Modules are now
the same with or without devfs support.
If you need to detect if devfs is present, in modules or elsewhere,
check the integer variable "devfs_present".
This happily removes an ugly hack from kern/vfs_conf.c.
This forces a rename of the eventhandler and the standard clone
helper function.
Include <sys/eventhandler.h> in <sys/conf.h>: it's a helper #include
like <sys/queue.h>
Remove all #includes of opt_devfs.h they no longer matter.
2000-09-02 19:17:34 +00:00
Cameron Grant
f3dcf66158
add a missing return statement, doh.
2000-09-02 18:55:01 +00:00
Cameron Grant
33dbf14a17
change mixer api slightly
...
change channel interface - kobj implementation coming soonish
make pcm_makelinks not panic if modular
add pcm_unregister()
these changes support newpcm kld unloading, but this is only implemented
by ds1.c
2000-09-01 20:09:24 +00:00
Cameron Grant
f2d00399d1
remove stuff accidentally left in last commit
2000-08-29 20:53:56 +00:00
Cameron Grant
1088e98b00
suspend/resume for ds1 driver
...
PR: misc/20891
Submitted by: Ira L. Cooper <ira@mit.edu>
2000-08-29 20:50:42 +00:00
Cameron Grant
c07a337569
make the test for hwptr going backwards more picky- now it only triggers if
...
15/16 of the buffer is skipped or we go backwards by < 1/16 of buffer size.
2000-08-29 16:32:26 +00:00
Cameron Grant
7c438dbe9c
add devfs support. when devfs is enabled, sysctl hw.sndunit is used to set
...
which sound unit the /dev/{dsp,mixer,dspW,audio} links point at. this can
also be set from the loader.
2000-08-29 16:21:33 +00:00
Cameron Grant
dacda62ff2
add driver for forte-media fm801
...
PR: conf/20698
Submitted by: dimmy the wild <diwil@dataart.com>
2000-08-29 16:12:28 +00:00
Doug Rabson
e6171135a7
Fix disordered arguments to bus_space_barrier().
2000-08-28 21:02:18 +00:00
Cameron Grant
513693be6c
rework feeder sytem to allow feeders in klds
...
modify driver capability reporting format to list every audio format
seperately- required for above and because we could not previously indicate
that mono was unsupported.
there should be no functional impact.
2000-08-20 22:18:56 +00:00
Cameron Grant
fa06efc7e6
fix SNDCTL_DSP_GETODELAY
...
PR: kern/20340
Submitted by: Takashi SHIRAI <shirai@nintendo.co.jp>
2000-08-19 18:29:46 +00:00
Cameron Grant
4e77c04865
don't complain about bad irqs if using a shared irq
2000-08-19 18:22:20 +00:00
Cameron Grant
becc0678b7
Recognize ESS 1888 in Dell Latitude XPi
...
PR: kern/18714
Submitted by: Sean O'Connell <sean@stat.Duke.EDU>
2000-08-19 18:17:15 +00:00
Nick Sayer
6ba60b3c4a
This patch appears to solve the problems with recording resulting
...
in bogus hwptr warnings. Further comments sought on -hackers
were not forthcoming. I can only hope that calling DELAY() like
this doesn't cause any heartburn.
2000-08-13 19:20:02 +00:00
Nick Sayer
fc35953a16
Missed a step when activating the solo driver.
2000-08-09 20:28:19 +00:00
Cameron Grant
4873b46dc7
change irq handling slightly
...
add another non-ac97 256av
2000-08-09 18:51:27 +00:00
Cameron Grant
071280d442
MFS: module macro changes
2000-08-09 18:46:48 +00:00
Nick Sayer
0edeb3dc90
A couple of cosmetic fixes, plus a biggie: When checking the DMA
...
position, channel 1's dma position register must be quiescent. So
the driver will spl, pause the DMA, delay a bit and hold as still as
possible while snapping the picture.
I'm sure there HAS to be a better way to do this, but if there is, it's
not documented.
So far as I can tell, this fixes recording, which means the Solo is open
for business.
2000-08-09 07:14:56 +00:00
Cameron Grant
1874ec255c
MFS: sync with peter's isadma fixup
2000-08-09 01:22:09 +00:00
Cameron Grant
ba90ebe703
activate via82c686 audio driver
2000-08-09 01:08:59 +00:00
Cameron Grant
fb9f118e6f
new driver: via 82c686 chipset audio
...
not personally tested, but i'm assured it works
Submitted by: David Jones <dej@ox.org>
PR: kern/20161
2000-08-09 00:55:55 +00:00
Cameron Grant
5fd7b0878e
warn if hwptr goes backwards
2000-08-09 00:42:00 +00:00
Cameron Grant
6c1146c0b8
fix the staticy sound issue
...
use timer instead of per-channel interrupts
do playback like the linux driver - may fix nmi-with-ecc issue
2000-08-06 18:10:05 +00:00
Nick Sayer
05a1fdb459
Simplex devices will always report EBUSY on 2nd (and subsequent)
...
opens if the reference count is not decremented on close.
Note that this may result in the reference count being corrupted
on full duplex devices (due to mismatching opens/closes), but the
code doesn't use the reference count for anything on full duplex
devices.
2000-08-02 22:47:44 +00:00
Nick Sayer
3ac1ca3363
1. Increase the size of the DMA buffer.
...
2. Offer half duplex with both playback and record on channel 1 or
full duplex with playback always on channel 2 as a compile-time option.
3. 16 bit record output is byte swapped for some dumb reason. Report the _BE
AFMTs for recording.
2000-08-02 22:45:57 +00:00
Nick Sayer
a7e1150660
Undo some of my own damage. With this patch, it appears that both
...
recording and playback now work correctly.
2000-08-02 19:37:43 +00:00
Nick Sayer
bb7f26c3d9
Fix channel 1 playback the rest of the way. There are a couple of
...
hiccups, but playback now proceeds mostly normally using both channel 1
and 2.
2000-08-02 15:09:39 +00:00
Nick Sayer
19a0702e86
Get playback on channel 1 closer to working. 8 bit samples work.
...
16 bit samples have some sort of choppiness, the nature of which
is not completely clear, but it clearly has something to do with
dma buffer synchronization. But at least channel 1 makes noise now.
2000-08-02 08:01:00 +00:00
Nick Sayer
8eb3acc9be
Fix channel 1, sort of. recording now generates IRQs and the output
...
appears to be the correct length, but quality of output has not yet
been tested. Also, full duplex audio (that is, playback on channel 1)
does not yet work. Two constants and I am there!
Obtained from: major hints from ALSA
2000-08-02 06:36:55 +00:00
Nick Sayer
80a8e065eb
Reverse the sense of the signed/unsigned formatting bit.
...
This dramatically cleans up playback quality, at least with mxaudio.
2000-08-01 04:18:15 +00:00
Cameron Grant
fd1aaeccce
almost-there ess solo-1 driver, committed so people can tell me why it
...
doesn't generate irqs.
2000-07-31 16:17:40 +00:00
Cameron Grant
5151584d21
add suspend/resume for yamaha chips
...
Submitted by: Ira L Cooper <ira@MIT.EDU>
2000-07-30 21:15:35 +00:00
Cameron Grant
1c60ef3f3c
fix a potential local DoS attack
2000-07-30 19:38:26 +00:00
Cameron Grant
e04387c95a
fix a bug where opening /dev/dsp twice resulted in it being busy until reboot
2000-07-30 19:36:13 +00:00
Cameron Grant
3c1b957d66
do the ac97 init delay for all chips and increase it to 500ms
2000-07-30 02:33:37 +00:00
Cameron Grant
d98c7b9a99
make this file suitable for 4-stable as well as 5-current
2000-07-18 21:23:48 +00:00
Richard Seaman Jr.
307754cbe2
PR:19945
...
Reviewed by:tanimura
Fix boot panic introduced by newmidi code.
2000-07-18 20:18:16 +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
e71eb9c328
do-nothing module that depends on all sound drivers
2000-07-03 21:00:44 +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
Ollivier Robert
c790e2240e
This is the patch to make my soundcard, a Creative Ensoniq AudioPCI (an
...
es1371 chip, device id 0x58801274 rev 0x02).
Submitted by: Kenneth Wayne Culver <culverk@wam.umd.edu>
2000-07-02 14:17:41 +00:00
Cameron Grant
946e608646
add record channel irq timeouts too
2000-06-20 23:42:08 +00:00
Cameron Grant
e4d5b2502d
fix a bug where opening for write would not fail if channel allocation failed
...
when playing, if we stall for 1s with no data advancing, abort and mark the
channel dead - fail all future operations
2000-06-20 23:27:12 +00:00
Cameron Grant
03cab0581f
make mixer reads return the value written instead of the value set
...
people seem to want this even though it breaks oss spec compliance
2000-06-19 20:31:58 +00:00
Cameron Grant
fa5e422d98
replace a line erroneously removed in 1.28, should fix xmms
...
make buf_clear handle unaligned lengths
2000-06-17 19:29:40 +00:00
Cameron Grant
70776a9c0b
add alpha-quality recording code and handle pci error interrupts - this may
...
prevent the card generating an nmi on ecc systems. for now a message is
printed on every pci error and it seems every time we start playng we get one
2000-06-13 23:24:40 +00:00
Cameron Grant
20a874f116
handle closing differently - should fix the end-of-sample cutoff bug
2000-06-13 23:18:43 +00:00
Brian Somers
a54185c7ba
Add (another) PnP entry for the ESS ES1869 (Compaq OEM)
...
Submitted by: mdharnois@home.com
PR: 19206
2000-06-12 09:09:37 +00:00
Peter Wemm
a99bef94ed
Untangle some #include between gusc.c/mss.c - gusc.c could create
...
an attachment node for something that may not have been compiled in.
2000-06-10 07:20:54 +00:00
Peter Wemm
cb73359d42
Unused include: #include "sbc.h"
2000-06-10 07:17:29 +00:00
Peter Wemm
83fc8b6d34
Unused includes: #include "pci.h", #include "pcm.h"
2000-06-10 07:15:15 +00:00
Dan Moschuk
7bf9834a55
Increase delay from 10mu to 1000mu when reading play control size. This
...
allows the YMF744 to initialize properly.
2000-06-09 16:44:30 +00:00
Cameron Grant
1a50bd2e37
handle duplex properly in the AIOGCAP ioctl - this may (partially?) fix rat
2000-06-07 11:51:30 +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
Cameron Grant
dafad92c7d
support recording
2000-06-06 22:34:09 +00:00
Cameron Grant
20cdda004b
improve recording
2000-06-06 22:30:22 +00:00
Cameron Grant
9c3268206d
don't panic if we try to add a channel we said we wouldn't
2000-06-06 22:24:53 +00:00
Peter Wemm
3e0f102e57
With this evil hack the DS1 driver works on our Intel desktop
...
motherboards that use YMF740's. It has a strange subvendor and subdevice
ID and requires a disturbingly long delay after the ac97 codec init.
Cameron hasn't had this driver tested on another 740 yet, so we don't know
if this is a quirk of all 740's, or if its just something about the codec
that Intel used.
2000-06-01 03:58:27 +00:00
Cameron Grant
17dbf67736
if a device has no play or no record channels, set its simplex flag.
2000-06-01 01:32:30 +00:00
Cameron Grant
e05327ee1b
if we get bad values for playctrlsize, the firmware may not have initialised
...
yet so retry.
2000-06-01 01:29:05 +00:00
Cameron Grant
2176a9588a
add a bit more diagnostic info for the bus_dmamap_load failure case
2000-05-31 19:04:12 +00:00
Cameron Grant
bd68ce8be9
yamaha ds1/ds1e pci sound driver - work in progress, mixer and playback only.
...
tested on ymf724f only.
conf/files entry is commented out, enable it manually to test this code and
let me know results.
2000-05-31 03:21:36 +00:00
Jun Kuriyama
81c0587fa1
Add more ESS1869 PnP Sound Card PnPid.
...
Submitted by: MIHIRA Yoshiro
PR: kern/17349
2000-05-29 07:43:51 +00:00
Peter Wemm
4cbef178df
Use the correct name for a mapping register, not the old FreeBSD 2.x
...
compatability name.
2000-05-28 15:15:14 +00:00
Cameron Grant
94e3845ccd
fix the return value of the SOUND_PCM_WRITE_CHANNELS ioctl
...
re-enable old pcm ioctls
2000-05-27 14:40:17 +00:00
Cameron Grant
d28089a10d
move various fields from pcm_channel to snd_dbuf
...
improve chn_read code- don't stop/restart on overrun, just dump data
more error checking on ioctls
2000-05-26 21:55:13 +00:00
Cameron Grant
04553e63a5
if we have a codec init routine, fail the attach if init fails
2000-05-26 21:42:50 +00:00
Cameron Grant
35f9e4a1db
handle emulated dma reads
...
don't try to get sample size from snd_dbuf
2000-05-26 21:15:47 +00:00
Jake Burkholder
e39756439c
Back out the previous change to the queue(3) interface.
...
It was not discussed and should probably not happen.
Requested by: msmith and others
2000-05-26 02:09:24 +00:00
Jake Burkholder
740a1973a6
Change the way that the queue(3) structures are declared; don't assume that
...
the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk
Reviewed by: phk
Approved by: mdodd
2000-05-23 20:41:01 +00:00
Yoshihiro Takahashi
d2fce85dba
Oops, rman_get_bushandle() should be converted to rman_get_virtual()
...
if resources are mapped to memory.
2000-05-20 16:15:50 +00:00
Yoshihiro Takahashi
7c14268dbd
Supported the mss on PC-98 and Sound Blaster 98.
...
Submitted by: "T.Yamaoka" <taka@windows.squares.net>
2000-05-19 15:41:52 +00:00
Cameron Grant
942aeab734
fix a speed bug that nobody noticed
2000-05-15 02:10:27 +00:00