available in buffer when buffer was completely empty.
It now correctly reports the total buffer space available.
Reviewed by: jkh, davidg
Obtained from: Linux 1.3.20's sound driver code
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
taken from the voxware-3.5 distribution. Also some changes to the SB
and MPU IRQs to reflect more common/default settings.
Submitted-By: Brian Campbell <brianc@netrover.com>
with the copyright stuff fixed so soon (this should be merged into 2.2 when
you have a chance, Poul).
This is the new AWE32 driver, with support for the AWE32's fancy MIDI
synthesizer. The utilities for this will appear as port submissions soon
afterwards, according to the submitter.
Submitted-By: Randall Hopper <rhh@ct.picker.com>
Written-By: Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>
sys/pc98/i386/machdep.c: sync with i386/i386/machdep.c
sys/pc98/conf/options.pc98: sync with i386/conf/options.i386
sys/i386/isa/sound: DMA auto initialize mode support for PC98.
contributed by: Akio Morita <amorita@bird.scphys.kyoto-u.ac.jp>
Definite 2.2 material, I believe.
Submitted by: The FreeBSD (98) Development Team
(1) deleted #if 0
pc98/pc98/mse.c
(2) hold per-unit I/O ports in ed_softc
pc98/pc98/if_ed.c
pc98/pc98/if_ed98.h
(3) merge more files by segregating changes into headers.
new file (moved from pc98/pc98):
i386/isa/aic_98.h
deleted:
well, it's already in the commit message so I won't repeat the
long list here ;)
Submitted by: The FreeBSD(98) Development Team
(1) Add #ifdef PC98:
sys/pc98/boot/biosboot/boot2.S
(2) Fix bug that made it impossible to boot from sd's other than unit 0:
sys/pc98/boot/biosboot/sys.c
(3) Delete redundant $Id$:
sys/pc98/pc98/clock.c (reject$B$5$l$k$+$b$7$l$J$$(B)
(4) unt -> u_int:
sys/pc98/pc98/if_ed.c
(5) Add support for rebooting by the hot-key sequence:
sys/pc98/pc98/kbdtables.h
(6) Display now looks like PC/AT version:
sys/pc98/pc98/npx.c
(7) Change comment to match that of PC/AT version:
sys/pc98/pc98/pc98.c
(8) Add function prototypes:
sys/pc98/pc98/pc98_machdep.c
(9) Include PC98 headers:
sys/pc98/pc98/sound/adlib_card.c
sys/pc98/pc98/sound/audio.c
sys/pc98/pc98/sound/dev_table.c
sys/pc98/pc98/sound/dmabuf.c
sys/pc98/pc98/sound/midi_synth.c
sys/pc98/pc98/sound/midibuf.c
sys/pc98/pc98/sound/opl3.c
sys/pc98/pc98/sound/oatmgr.c
sys/pc98/pc98/sound/sb16_dsp.c
sys/pc98/pc98/sound/sb16_midi.c
sys/pc98/pc98/sound/sb_card.c
sys/pc98/pc98/sound/sb_dsp.c
sys/pc98/pc98/sound/sb_midi.c
sys/pc98/pc98/sound/sb_mixer.c
sys/pc98/pc98/sound/sequencer.c
sys/pc98/pc98/sound/sound_config.h
sys/pc98/pc98/sound/sound_switch.c
sys/pc98/pc98/sound/soundcard.c
sys/pc98/pc98/sound/sys_timer.c
(10) Merge in PC98 changes:
sys/i386/isa/sound/os.h
(11) Deleted as result of 9. and 10. above:
sys/pc98/pc98/sound/ad1848_mixer.h
sys/pc98/pc98/sound/aedsp16.c
sys/pc98/pc98/sound/coproc.h
sys/pc98/pc98/sound/finetune.h
sys/pc98/pc98/sound/gus_hw.h
sys/pc98/pc98/sound/gus_linearvol.h
sys/pc98/pc98/sound/hex2hex.h
sys/pc98/pc98/sound/mad16.h
sys/pc98/pc98/sound/midi_ctrl.h
sys/pc98/pc98/sound/midi_synth.h
sys/pc98/pc98/sound/opl3.h
sys/pc98/pc98/sound/os.h
sys/pc98/pc98/sound/pas.h
sys/pc98/pc98/sound/sb_mixer.h
sys/pc98/pc98/sound/soundvers.h
sys/pc98/pc98/sound/tuning.h
Submitted by: The FreeBSD(98) Development Team
(1) Merged i386/i386/sb.h, deleted pc98/pc98/sb.h.
(2) pc98/conf/GENERIC8 looks more like i386/conf/GENERIC now.
(3) Fixed display bug in pc98/boot/biosboot/io.c.
(4) Prepare to merge memory allocation routines:
pc98/i386/locore.s
pc98/i386/machdep.c
pc98/pc98/pc98_machdep.c
pc98/pc98/pc98_machdep.h
(5) Support new board "C-NET(98)":
pc98/pc98/if_ed98.h
pc98/pc98/if_ed.c
(6) Make sure FPU is recognized for non-Intel CPUs:
pc98/pc98/npx.c
(7) Do not expect bss to be zero-allocated:
pc98/pc98/pc98.c
Submitted by: The FreeBSD(98) Development Team
-I- to CFLAGS. <sb.h> must currently be used to give the version
of sb.h in the current directory, while "sb.h" in the buggy version
gave the (wrong) version in the source directory. Searching in the
source directory first is normal, but is the reverse of the order
suggested by the 4.4Lite2 #include style. -I- will remove the
ambiguities.
Clarified GUS DMA Settings.
Other misc. changes.
This should hold us over until I can finish cleaning up TASD, and finish
reintegrating all of the FreeBSD changes to the sound driver. At that time
this document will be removed, and it's information moved to the handbook.
fd and wt drivers need bounce buffers, so this normally saves 32K-1K
of kernel memory.
Keep track of which DMA channels are busy. isa_dmadone() must now be
called when DMA has finished or been aborted.
Panic for unallocated and too-small (required) bounce buffers.
fd.c:
There will be new warnings about isa_dmadone() not being called after
DMA has been aborted.
sound/dmabuf.c:
isa_dmadone() needs more parameters than are available, so temporarily
use a new interface isa_dmadone_nobounce() to avoid having to worry
about panics for fake parameters. Untested.
Save 112K for SB, 64K for PAS and 64K for MSS.
Since PAS use SB emulation, 176K normally saved for it.
Few minor optimizations added like in Linux driver.
When you start tracker and produce some heavy disk activity,
output interrupts becomes lost and I don't know how to solve it
finally. Newly added code at least allows recovery after timeout.
2) Use CURSIG(curproc) in PROCESS_ABORTING instead of junk code was there.
3) Reanimate timeout code in DO_SLEEP by setting WK_TIMEOUT flag
which is never set in old code.
4) DO_SLEEP: set aborting flag on interrupting singnals as supposed, not
on signals which do nothing as in old code.
5) Cleanup WAKE_UP macro, WK_WAKEUP not used.
6) Remove wrong typecasts in sleep/wakeup code.
This random address can be matched (with some probability) with another
sleep addresses from other drivers, which can cause strange sleep/wakeup
sequence. Rewrite this ugly code to do the right thing.
it out fixes my problem but hoses the GUS MAX probe messages. Check what
device we have and print things appropriately for each.
Pointed out by: Jim Lowe <james@miller.cs.uwm.edu>
whether of not to automatically #define EXCLUDE_AUDIO; MSS is a real
audio device and we should not #define EXCLUDE_AUDIO if we have one.
(And I want it because it's the only mixer-capable audio driver that I
can use with my crummy Packard Bell (nee Aztech) audio board.)
This fixes the very confusing condition where having all of this:
mss0 at 0x530 irq 10 drq 1 on isa
gus0: <MS Sound System (CS4231)>
opl0 at 0x388 on isa
opl0: <Yamaha OPL-3 FM>
mpu0 at 0x300 irq 9 drq 0 on isa
mpu0: <MPU-401 MIDI Interface 0.0 >
will still give you this:
% cat /dev/sndstat
SoundCard Error: The soundcard system has not been configured
Also remove an unnecessary newline in the printf() message for the
'gus0' device shown above so that we don't wind up printing a blank
line between mss0 and gus0.
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)
If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)
pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
That's EVERY SINGLE driver that has an entry in conf.c..
my next trick will be to define cdevsw[] and bdevsw[]
as empty arrays and remove all those DAMNED defines as well..
Each of these drivers has a SYSINIT linker set entry
that comes in very early.. and asks teh driver to add it's own
entry to the two devsw[] tables.
some slight reworking of the commits from yesterday (added the SYSINIT
stuff and some usually wrong but token DEVFS entries to all these
devices.
BTW does anyone know where the 'ata' entries in conf.c actually reside?
seems we don't actually have a 'ataopen() etc...
If you want to add a new device in conf.c
please make sure I know
so I can keep it up to date too..
as before, this is all dependent on #if defined(JREMOD)
(and #ifdef DEVFS in parts)