Commit Graph

12 Commits

Author SHA1 Message Date
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 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
keihan b8702f530b netbsd.org -> NetBSD.org
This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.
2003-12-04 13:57:30 +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
fredette 2068a40cc7 Removed esm_freemem(), which isn't used any more. 2002-12-31 13:10:59 +00:00
fredette 5620d08cca First cut at recording support for the ESS Maestro-2 and 2e.
16-bit mono recording seems to work OK.  16-bit stereo recording
is missing the left channel for reasons unknown, fixes welcome.
8-bit recording still unsupported.
2002-12-30 05:23:27 +00:00
thorpej f9df4d877e Avoid an "unmamed fields" warning (gcc 3.1). 2001-12-31 22:06:47 +00:00
ichiro 357d9efda4 Power Management Hook
esm_powerhook();
2001-02-12 23:56:40 +00:00
tv e58532a4bf No-op commit to force update to a non-"-kk" revision. 2001-01-18 17:47:58 +00:00
rh 3d5c5173f5 Add a quirk table for specific implementations.
Change the NEC-specific subvendor test for GPIO initialization into a more
generic quirk table flag.
Add a quirk flag for hardware that has left and right channels reversed
(currently the COMPAL 38W2 a.k.a. Dell Inspiron 5000e)
Clean up PCM channel initialization and add channel swapping option.
2001-01-09 23:27:07 +00:00
rh ca3b496216 Initial import of the Maestro 2/2e 'esm' PCI audio driver. This driver
is based on the FreeBSD 'maestro' driver by Taku YAMAMOTO
<taku@cent.saitama-u.ac.jp>
2001-01-08 19:54:31 +00:00