Commit Graph

43 Commits

Author SHA1 Message Date
jmcneill 8a962f23f2 Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

  Add MP locking to the audio drivers.

  Making the audio drivers MP safe is necessary before efforts
  can be made to make the VM system MP safe.

  The are two locks per device instance, an ISR lock and
  a character device lock. The ISR lock replaces calls to
  splaudio()/splx(), and will be held across calls to device
  methods which were called at splaudio() before (e.g.
  trigger_output). The character device lock is held across
  calls to nearly all of the methods, excluding some only
  used for initialization, e.g. get_locks.

Welcome to 5.99.57.
2011-11-23 23:07:28 +00:00
christos 4418f77599 split audiocs 2011-06-02 00:23:28 +00:00
mrg 86de1d619b add struct ebus_mainbus_ranges. from openbsd. 2011-03-16 02:34:10 +00:00
cegger 529e91fca1 struct device * -> device_t, no functional changes intended. 2009-05-12 14:16:35 +00:00
cegger 32c4940900 struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 12:10:29 +00:00
martin 81ebd85110 Make it attach on JavaStation KRUPS again 2009-01-31 10:35:38 +00:00
mrg aab4d008e5 use the prom addresses except on MSIIEP.
this probably works on SB2000 now.
2009-01-06 04:04:55 +00:00
cegger 77c3411230 make this compile 2008-12-17 19:35:09 +00:00
christos 9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
mrg 2c4ff71b65 also attach if the "compatible" property matches, as seen on sb2000. 2008-12-11 07:09:00 +00:00
mrg c2b95373bf remove clause #3 from my license where there are no other
copyright holders involved.
2008-05-29 14:51:25 +00:00
ad c47594f131 Replicate sbus fixes for PR kern/37540. 2008-04-29 18:08:03 +00:00
cegger 1b044f414a use aprint_*_dev and device_xname 2008-04-08 07:35:35 +00:00
ad 4b293a84e1 Interrupt handling changes, in discussion since February:
- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
2007-12-03 15:33:00 +00:00
ad a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
martin c335701fe5 Add missing initializer 2006-10-15 19:43:45 +00:00
elad 2867b68bc3 integrate kauth. 2006-05-14 21:42:26 +00:00
thorpej 92c7bba3df Use device_private(). 2006-03-29 06:28:38 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
kent 5610969544 ansify and KNF 2005-01-11 04:23:14 +00:00
kent dc63d1767d fix compilation errors 2005-01-11 03:45:17 +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
yamt 18f717bb90 constify audio_hw_if, midi_hw_if, and radio_hw_if. 2004-10-29 12:57:15 +00:00
uwe b3935a6934 Use EBDMA_BURST_SIZE_16. Introduce EBus specific round_blocksize to
make block size multiple of 16 words.  No point in using
round_buffersize that returns the argument unchanged, so just NULL it
in audio_hw_if.
2003-09-10 10:40:40 +00:00
lukem 365cbd9428 add missing __KERNEL_RCSID() 2003-07-14 15:47:00 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
pk 725a6aebf7 Remove the `flags' argument from bus_intr_establish(). 2002-12-10 13:44:47 +00:00
thorpej c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej 12b8e3917b Use CFATTACH_DECL(). 2002-09-30 20:54:25 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
uwe 3e855fb4c2 Prettify error message. 2002-04-04 17:41:09 +00:00
martin 524c49ba6a Fix some handle/tag confusion. This makes it compile on sparc64 again.
Since sparc ignores tag's (/brick sparc) this slipped through when testing
on sparc.
2002-03-22 11:52:07 +00:00
eeh 9c8153181f Do not even bother trying to use the mappings provided by the PROM. 2002-03-21 21:33:57 +00:00
uwe 284be9ba0c Remove struct ebus_dmac_reg to discourage indiscriminate usage of
BUS_SPACE_MAP_LINEAR on sparc64.  Requested by eeh.
2002-03-21 04:15:29 +00:00
uwe fe61b5717e Drop BUS_SPACE_MAP_LINEAR and properly bus_space_*-ify this so that it
uses accessors.  Requested by eeh.
2002-03-21 04:09:27 +00:00
uwe 4b6b8f2e41 Fix whitespace nits (oops). 2002-03-12 06:00:42 +00:00
uwe a05702eaac Rework the driver to add EBus DMA support and improve APC DMA support.
Audio-related stuff is left almost intact.

* support audiocs at ebus playback and capture
    tested on krups and u5 (thanks, martin)
* make first attempt at supporting audiocs at sbus capture
* nb: full-duplex is not tested
* while here, fix CSAUDIO_MONITOR_MUTE to be of CSAUDIO_MONITOR_CLASS
    i.e. outputs.monitor.mute -> monitor.monitor.mute

Ok by pk, eeh.
2002-03-12 04:48:28 +00:00
uwe 40a8bc1d34 Drop ebus_bus_map(), use plain bus_space_map() instead. 2002-03-12 00:32:30 +00:00
martin a03fa01ccc Remove EBUS_PADDR_FROM_REG, as it does not realy creates a paddr on sparc.
It is superceeded by EBUS_ADDR_FROM_REG.
2002-03-01 11:49:06 +00:00
uwe d2be07c591 Shared ebusvar.h for sparc and sparc64.
NB: ebus_attach_args member names are singular to be consistent with SBus.
sparc64 version uses plural, so update sparc64 drivers when converting them
to use this shared header
2002-02-18 04:44:41 +00:00
uwe ea8decf111 Add DMA definitions.
Add some sparc32 related comments.
2002-02-18 03:43:29 +00:00
mrg 18b82a6732 make this "MI"; nothing different between this and the SPARC version. 2001-09-07 15:50:49 +00:00