Commit Graph

108 Commits

Author SHA1 Message Date
cg
aea0875b7b do not blindly assume 8khz is supported on open(). try for 8khz but respect
minspeed/maxspeed specified by the hw driver.

Submitted by:	Andrew Gordon <arg@arg1.demon.co.uk>
2000-11-18 03:43:04 +00:00
cg
9053aa8eac slight mods to isa dma and channel flushing code 2000-11-07 00:32:35 +00:00
cg
90e60df23f if a channel dies, rejuvenate it on close() 2000-11-07 00:29:24 +00:00
cg
0b5b4b2b92 add AFMT_8BIT for easier determination of formats 2000-11-06 22:22:52 +00:00
cg
02095ded52 implement SNDCTL_DSP_POST 2000-10-27 22:20:45 +00:00
cg
51af9cbc48 add reinit functions to mixers
unstaticize chn_start()
add reset/resetdone functions to channels
2000-10-26 20:46:58 +00:00
cg
9da177e1fd handle AFMT_QUERY right 2000-10-26 01:34:54 +00:00
cg
0ded15533c 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
cg
21085086cf only probe mandatory channels on known bad codecs 2000-09-23 22:00:09 +00:00
cg
44b8cc1a63 dynamify- probe codec for supported channels
add channel mappings for mixer
2000-09-17 23:51:00 +00:00
cg
4e6d0bee00 add 16bit mono/stereo conversion feeder
prefer feeder chains of length 1 over length 2
2000-09-09 21:24:03 +00:00
cg
ff4fa615bd 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
cg
a4ed6d9092 initial support for multiple ac97 codecs 2000-09-05 21:08:01 +00:00
cg
e8326f6d5d allow a null setdir implementation 2000-09-05 21:00:45 +00:00
cg
b693bd58f3 be more verbose about failed unload attempts 2000-09-05 20:58:51 +00:00
cg
b1c395dcc2 tidy up a little, add a mask for 32bit formats 2000-09-05 20:56:31 +00:00
peter
0826c47d02 Fix warnings by moving static functions before they are used. 2000-09-03 05:32:09 +00:00
cg
b849c00871 update for phk's last devfs commit 2000-09-02 23:14:46 +00:00
cg
02898bd13f add a missing return statement, doh. 2000-09-02 18:55:01 +00:00
cg
b0d0cf50b2 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
cg
b47aafbd4d 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
cg
7ec6797b5b 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
cg
9aa3234516 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
cg
e31ae31a5e fix SNDCTL_DSP_GETODELAY
PR:		kern/20340
Submitted by:	Takashi SHIRAI <shirai@nintendo.co.jp>
2000-08-19 18:29:46 +00:00
cg
9e94654e2c MFS: module macro changes 2000-08-09 18:46:48 +00:00
cg
fcebf7c5ea MFS: sync with peter's isadma fixup 2000-08-09 01:22:09 +00:00
cg
84560963e5 warn if hwptr goes backwards 2000-08-09 00:42:00 +00:00
nsayer
02c322a0a4 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
cg
846411b8b4 fix a potential local DoS attack 2000-07-30 19:38:26 +00:00
cg
1d77ba76c3 fix a bug where opening /dev/dsp twice resulted in it being busy until reboot 2000-07-30 19:36:13 +00:00
cg
397a3bfd6a make this file suitable for 4-stable as well as 5-current 2000-07-18 21:23:48 +00:00
tanimura
4b24af17f5 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
cg
53b9868e7e 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
cg
1d3d03f892 add record channel irq timeouts too 2000-06-20 23:42:08 +00:00
cg
c7300ca8db 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
cg
52cf28c249 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
cg
c8cfea346b 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
cg
ecfe97d12c handle closing differently - should fix the end-of-sample cutoff bug 2000-06-13 23:18:43 +00:00
cg
d31f0cba49 handle duplex properly in the AIOGCAP ioctl - this may (partially?) fix rat 2000-06-07 11:51:30 +00:00
cg
5277facfee improve recording 2000-06-06 22:30:22 +00:00
cg
37f5f22631 don't panic if we try to add a channel we said we wouldn't 2000-06-06 22:24:53 +00:00
cg
0593719507 if a device has no play or no record channels, set its simplex flag. 2000-06-01 01:32:30 +00:00
cg
be3cacb49a fix the return value of the SOUND_PCM_WRITE_CHANNELS ioctl
re-enable old pcm ioctls
2000-05-27 14:40:17 +00:00
cg
a873e6a0c9 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
cg
0f1dd9ed49 if we have a codec init routine, fail the attach if init fails 2000-05-26 21:42:50 +00:00
cg
33821aa2e8 handle emulated dma reads
don't try to get sample size from snd_dbuf
2000-05-26 21:15:47 +00:00
nyan
e6fbdc629d 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
phk
633deb3a69 Separate the struct bio related stuff out of <sys/buf.h> into
<sys/bio.h>.

<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall
not be made a nested include according to bdes teachings on the
subject of nested includes.

Diskdrivers and similar stuff below specfs::strategy() should no
longer need to include <sys/buf.> unless they need caching of data.

Still a few bogus uses of struct buf to track down.

Repocopy by:    peter
2000-05-05 09:59:14 +00:00
cg
d8ee80b8b9 fix the 100% cpu in xmms issue 2000-05-04 19:06:34 +00:00
phk
d7e981e734 Remove unneeded #include <sys/kernel.h> 2000-04-29 15:36:14 +00:00