summaryrefslogtreecommitdiff
path: root/sys/dev/pci/auich.c
AgeCommit message (Collapse)Author
2010-03-30Do not print ac97 link rate message unless debug is enabled.David Coppa
Adapted from NetBSD OK jakemsr@
2010-01-14SiS devices seem unable to reset dma block index to zero, causingAlexandre Ratchov
dma to start at the wrong place. Workaround this limitation by starting at the current offset. From Christopher Zimmermann <madroach at zakweb.de> Thanks a lot! ok jakemsr
2009-11-05BUS_DMA_NOCACHE is defined on all archs that include this driverJacob Meuser
from Brad
2008-10-28SiS 7012 uses different multichannel control bits (data from linux).Jacob Meuser
makes 4 channel output work for Anathae Townsend. thanks for testing. ok ratchov@
2008-10-25audio(9) says low level drivers are allowed to change the requestedJacob Meuser
values of the audio_params structure during AUDIO_SETINFO if the hardware cannot be set to exactly the requested mode. some drivers do this sometimes. others always return EINVAL if there isn't an exact match. be more consistent. only return EINVAL if an absurd parameter was requested, otherwise return a supported set of parameters, as close as possible to what was requested. with/ok ratchov@
2008-10-23S/PDIF output support in ac97(4), auich(4) and auvia(4)Jacob Meuser
from NetBSD tested by a few with no regressions. optical works for jsg@. ok ratchov@
2008-10-23enable 4 and 6 channel support.Jacob Meuser
tested by a few. no regressions, but 4 and 6 channel playback is not working with all codecs yet. ok ratchov@
2008-09-15this driver uses three dma segments; play, record, calibrate.Jacob Meuser
instead of using a linked list to describe the dma segments use three distinct pointers. also, this driver only needs 1 buffer descriptor for each dma segment, since each buffer descriptor can handle as many samples as each segment can hold. makes the code a little easier to read and allows us to free the calibration buffer when we're done with it. idea originally from ratchov@ a while back. tested by ratchov@ and myself. ok ratchov@
2008-05-25use ac97 default parameters for auich(4), auixp(4) and auvia(4).Jacob Meuser
they may have codecs which only handle 48kHz sampling rates. ok ratchov@
2008-04-21allow low level audio drivers to specify a default sample format,Jacob Meuser
instead of 8-bit mono mulaw @ 8kHz. this is just the infrastructure; no drivers are specifying a default yet. ok ratchov@, deanna@
2008-03-248-bit has been emulated for some time now. quit lying.Jacob Meuser
2008-02-12if the ac97 codec is fixed-rate, ac97_set_rate() will return theJacob Meuser
fixed-rate, regardless of what sample rate we tried to set, without an error. so, instead of checking for an error after we've set the rate on all dacs, we need to check that ac97_set_rate() successfully set the rate we wanted, which may not be exactly the rate the user specified, due to auich's sample rate scaling. finally, we need to set the sample rate for the dacs in this order: lfe, surround, front. this is necessary because ac97_set_rate() will return without checking for fixed-rate if the dac is unsupported. so, if the lfe dac is set last on a stereo only fixed-rate codec, then we will not know whether we have a fixed-rate codec. all codecs have a front dac, and some codecs may have a surround dac but not lfe. discussed with brad@, who noticed that the previous commit was slightly bogus.
2008-02-08don't unconditionally return here, still need to set recording parametersJacob Meuser
when configuring for full-duplex. fixes problem noticed by todd@ ok todd@
2008-01-15bring in lots of ac97(4) and auvia(4) updates from NetBSDJacob Meuser
user visible changes: - when setting up ac97(4) mixer items, for some features like surround sound, check if the feature if supported by the codec and only add items for that feature if it is - auvia(4) now supports multichannel playback with at least some multichannel ac97(4) codecs fixes problems for me and ajacoutot with different auvia(4) devices/codecs. no regressions reported by testers. if you have an ac97(4) audio device and are using mixerctl.conf(5), you may want/need to update it. ok ratchov
2007-10-23- use endian-specific conversions, instead of relying onJacob Meuser
machine-dependent #defines - use the correct conversions for slinear_le:16 -> ulinear_be:16 - fix mono recording by using various stereo -> mono conversions
2007-10-20replace auich's DMA and interrupt handling with code from NetBSD'sJacob Meuser
auich. fixes recording from the microphone input as well as full-duplex operation. tested by brad@, sthen@, deanna@ and ckuethe@. thanks.
2007-09-17Some bzero() -> M_ZERO. ok jakemsr@Kenneth R Westerback
2007-08-02add proper recording encodings to auich(4).Jacob Meuser
tested by brad@
2006-12-29Avoid void * arithmetic, okay deraadt@, suggestions from millert@Pedro Martelletto
2006-08-19add the Intel 6300ESB and 6321ESB AC97 controllers.Brad Smith
2006-08-01attach to the NVIDIA MCP51 AC97 controller as well.Brad Smith
From bsh@NetBSD
2006-05-29NVIDIA nForce MCP04 (some kind of nForce4) AC97 should work hereJonathan Gray
as well going by the Linux driver. "fine by me" jason@
2006-04-20Fix various printf() issues: too many arguments, not enough arguments, argumentMiod Vallat
order reversed, wrong modifiers. ok deraadt@ marco@ mickey@
2006-02-13nVidia/nvidia -> NVIDIABrad Smith
2005-11-26Add some missing 'break;'s in auich and auixp that lint spotted. WhileKenneth R Westerback
here, use FALLTHRU or FALLTHROUGH to make lint even happier. ok marco@ miod@
2005-08-10Some additional ICH7 bits which aren't strictly necessary to workJonathan Gray
but are desireable. Tested by Mark Peoples, ok mickey@
2005-08-09do not set PCI_COMMAND_MASTER_ENABLE explicitly as it's already set in ↵Michael Shalayeff
pcisubmatch(); kettenis@ testing; brad@ ok
2005-08-04Support for ICH7 audio tested by Mark.Peoples at asu.eduJonathan Gray
2005-05-31bus_dma-ify. needs bus_dmamap_sync's, but works on coherent arch's now.Jason Wright
NOW: someone remove vtophys from the amd64 port before someone else gets the silly idea that it somehow "works" on that port.
2005-04-14make sure round_blocksize does not produce 0 after alignmentMichael Shalayeff
2005-04-05Don't clobber the returned sample rate when the AC97 changes it.Marco S Hyman
This lets an application know, should it bother testing, that a requested bit rate is not available. 'looks ok to me' mickey@
2005-04-05match on nforce4 and nforce2-400 ac97 as well; form netbsdMichael Shalayeff
2005-04-05from netbsd:Michael Shalayeff
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.
2005-04-05ich6 support from freebsd via [Bjorn] Sandell <biorn@dce.chalmers.se>Michael Shalayeff
2005-04-02mixer can endup mapped w/ a different tag and so give it one of its own; ↵Michael Shalayeff
from 71@becile.com pr4162
2005-03-22fix probable pasto that calculated a control register value forMarco S Hyman
reset then ignored the calculated value. Also, move the underrun and overrun printfs to AUICH_DEBUG. As it was, you'd get at least one underrun per play reported to the console. Changes OK mickey@
2005-01-17try memory-mapped bars first that exist on ich4/ich5 and fall bak to ↵Michael Shalayeff
io-mapped if that fails; from Lars Heidieke via Michael van der Westhuizen
2005-01-17typo; from Michael van der Westhuizen <michael@skanky.homeunix.net>Michael Shalayeff
2004-11-30EB is just like DB does not set PCR; reported and tested by Jan Johansson ↵Michael Shalayeff
<janj+openbsd@wenf.org>auich.c
2004-09-20Add nvidia nforce3 250 audio. From FreeBSD via deraadt@.Alexander Yurchenko
``go for it'' deraadt@
2004-07-21calibrate after opening. helps if cpu speed is changing and microtime can'tTed Unangst
be trusted. ok deraadt, several testers. solves pr3814. while here, art says use microuptime.
2004-07-08nforce3; downsjTheo de Raadt
2004-05-10ugly hackery for auich support on amd64.Marco S Hyman
Will not work on machine with > 4G phys memory. OK deraadt@
2004-04-09Warn the user if we don't attach the ac97 codec.Miod Vallat
2003-10-10Calibration code from FreeBSD/NetBSD. Some of the auich's are clocked tooJason Wright
high and sound particularly awful on playback. Thanks to millert and marc for testing (and frantzen for giving me a broken machine).
2003-08-06Remove some double semicolons (hmm, do two semis equal a maxi?).Todd C. Miller
I've skipped the GNU stuff for now. From Patrick Latifi.
2003-06-12several lusers suggested it should work none capable of definately answering ↵Michael Shalayeff
the question does it play the damn music. see if anybody report problems w/ it now
2003-06-02kill the caluses three and four on some of my codeMichael Shalayeff
2003-05-20add flags support for reversing stereo.Ted Unangst
ok mickey@
2003-04-27strcpy/sprintf cleanup of sys/dev. miod@, deraadt@ says to commit.Hakan Olsson