Commit Graph

127 Commits

Author SHA1 Message Date
xtraeme e9025ab64a device_t/softc split and other related cosmetic changes. 2008-05-04 15:58:51 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cegger 9d57c80079 use aprint_*_dev and device_xname 2008-04-10 19:13:36 +00:00
dyoung f580a3a869 Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:13:39 +00:00
kent 86e51d72d1 fix a bug of S/PDIF audio format selection
PR/36493 by Arcady Antipin
2008-01-06 12:56:20 +00:00
jmcneill 61d17f24ea Make this compile again. 2007-12-13 16:53:28 +00:00
jmcneill 2399e8e84e Restore the native mode PCI conf register on select chipsets on resume,
in case it was lost when power was removed.
2007-12-13 15:11:31 +00:00
jmcneill 4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
ad a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
xtraeme bed35595ed Attach to the ICH6 AC-97 Modem function. 2007-09-02 00:48:52 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
thorpej 712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +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 1d83a2dea6 No need to call pci_set_powerstate from our powerhook, the bus handles this
for us now.
2006-09-25 23:11:07 +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
bsh 065a50f8cf Device 10de:026c is not AC-97 controller but nForce430 HD Audio controller.
Pointed out by Brad.  Thanks.
2006-08-03 03:01:39 +00:00
bsh b6116cb922 Support nForce430's audio.
(I have tested this only with nFroce410, not with nFroce430)
2006-08-01 18:31:53 +00:00
kent 6e5c3f3d89 add support for S/PDIF. 2006-07-28 07:41:39 +00:00
christos 63bbcb495a re-factor the pci powestate api. reviewed by gimpy 2006-06-17 23:34:26 +00:00
jmcneill ecfb43361d Disable my aggressive power saving changes; they're causing too many
problems.
2006-04-27 12:21:39 +00:00
jmcneill ab7dc1d38d Use AC97_HOST_INVERTED_EAMP on the Sony VAIO VGN-B1XP. From PR#33272 by
Dieter Roelants.
2006-04-16 23:07:16 +00:00
christos e331189f4e Deal with machines that have inverted eamp power. Data from the FreeBSD
driver. Finally sound works on my vaio vgn-t250p.
2006-04-16 07:40:00 +00:00
rpaulo 650c02ea97 s/#ifdef DEBUG/#ifdef AUICH_DEBUG/ 2006-04-14 13:02:57 +00:00
jmcneill e20bf2a14d Don't try to suspend while already suspended. 2006-03-07 23:16:20 +00:00
jmcneill d5491c459e Put the device in D3 state when it's not in use to save power. 2006-03-07 15:18:59 +00:00
xtraeme 40fe6ad1b5 Add support for Intel 6300ESB. 2005-12-04 12:27:49 +00:00
xtraeme 7ee2d6b20e Add support for ICH7. Tested by gendalia@. 2005-12-02 19:47:52 +00:00
rpaulo 061ff0e0af Use #ifdef AUICH_DEBUG instead of #if 0/#if 1. Suggested by perry@. 2005-08-22 01:15:12 +00:00
rpaulo f8799a3e8f PR#31030: debug printf in auich_halt_pipe. From lmneto@gmail.com.
It was under #if 1, so I just replaced the if by 0.
2005-08-21 23:57:32 +00:00
thorpej d36c43c511 Use ANSI function decls and static. 2005-06-28 00:28:41 +00:00
atatat df13e3579e Change the rest of the sysctl subsystem to use const consistently.
The __UNCONST macro is now used only where necessary and the RW macros
are gone.  Most of the changes here are consumers of the
sysctl_createv(9) interface that now takes a pair of const pointers
which used not to be.
2005-06-20 02:49:18 +00:00
jmcneill eddca7ac5f Some broken codecs don't release the CAS on reads to AC97_REG_GPIO_STATUS.
In auich_read_codec, do a dummy read to the RESET register if we're
reading GPIO_STATUS to be safe.
2005-04-12 17:30:51 +00:00
jmcneill cc976626a7 i82801CA is an ICH3, not ICH2. Fix typo in auich_modem_devices. Pointed out
by Nicolas Joly.
2005-04-11 11:20:45 +00:00
jmcneill 702c19a270 Add identifiers for Intel ICH3 AC'97 modems and CXT33 modem codecs, from
Nicolas Joly <njoly _at_ pasteur _dot_ fr>.
2005-04-08 12:50:00 +00:00
jmcneill c7acb3a606 More modem fixes:
* Ignore ICH_PCM246_MASK for modem devices
 * Set LINE1 rate and level in set_params
 * Enable mmap for modem devices. This was previously disallowed due to
   the ext_id field not advertising that the device supported variable
   rates. Since modems don't use ext_id (they use ext_mid instead), enable
   mmap. Multiple rates are supported on AC'97 modems.
2005-04-07 23:21:10 +00:00
jmcneill 7309363062 Work-in-progress of AC'97 modem support. Currently disabled by default
(can be enabled by options AUICH_ATTACH_MODEM), and untested. Shouldn't
have any impact on auich audio capabilities.
2005-04-04 19:41:50 +00:00
mycroft 487f02d9cd Three changes:
1) After setting an input or output channel to pause, watch for DCH (DMA
   halted) to be set before resetting the registers.  The manual says this is
   required.  This *may* fix random auich lockups.
2) Add auich_{trigger,intr,halt}_pipe(), which can operate on any of the
   input and output channels.  This reduces code duplication quite a bit.
   While I'm at it, fill in the mic interrupt handling.
3) The mic in interrupt is MINT, not MIINT.  (The latter is modem input.)
2005-03-11 22:29:16 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
jdolecek f9b584bd58 match nForce2 Ultra 400 audio 2005-01-27 21:49:29 +00:00
kent 0e68407cf6 support nForce 4 2005-01-27 13:35:05 +00:00
jmcneill f9fc6336b1 Add pci_conf_{capture,restore} to auich(4) powerhook 2005-01-26 21:53:42 +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
cube 909aa49296 Some SiS 7012 chips come muted by default, so un-mute all SiS 7012 chips at
attach time the way Linux does it.  Reported and tested by Jonathan
Schleifer, I checked it didn't break my own 7012 device which doesn't need
that manipulation.
2004-12-11 17:48:56 +00:00
kent ca2819710c implement auich_activate() and auich_detach() 2004-11-17 15:19:30 +00:00
kent d1afddf792 make functions static as possible 2004-11-17 15:14:38 +00:00
kent c1653144ff adopt auconv_set_converter() 2004-11-13 15:00:48 +00:00
kent ad6e9b1b34 device matching by pcireg_t, not a pair of vendor ID and product ID.
This change reduces 170 Byte of i386 kernel size.
2004-11-11 03:06:21 +00:00
cube 6f5a5c1814 Add support for the ICH6 AC97 controller. 2004-11-10 17:22:25 +00:00