Commit Graph

24 Commits

Author SHA1 Message Date
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +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
fa8bbe4c5e add the follwings:
- ulinear16_to_mulaw_le()
 - ulinear16_to_mulaw_be()
 - slinear16_to_mulaw_be()
 - ulinear16_to_alaw_le()
 - ulinear16_to_alaw_be()
2004-11-05 16:31:14 +00:00
wiz
68caa698b2 Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.
2003-04-06 18:20:07 +00:00
tacha
767679dbe9 Add new two convert functions slinear16_to_alaw_[lb]e. 2002-03-09 05:39:00 +00:00
kent
29b73c4025 Add slinear16_to_mulaw_le(). 2002-02-10 06:27:06 +00:00
lukem
2bbe2de647 add RCSIDs 2001-11-13 05:32:49 +00:00
itohy
7903b5cda4 fix typo (two -> to) 2001-10-07 10:14:42 +00:00
augustss
9cf205c410 ANSIfy. 2001-10-02 23:31:54 +00:00
jdolecek
34c8ae80da constify 2001-01-18 20:28:15 +00:00
wiz
6b569d798f fix typo in comment 2000-08-18 05:55:31 +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
mycroft
592b1dd587 But seriously... 1998-08-09 21:41:45 +00:00
mycroft
a85ed63924 Oops; the previous was wrong on little-endian machines. 1998-08-09 21:35:03 +00:00
mycroft
8cbcfa0df2 Add mulaw_to_slinear16 and alaw_to_slinear16. 1998-08-09 19:22:15 +00:00
augustss
27f70da904 Add alaw/mulaw conversion to/from 8 bit signed linear. 1998-05-22 13:05:31 +00:00
augustss
c392128002 Audio:
* Make it possible to use software assisted encodings that expand the
  sample size.
* Use 16 bits per sample when emulating mulaw coding on the SB.
* Prepare for SB16 without CT1745 mixer.
1997-08-04 09:29:51 +00:00
augustss
658656bb99 Audio changes:
- Change the way attach and open works to allow multiple audio
	  devices.
	- Split the mulaw.c file into two to avoid dragging in mulaw
	  convertsion when they are not needed.  Add 16 bit alaw/mulaw tables.
	- Change the way audio properties are gotten.
	- Recognize more versions os SoundBlaster.
1997-07-31 22:33:08 +00:00
thorpej
3cb5726461 RCS ID police. 1997-06-14 22:25:11 +00:00
augustss
1bd32f9cad Add Alaw encoding emulation. 1997-05-28 00:07:46 +00:00
augustss
72b5ba3901 Redo the way selecting the mode for SB cards is done completely.
It is now table driven since there are so many different variations
of SB cards out there.
Also fix a bug that stopped SB2 and SBPro from working.
1997-05-23 21:19:59 +00:00
augustss
37be371415 Clean up emulation code, SB, and GUS drivers and add some more encoding
emulation to SB.
1997-05-13 19:02:11 +00:00
augustss
e63a553175 Change the interface between high and lowlevel audio drivers again:
Set the encoding parameters slightly differently.
Remove the SW encoding/decodinf functions from this interface
and move them to the audio_parameter struct; this is both more efficient
and flexible.
1997-05-09 22:16:27 +00:00
brezak
693043d786 GUS audio driver from John Kohl. 1995-07-19 19:58:09 +00:00