Commit Graph

27 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
c1653144ff adopt auconv_set_converter() 2004-11-13 15:00:48 +00:00
kent
57c1715e7b remove mixer setting code in yds_attach() because ac97_attach() does it. 2004-11-09 11:12:54 +00:00
kent
55c5f0f624 ANSIfy and style fixes 2004-11-08 12:10:22 +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
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
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
wiz
37ac1db454 available, not avaliable. From miod@openbsd. 2003-09-29 09:50:21 +00:00
minoura
552efeab39 Disable ISA DMA emulation for SoundBlaster module explicitly.
This fixes the floppy access problem on some hardware.
Problem reported by Miroslav Kure via Jason Wright <jason [at]
thought [dot] net> of OpenBSD. Thanks.

Fix from ALSA driver; although this setting is undocumented but
according to Jaroslav Kysela <perex [at] suse [dot] cz> of ALSA,
there's no error reported so far.
2003-03-12 13:36:22 +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
b75a007d9f Add trailing ; to CFATTACH_DECL. 2002-10-02 16:51:16 +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
f4076c7aff Make the yds driver work on big-endian systems. 2002-06-10 16:58:57 +00:00
someya
02501f9aa4 remove a unnecessary message print 2002-01-10 10:17:55 +00:00
someya
a0d9eb8746 add powerhook support to resume correctly, fix PR#13079. 2001-12-30 19:33:15 +00:00
someya
09638d7a55 add 600 times dummy read from codec for YMF744 (revision < 2). 2001-12-25 16:55:50 +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
thorpej
51e70f6731 bzero -> memset 2001-07-07 16:46:34 +00:00
minoura
92d92b1cb2 Correct an easy mistake in initializing gain registers.
This will fix the L-R imbalance.
Suggested by Ryo HAYASAKA <ryoh@jaist.ac.jp>.
2001-05-21 23:55:04 +00:00
lukem
d3e16de232 delint: need ; between goto label and } 2001-05-15 14:30:24 +00:00
minoura
817c994ead Make this compile on alpha with DIAGNOSTIC.
Thanks to atatat.
2001-04-05 12:36:51 +00:00
minoura
28f83415ad Update TODO list. 2001-03-30 15:53:25 +00:00
minoura
537038859e Yamaha YMF724/740/744/754 (DS-1) PCI audio driver. 2001-03-30 14:32:08 +00:00