Commit Graph

27 Commits

Author SHA1 Message Date
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
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
yamt
18f717bb90 constify audio_hw_if, midi_hw_if, and radio_hw_if. 2004-10-29 12:57:15 +00:00
minoura
6915327794 An unexported header file was #included from an exported header file.
Introduce <machine/opmreg.h> and move some definitions useful to
userland progs.
2004-05-08 08:38:36 +00:00
isaki
bd7195dece Remove an advertising clause. 2003-09-07 04:24:05 +00:00
lukem
ab48a212f9 rcsid 2003-07-15 01:44:50 +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
isaki
fe7b4d99f1 Fix typo. s/cfdata/cfdriver/ 2002-11-24 13:33:45 +00:00
isaki
ed23ae11f5 Style fixes. 2002-10-13 10:00:08 +00:00
thorpej
4bf871a755 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:02:08 +00:00
thorpej
a84e1f7f8f Use CFATTACH_DECL(). 2002-10-01 04:43:01 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
isaki
c78a609db3 Support slinear8, slinear16_le, slinear16_be. 2002-04-07 14:52:27 +00:00
isaki
677cd20c7f initialize codec variables every open(). 2002-04-02 15:22:37 +00:00
isaki
d4e117205d set factor=1/2 even if recording. 2002-03-26 15:05:29 +00:00
isaki
81b3e9fb81 Fix mis-increment bug in converter msm6258_ulinear8_to_adpcm().
This fix needs factor_denom.
2002-03-16 09:00:42 +00:00
minoura
bbfb453233 Remove unused variables.
Correct printf format strings.
2001-11-25 16:00:05 +00:00
isaki
2108a5c977 Rewrite vs_query_encoding() using array. 2001-11-13 09:27:06 +00:00
isaki
c2e9ead40b Clean up debug messages. Separate it two debug levels. 2001-11-13 09:06:00 +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
minoura
2d8c98280c Cleanup. Addresses port-x68k/13051. 2001-05-28 06:18:20 +00:00
minoura
d0403f9f11 Add missing line in recording. Copy & paste error... 2001-05-27 05:30:02 +00:00
minoura
8809460317 Correct ring buffer handling in recording. From Isaki-san. 2001-05-22 00:15:54 +00:00
minoura
4bff72882b Missings from the previous commit.
From Izaki-san.
2001-05-15 09:10:05 +00:00
minoura
0bb85c4922 Encoding ulinear and mulaw are both software emulated.
From Isaki-san.
2001-05-07 09:42:30 +00:00
minoura
58b62ea0cf Correct playing mu-law and linear. 2001-05-03 02:09:11 +00:00
minoura
b2cec36854 X68k built-in voice synthesizer. 2001-05-02 13:00:19 +00:00