Commit Graph

1901 Commits

Author SHA1 Message Date
perry 18db93c7f6 de-__P 2005-02-04 02:10:35 +00:00
drochner 12ff682534 Whitespace police. The rest remains crap. 2005-02-01 20:33:58 +00:00
gson 8de9537c69 Update printf format in debug printf to account for sample_rate now
being an unsigned int.
2005-02-01 12:07:58 +00:00
kent c9ec679311 ansify and KNF 2005-01-14 03:41:45 +00:00
kent b85368e36f ansify and KNF 2005-01-13 15:01:27 +00:00
kent d69abf4ca0 - make this compile
- style fixes
2005-01-12 17:43:19 +00:00
kent 23b5d91433 merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
  - remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels.  Conversion information
is conveyed by stream_filter_list_t.
  - change the type of sample_rate: u_long -> u_int
  - add `validbits,' which represents the valid data size in
precision bits.  It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
 - add two parameters to set_params()
	stream_filter_list_t *pfil, stream_filter_list *rfil
   A HW driver should set filter recipes for requested formats
 - constify audio_params parameters of trigger_output() and
trigger_input().  They represent audio formats for the hardware.
 - make open() and close() optional
 - add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
 to round_blocksize()

* sw_code is replaced with stream_filter_t.
  stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
  converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
 - audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
 - audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
 - audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
 - ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes
2005-01-10 22:01:36 +00:00
tsutsui a9b3f31984 Some cosmetics:
- remove __P()
- use ansi decls
- u_int8_t, u_char -> uint8_t
- use macro for debug printfs
- some KNF
2005-01-09 16:59:41 +00:00
joff 8d1a86c97d add tscs 2005-01-08 02:56:35 +00:00
joff 4b903bb725 Support for TS-ETH10 PC/104 enet isa card based on CS8900 2005-01-08 02:55:52 +00:00
abs 964859d895 Fix comments regarding configration bounaries 2004-12-12 21:03:06 +00:00
thorpej d41e8f00bf Don't use "struct scsi_generic" in a hardware-defined structure. Instead,
use an array of 12 bytes.  Check the incoming CDB to see that it will fit,
and print and error and fail the command if it won't.
2004-12-07 14:50:56 +00:00
xtraeme 347378fc9f Add ACPI mpu(4) attachment, based on lpt_acpi.c by jmcneill@,
reviewed by christos@, cube@ and martin@.

While here, remove a printf() in mpu_attach() (ic/mpu.c) to remove
an empty line in some frontends (mpu_isa.c, etc).
2004-12-02 09:50:41 +00:00
thorpej 711247fa68 When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 23:33:29 +00:00
yamt 18f717bb90 constify audio_hw_if, midi_hw_if, and radio_hw_if. 2004-10-29 12:57:15 +00:00
yamt 05f25dcc2a move buffer queue related stuffs from buf.h to their own header, bufq.h. 2004-10-28 07:07:35 +00:00
yamt 22399b45d0 change some members of struct buf from long to int.
ride on 2.0H.
2004-09-18 16:40:11 +00:00
drochner 1308c6d767 Separate the namespace for default (ie unspecified) locators used
by the isa.c bus driver and the "address/whatever not specified"
argument passed to leaf device drivers.
The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter
"ISA_UNKNOWN_XXX", defined in isavar.h.
This way we save a dependency of every ISA device driver on "locators.h".
2004-09-14 20:20:46 +00:00
drochner edb77e2a6d include "locators.h" explicitely where it is needed, so that
it can be removed in the isavar.h header eventually
2004-09-14 17:38:30 +00:00
drochner 863cb326e8 replace 7 identical instances if cfprint functions by a single one 2004-09-14 17:19:34 +00:00
drochner 46289e1fef Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
2004-08-30 15:05:15 +00:00
drochner 5fa053333d add centralized {eisa,isa,pci,agp,mca}busprint() functions which do
what tens of the bus' parents foo{...}bridge_print()s scattered around do
2004-08-30 10:30:38 +00:00
thorpej 9cc521a148 Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
2004-08-20 06:39:37 +00:00
thorpej 2926431abf Use ANSI function decls and "static". 2004-08-19 23:30:09 +00:00
drochner a758a2aba6 allow to detach child devices and (optional selectively) bus rescans,
using the new autoconf functions
2004-08-18 11:54:47 +00:00
mycroft 48de8a7bff wdc_init_shadow_regs() must now be called after ch_wdc is filled in, or we get
a null pointer dereference.
2004-08-16 14:47:31 +00:00
thorpej 4b51cecfc2 - Split the register handles out of struct wdc_channel into a separate
wdc_regs structure, and array of which (indexed per channel) is pointed
  to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
  ata_channel.  Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
  maximum number of drives that can be present on the channel.  For now,
  this is always 2.  Add an ATA_MAXDRIVES constant that places an upper
  limit on this value, also currently 2.
2004-08-14 15:08:04 +00:00
mycroft a1d101ba64 Add a settype function.
Nuke address windows earlier in power up sequence.
2004-08-11 06:56:57 +00:00
mycroft a23e15bcbe Rather than having a call up from the low-level driver to get the card type,
instead have a call down from the PCMCIA mid-layer to set it.  Use this from
pcmcia_function_enable().  (Currently the policy is the same, but this would
allow for more flexibility in deciding which mode to use.)

Now it is safe to hold the socket enabled during attach, so do that.  Only
one enable/disable cycle to attach a card now!
2004-08-11 00:18:18 +00:00
mycroft 665e1f0611 Attempt to support the 688 as well. It looks vaguely right from inspecting
esl.
2004-08-07 19:32:56 +00:00
mycroft 2863ff72cc Add code to recognize the 1688, per PR 11910. Also reduce some control logic. 2004-08-06 15:11:48 +00:00
drochner f024db680d simplify some pointer arithmetics which uses typecasts on the LHS
so that gcc-3.4 doesn't complain
2004-08-05 16:43:59 +00:00
drochner 955c2f909d This is definitely what the world has been waiting for:-)
Allow to enable the game port on an ES1888, in case the firmware didn't
this. (Otherwise we still rely on the firmware having mapped the sound
related registers.)
Limit this to the "isa" attachment for now because this is the only
one I'm able to test.
Attach the "joy" device directly at "ess" to make sure the port is
enabled before the "joy" probe/attach.
This makes the joystick port usable on a "PWS" alpha (Miata).
2004-08-04 18:53:55 +00:00
mycroft 3ad7358df5 Forgot to commit this. 2004-07-09 03:39:14 +00:00
mycroft 4fe77ba8c0 Free the DMA channels as the last step. 2004-07-09 03:15:01 +00:00
mycroft 2728fe0f3f Clean up. Attempt to make these safer against stray interrupts. 2004-07-09 02:42:45 +00:00
mycroft fefce7ce70 Clean up a little. 2004-07-09 02:27:20 +00:00
mycroft 91eed7f9b9 Remove junk code. 2004-07-09 02:15:37 +00:00
mycroft 393cfb61f9 Don't halt in the close routine.
Don't reset in the open routine -- this causes our mute settings to get
toasted.
2004-07-09 02:14:40 +00:00
mycroft a9eb0d78df There's no need to halt in the close routine -- just clean up the ISA resources. 2004-07-09 02:11:17 +00:00
mycroft aa1018e714 Allow a board with no memory window configured to be attach. Fixes PR 20436. 2004-07-08 21:01:49 +00:00
mycroft 77c587044f Only attempt to map the memory window during attach, not match. If msize==0,
print a message and punt.  Fixes PR 6167 (from me!).
2004-07-03 21:29:08 +00:00
drochner 43a7f7432b fic some questionable pointer arithmetics; gcc-3.4.x
didn't like it
2004-06-24 16:56:00 +00:00
thorpej 6c0c39322a Wrap a noisy probe message in FD_DEBUG. 2004-06-04 01:12:04 +00:00
thorpej 2ecdd552dc Add the notion of "shadow registers" to the wdc driver. These shadow
registers are registers that overlap with others on many controllers, but
which may actually be distinct on some controllers.  Right now, the two
shadows are:

- wd_status (usually overlaps wd_command)
- wd_features (usually overlaps wd_error)

Add a new helper function, wdc_init_shadow_regs(), used to initialize
the shadow register handles on controllers where they do actually overlap.

Partially from Jordan Rhody @ Wasabi Systems, Inc.
2004-05-25 20:42:40 +00:00
wiz 8989ce5fa0 Fix typo in comment; from Sergey Svishchev. 2004-05-11 22:45:09 +00:00
itojun aca4c091d3 sprintf -> snprintf 2004-04-22 00:17:10 +00:00
drochner ef369e0ed6 remove license clauses 3 and 4 from my cpoyright notices 2004-03-24 17:26:53 +00:00
bjh21 dff5222d3a Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it.  This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111.  The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers.  To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned.  Thy just use rather more function pointers than before.  Tested
on i386 and (with a new host driver) acorn32.  Compiled on several other
affected architectures.
2004-03-13 17:31:33 +00:00
wiz 85746c6759 Spell interrupt with two rs. From Peter Postma. 2004-02-24 15:16:04 +00:00