Commit Graph

50 Commits

Author SHA1 Message Date
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
kleink
6f487a81b0 Replace home-grown list management for DMA buffers with SLISTs, and refactor. 2007-01-11 22:56:49 +00:00
kleink
4d3ac0366b Redo rev. 1.42, fixing the original array subscript pasto the right way. 2006-12-18 23:13:39 +00:00
christos
f05c39985f explicitly set clk to 1 or 0. 2006-12-14 22:35:20 +00:00
kleink
94dd6117cd Un-break clock selection after -Wsign-compare cleanup in rev. 1.43;
from Stephen Ma in PR kern/35220.
2006-12-14 22:27:12 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos
d76c7ff74a - fix missing initializer
- fix < 0 comparison with unsigned
2006-08-30 01:14:24 +00:00
christos
8b787180c1 Coverity CID 1539: Remove bogus test that caused array overrun. 2006-04-14 19:03:32 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
kleink
9ce91047cd Clean up the array of audio_formats supported. 2005-01-26 21:28:55 +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
yamt
18f717bb90 constify audio_hw_if, midi_hw_if, and radio_hw_if. 2004-10-29 12:57:15 +00:00
mycroft
921c2474ad There's no need to halt the input and output pipes in the close routine --
audio_close() takes care of this.
2004-07-09 01:02:32 +00:00
kleink
8e491dbabd In addition to alpha, grossly work around the 24-bit limitation of the
Audio 1 DMA engine by allocating through the ISA DMA tag on amd64
and i386.
2004-07-08 21:33:45 +00:00
kleink
d42e56f0d5 General mixer initialization improvements around the MONO_IN/MONO_OUT/
PreAmp register, including a new MONO_IN mixer stage bypass mixer control;
inspired by (and fixing) PR kern/18342 from Stephen Ma.
2004-05-25 21:38:11 +00:00
kleink
e436929104 Fix a (non-dangerous) malloc size botch in eso_allocm();
from Stephen Ma in PR kern/18342.
2004-02-17 17:39:55 +00:00
kleink
d82820e03a Audio 2's DMA current address register implements only the least
significant 20 bits, so make sure its memory allocation won't cross
a 1M boundary.  From Stephen Ma in PR kern/18342.
2004-02-17 17:34:21 +00:00
kleink
62138f6396 unask -> unmask 2003-02-05 00:07:34 +00:00
thorpej
b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
thorpej
7ec10e2d99 Use aprint_*(). 2003-01-31 00:07:39 +00:00
thorpej
72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
thorpej
9b2c2ec24d Add trailing ; to CFATTACH_DECL. 2002-10-02 16:50:59 +00:00
thorpej
387fc6dc87 Use CFATTACH_DECL(). 2002-09-30 20:37:04 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
kleink
22e2d71a5f Add a joystick attachment to the ESS Solo-1 driver. 2002-04-25 00:52:21 +00:00
lukem
9048aaae21 add RCSID 2001-11-13 07:48:40 +00:00
augustss
1339e88a86 Add a new optional method, dev_ioctl, to the audio hardware driver interface.
It is called when an unrecognized ioctl() is performed on a device,
thus allowing ioctl()s that frob the hardware driver (like loading
microcode).
2001-10-03 00:04:47 +00:00
kleink
1bd93b6232 Hint BUS_DMA_READ and BUS_DMA_WRITE. 2001-07-19 17:19:40 +00:00
sommerfeld
851de295eb Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
2000-12-28 22:59:06 +00:00
simonb
889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
kleink
c8b75dd368 Scale the drain timeout for allowing auto-initialize DMA to complete. 2000-03-22 14:37:43 +00:00
cjs
762741c71d Fix the size of the playback buffer. Patch from Dave Sainty <dave@dtsp.co.nz>. 2000-01-18 04:48:47 +00:00
kleink
1e9bb239a3 Off-by-one error in limiting the DMAC buffer size for Audio 2 to 64K (actually
64K - 1); from Dave Sainty in PR kern/9064.
1999-12-28 19:26:26 +00:00
kleink
f6655d0f7e Fix a buffer KVA comparison botch in eso_mappage(); from Dave Sainty in
PR kern/9062.
1999-12-28 01:39:38 +00:00
kleink
c88b5146dc Add support code to have the Hardware Volume Control interact with the
software mixer Master Volume state in a defined way by lazily updating the
latter if input from the former was processed.
1999-12-10 19:13:00 +00:00
kleink
eab9ce05b7 A PCI Revision ID of 0x02 is what ESS happens to be calling ES1946 Revision E. 1999-12-03 22:34:28 +00:00
kleink
b536890c88 Add a mixer control for the Master Volume Mute knob. 1999-11-02 12:11:42 +00:00
augustss
860ebb7a92 Make little endian and big endian version of all functions
that deal with 16 bit samples.  Let the drivers decide which ones
to use.
1999-11-01 18:12:19 +00:00
leo
38cae5303b Remove htopci(). bus_space_write_4() takes care of necessary endian conversions. 1999-10-28 13:49:19 +00:00
cgd
c3703ecfdd don't print using string pointer one off the end of the eso_rev2model
array.  pointed out by Kouichi Hashikawa in PR#8601.
1999-10-10 18:52:03 +00:00
kleink
bb54953b63 Since the Audio 1 DMA controller implements the 24 low address bits only,
add the gross hack originally implemented by Charles Hannum in the SonicVibes
driver to force allocation of DMA memory for that channel through the Scatter-
Gather Map to get an address range that fits in.

The eso driver now works on Alphas except for DWLPX-based systems, whose owners
are not likely to desire audio or likely can afford slightly less cheap audio
hardware.  :-)
1999-09-28 13:57:45 +00:00
kleink
cef2689773 Oops, we do have to check ourselves whether a given value is valid within an
enumeration.
1999-09-23 11:46:12 +00:00
kleink
9c10799ac4 Use the approximated sampling rate to compute the filter rate. 1999-09-02 17:26:15 +00:00
kleink
48f055e09b Add missing MPU interrupt glue. 1999-08-14 22:42:16 +00:00
kleink
7b34e008a9 Forgot to initialize a pointer; from Simon Burge. 1999-08-14 15:05:02 +00:00
augustss
42fb510148 Move the mpu device declaration to conf/files.
Let the mpu device attach at the sb device, and then midi at the mpu.
Update the mpu at eso attachment.
1999-08-02 17:37:41 +00:00
augustss
cbf1f6f1b9 Move the MPU driver isa/ to ic/.
(I didn't move it in the repository because the revision history
is very short and uninteresting. :)
1999-08-01 18:05:39 +00:00
kleink
cf917747a1 Add a driver for the ESS Technology Solo-1 PCI AudioDrive line of chips. 1999-07-12 15:13:30 +00:00