Commit Graph

30 Commits

Author SHA1 Message Date
lukem a1f606d3fd Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
2006-03-08 23:46:22 +00:00
garbled 5c869c790e IBM makes a pcn card that shows up as:
Trident Microsystems 4DWAVE DX (ethernet network, revision 0x25)
Unfortunately, this is an autri sound card.  Special case the match routines
for both drivers so if_pcn properly picks it up, and autri doesn't.
2006-02-22 02:57:26 +00:00
perry 93124077ae Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:27:29 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
thorpej d36c43c511 Use ANSI function decls and static. 2005-06-28 00:28:41 +00:00
gson 971beb8edb Generate an interrupt only after processing all the samples in a block
rather than at the time of the last sample, to eliminate a click at the
end of each block when recording.  Fixes kern/18066.
2005-02-02 10:34:12 +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
kent 7a23477c6c remove mixer setting code in *_attach() because ac97_attach() does it. 2004-11-09 16:28:14 +00:00
yamt 18f717bb90 constify audio_hw_if, midi_hw_if, and radio_hw_if. 2004-10-29 12:57:15 +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
itojun 6123043789 pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
2004-04-23 21:13:05 +00:00
mycroft cb4f7a1d86 Bogus initializers suck. 2003-10-29 03:46:10 +00:00
christos 125ccd91b1 Fix uninitialized variable warnings 2003-10-25 18:29:12 +00:00
lukem 365cbd9428 add missing __KERNEL_RCSID() 2003-07-14 15:47:00 +00:00
perry 3668dc75e5 fix from OpenBSD, contributed by Gabriel Gonzalez in PR kern/20999 2003-04-04 01:04:37 +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
wiz 7e681f7063 interrupt with two rs. 2003-01-06 13:04:54 +00:00
someya c8d97c4f27 Fix recording problem on SiS7018. 2002-11-07 11:44:12 +00:00
someya 66711e8f5f Bit shifts for interrupt channel exceeded u_int32_t width. 2002-10-20 01:06:10 +00:00
someya 21249921f3 add autri_flags_codec() from OpenBSD, reported by grendel@zeitbombe.org 2002-10-12 08:42:21 +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
someya 153f04daa9 Fix playback problem on SiS7018.
- mute the volume for interrupt channel
 - add some improvements for device initialization

but recording does not work properly.

Reported and tested by Jan Wagner <waja@cyconet.org>. Thanks.
2002-05-30 17:04:13 +00:00
eeh 94a482c8a0 Fix a blatant inconsistency in PCI_PRODUCT handling. 2002-02-05 01:51:51 +00:00
augustss 99c9ca8ab5 ANSIfy driver. 2001-11-18 17:15:48 +00:00
augustss bf5b461387 Don't use a static variable in the power hook. It doesn't work with more
than one device.
2001-11-18 16:59:08 +00:00
someya 275c5352b7 add Trident 4DWAVE based (4DWAVE DX/NX,SiS 7018,ALi M5451) PCI audio driver 2001-11-18 03:16:02 +00:00