Commit Graph

799 Commits

Author SHA1 Message Date
chs
8f2820b4a6 use a flag in the softc to indicate if an instance has been configured,
rather than a bit in 32-bit global variable indexed by unit number.
2005-01-19 02:08:40 +00:00
kent
93293b9ec7 ansify and KNF 2005-01-15 15:19:51 +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
is
63672cded0 Hardware pointers must be volatile.
Patch by Pawel Chwalowski via PR 28810, from a similar patch by Michael
Hitch to ite_cl.c.
2004-12-30 10:07:51 +00:00
chs
0ded74691b for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
2004-12-13 02:14:13 +00:00
thorpej
dffe7d8e8d READ_CAPACITY -> READ_CAPACITY_10 2004-12-07 23:14:03 +00:00
thorpej
ce91ac7d6b USe more appropriate macro/struct names for READ/WRITE (6) and
READ/WRITE (10).
2004-12-07 23:07:31 +00:00
thorpej
d5083f78be Use "struct scsipi_command" in internal command structures so that
we have enough space for 16-byte CDBs.
2004-12-07 22:23:45 +00:00
is
96a8f93be8 Somebody forgot this change when changing the structure name.
Pointed out by Nick Hudson.
2004-11-21 20:43:22 +00:00
kent
68ec3173b5 remove mixer setting code in repulse_attach() because ac97_attach() does it 2004-11-09 16:18:58 +00:00
thorpej
e9818f5b5e When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 18:08:34 +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
mhitch
5760e71352 The gcc3 compiler optimized away writing character data to the Cirrus chip,
which results in a blank display - making it rather difficult to do an
install or upgrade when using a Cirrus-based display.  Change the pointer
used to write the character and attribute to volatile.  The console screen
now shows data and is usable.
2004-10-14 04:14:26 +00:00
kent
54cf6460d6 ac97_host_if::reset() returns non-zero value if codec reset fails, and
ac97 is not attached in that case.

PR: kern/26973
2004-09-22 12:20:24 +00:00
drochner
103deb3575 use config_found() instead of config_found_sm() if no submatch
function is used
2004-09-13 15:14:12 +00:00
is
0297f3ae8c While in graphics mode, short-circuit text-mode functions that would destroy
graphics state. Same fix as ite_cl.c 1.4.
Problem reported, and original fix provided, by Pawel Chwalowski in PR 26788
(but had to be recreated because the original patch didn't apply due to
a whitespace problem).
2004-09-06 18:12:54 +00:00
jandberg
b58fddce90 Call wdc_init_shadow_regs() after data structures are filled in.
Idea monkeyed from a commit by <mycroft>; reviewed by <aymeric>.
2004-08-23 19:26:25 +00:00
jandberg
a380c0363c pcf_io_map() was returning invalid bus space handles.
Generate them with bus_space_map() like suggested by <aymeric>.
2004-08-22 13:15:11 +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
aymeric
66c464814b add a noop settype() method to the pcmcia_chip_functions to cope with the
recent changes in the PCMCIA code.
This is only compile-tested, but should work because we only support IO cards
on the A1200 for now.
2004-08-16 10:07:52 +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
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
matt
22120ad628 Constify the speedtab arrays 2004-04-25 06:23:40 +00:00
mhitch
21f2c02f74 Remove license clauses 3 and 4 in my licenses. 2004-03-28 18:59:39 +00:00
is
313b807f3f Only change my own license conditions. 2004-03-25 11:12:08 +00:00
is
6de8cab7db UCB no longer requires the advertising clause. 2004-03-25 10:53:46 +00:00
wiz
73e1501b98 parameter with two es. From Peter Postma. 2004-02-24 15:22:01 +00:00
wiz
85746c6759 Spell interrupt with two rs. From Peter Postma. 2004-02-24 15:16:04 +00:00
wiz
dc4cc98b15 becuase -> because. From Peter Postma. 2004-02-24 15:05:53 +00:00
jandberg
c7998e2542 Add wsfont pseudo-device.
With this the custom font loading code isn't needed and is removed.
2004-02-23 21:14:08 +00:00
wiz
d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
is
87374696f2 remove forgotten debug printf from development. 2004-01-10 21:38:32 +00:00
he
38d0807d97 Make these compile again after the latest adjustments. 2004-01-06 18:46:07 +00:00
jandberg
e478eb702e Keymap updates.
- us/de keymaps based on ite keymaps, converted by Gunther Nikl
  (with slight adjustments by me)
- es/fr/sv keymaps similarly based on ite keymaps
- removed the commented out keymaps
- some small fixes to the rest of the existing keymaps
2004-01-04 19:20:43 +00:00
wiz
a5bf3b3c4c Spell controller with two ls. Inspired by miod@openbsd. 2004-01-04 16:19:43 +00:00
thorpej
a963286f8d More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc
2004-01-03 22:56:52 +00:00
thorpej
5bd80d8373 Rename "struct channel_softc" to "struct wdc_channel". 2004-01-03 01:50:52 +00:00
thorpej
527c829fa0 Rename:
- wdc_xfer to ata_xfer
- channel_queue to ata_queue
and move them to <dev/ata/atavar.h> so they can be used by non-wdc ATA
controllers.  Clean up the member names of these structures while at it.
2004-01-01 17:18:53 +00:00
thorpej
b5b951b13e Simplify allocation of the channel queue. 2003-12-31 02:41:22 +00:00
is
cbe2f83110 man/prod id submitted by Pavel Chwalowski in PR 23789. 2003-12-19 22:33:30 +00:00
is
3419480b86 2nd half of new wdc register mapping 2003-12-07 20:59:00 +00:00
is
f15cf5f5b3 adapt to the new world of wdc register mappings 2003-12-07 20:05:03 +00:00
jandberg
79eacc067d amidisplaycc.c:
Add screen types suitable for PAL displays, and fix typos
	in older screen type names; reported by Gunther Nikl.
amidisplay.4:
	Document the new screen types and add some misc information.
2003-11-12 17:42:40 +00:00
jandberg
3f581624a0 Fix bug/typo and rewrite some funnily structured code.
Pointed out by compiler warnings.
2003-11-12 17:26:36 +00:00
wiz
ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
jdolecek
917bc10805 g/c local index() routine and switch to (libkern's) strchr() 2003-11-01 12:56:32 +00:00
bouyer
2564505612 In sci_scsipi_request, add a splbio() which was erroneously missed when
thorpej_scsipi was integrated. Pointed out by Havard Eidnes.
2003-10-31 14:38:44 +00:00
jandberg
5210c06ca0 Add polish wscons keymaps for amiga.
From Pawel Chwalowski in port-amiga/22961.
2003-10-25 10:02:05 +00:00
bouyer
8efe26b8cd Adapt for wdcattach() prototype change. 2003-10-08 11:04:32 +00:00