Commit Graph

46 Commits

Author SHA1 Message Date
joerg
29315a1540 Fix ACPI suspend/resume support of clcs and clct. Based on auich and
hints from jmcneill@.
2007-06-15 13:26:57 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
jmcneill
f135e0d607 Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
2006-09-24 03:53:07 +00:00
christos
cb09e23ee7 fix incomplete initializer 2006-08-29 23:45:23 +00:00
christos
35ca6c8b5b Fix all the -D*DEBUG* code that it was rotting away and did not even compile.
Mostly from Arnaud Lacombe, many thanks!
2006-08-17 17:11:27 +00:00
jmcneill
4b802ec0e1 PR/12843: Workaround for CS4280 on IBM ThinkPads. From Stephane Witzmann.
Note: This workaround conflicts with piixpm(4); you will need to disable
the piixpm driver if you need this fix.
2006-08-06 16:21:11 +00:00
christos
63bbcb495a re-factor the pci powestate api. reviewed by gimpy 2006-06-17 23:34:26 +00:00
jmcneill
758e32ed76 Add support for the Turtle Beach Santa Cruz. Special thanks to Stephane
Witzmann for spending so much time debugging this.

Fixes: kern/18880, kern/24488, port-i386/14260, kern/12603, kern/12723,
       kern/24957, kern/23584

Tested on i386 (Stephane Witzmann), alpha (me).
2006-04-15 21:20:47 +00:00
dsl
6f0f9f8763 Make almost everything #include <sys/bswap.h> instead of <machine/bswap.h>
The bswap.h and endian.h files are all rather incestuous, but I want to
get the constant folding stuff into one place - sys/bswap.h
2006-01-29 21:42:40 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
thorpej
d36c43c511 Use ANSI function decls and static. 2005-06-28 00:28:41 +00:00
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
7a23477c6c remove mixer setting code in *_attach() because ac97_attach() does it. 2004-11-09 16:28:14 +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
drochner
f024db680d simplify some pointer arithmetics which uses typecasts on the LHS
so that gcc-3.4 doesn't complain
2004-08-05 16:43:59 +00:00
mycroft
b09c8ea34a Attempt to make these safer against stray interrupts. 2004-07-09 02:49:37 +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
1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
thorpej
7ec10e2d99 Use aprint_*(). 2003-01-31 00:07:39 +00:00
tsutsui
238efe4697 Replace magic numbers for power management control with PCI_PMCSR* macros.
XXX Should we use pci_get_powerstate() and pci_set_powerstate() in pci.c?
2002-12-23 02:58:36 +00:00
thorpej
9b2c2ec24d Add trailing ; to CFATTACH_DECL. 2002-10-02 16:50:59 +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
augustss
22023c8988 Some casts in printf(). 2002-05-31 10:54:34 +00:00
lukem
2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +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
tacha
109656b0a7 rewrite suspend/resume routine. If you suspend while playing audio,
clcs and clct continue playing when resume.
2001-04-18 01:35:06 +00:00
tacha
08cc996106 Check and set PCI power management register. clcs now works when
warm boot from Windows.
2001-02-13 04:11:11 +00:00
tacha
d95cfe7d68 Split out common code to cs428x.c and cosmetic change to introduce
higher symmetry between cs4280.c and cs4281.c.

Also fix the problem rebooting from Windows. Relevant patch is contributed
from Shingo WATANABE <nabe@nabechan.org>.
2001-02-07 14:41:10 +00:00
augustss
d13e6a84f2 Sleep a little when closing the midi device to allow the UART to drain. 2001-01-27 18:37:01 +00:00
jdolecek
34c8ae80da constify 2001-01-18 20:28:15 +00:00
perry
674a20f8fb powerhook fixes, from thorpej, tested by me. Thinkpad T20 sound now perfect. 2001-01-15 23:25:39 +00:00
perry
3bb7b7df87 Fixes from OpenBSD via chopps. Audio now works on my Thinkpad T20
provided I don't suspend the thing...
2001-01-15 22:28:20 +00:00
sommerfeld
851de295eb Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
2000-12-28 22:59:06 +00:00
takemura
3c9d9276dc Add new powerhook argument values, PWR_SOFTSUSPEND, PWR_SOFTSTANDBY and
PWR_SOFTRESUME. Apm calls powerhook with the values in normal interrupt
priority level while others are protected with splhigh().
2000-11-26 11:08:57 +00:00
augustss
236deb1acc Apply a patch from the driver author (originally from OpenBSD). 2000-09-20 14:33:48 +00:00
augustss
00cafd0569 Add MIDI support. From Tatoku Ogaito. 2000-07-19 09:58:45 +00:00
simonb
889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
thorpej
a4b298224a Use <dev/ic/ac97reg.h> 2000-05-15 01:35:29 +00:00
thorpej
1838aef29c ac97.h -> ac97var.h 2000-05-15 01:27:44 +00:00
augustss
a30f6c8ad9 Apply patches from Tatoku Ogaito (the author of the code). 2000-01-14 14:39:13 +00:00
augustss
3c1b8138f7 Add a device driver for the Cirrus Logic CS4280 sound chip.
The code has been contributed by Tatoku Ogaito.
1999-12-13 20:19:23 +00:00