summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/auich.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* do pci_intr_disestablish() and bus_space_unmap() calls if auich_alloc_cdata() fails; ok ratchov@miko2019-08-221-18/+17
|
* auich_freemem() returns void. while here fix a typo in an error message. audio playback still works under virtualbox. ok ratchov@miko2019-08-151-5/+4
|
* size for free(); ok ratchov@miko2018-10-271-3/+3
|
* ansify auich_trigger_input() and remove #ifdef around DPRINTF(); ok ratchov@miko2018-09-141-10/+4
|
* mark some suspend/resume functions always returning zero as void; ok ratchov@miko2018-09-141-5/+3
|
* clarify that config_activate_children() is called unconditionally in *activate().miko2018-09-131-5/+2
| | | | ok ratchov@
* Remove unused getdev() audio driver functions.ratchov2016-09-191-21/+2
|
* Remove drain(), query_encoding(), mappage() and get_default_params()ratchov2016-09-141-53/+2
| | | | | methods from all audio drivers and from the audio_if structure as they are never called.
* Remove all audio format conversion code from the kernel (btw holdingratchov2015-05-111-396/+28
| | | | | | | | | the kernel_lock), as we already do better conversions in user-mode. Yet, no need for every single driver to fiddle with the conversion code as they are done transparently by common MI code. With help from armani and miod, support from mpi ok armani@
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* Kill two generic DVACT_DEACTIVATE handlers since this event is nowmpi2014-09-241-7/+2
| | | | | | autoconf(9)ally passed to the children of a device. ok ratchov@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-3/+3
| | | | after discussions with beck deraadt kettenis.
* fix format mistakes visible if AUICH_DEBUG is definedratchov2014-05-171-6/+6
|
* Add a DVACT_WAKEUP op to the *_activate() API. This is called after thederaadt2013-12-061-6/+4
| | | | | | | | kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
* Since audio code is mp safe, establish isa and pci audio interruptsratchov2013-05-241-3/+3
| | | | | | | | with the IPL_MPSAFE flag. In certain circumstances, this prevents interrupt handlers from waiting the global kernel_lock possibly (hold by slower code) to be released. ok kettenis
* Introduce a global interrupt-aware mutex protecting dataratchov2013-05-151-8/+11
| | | | | | | | | | | | | structures (including sound-card registers) from concurent access by syscall and interrupt code-paths. Since critical sections remain the same, calls to splraise/spllower can be safely replaced by calls to mtx_enter/mtx_leave with two exceptions: (1) mutexes are not reentrant (the inner splraise is thus removed), and (2) we're not allowed to sleep with a mutex (either msleep is used or the mutex is released before sleeping). ok and help from kettenis, a lot of work from armani
* ansify and de'register some prototypesdhill2012-01-111-77/+26
| | | | ok miod@
* Remove config_activate() and DVACT_ACTIVATE. PCMCIA's the only thingmatthew2011-07-031-3/+1
| | | | | | | | that's ever used it, and it's long since been changed to use DVACT_{QUIESCE,SUSPEND,RESUME} instead. ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it up a few weeks ago
* use nitems(); no binary change for drivers that are compiled on amd64.jasper2011-04-031-3/+3
| | | | ok claudio@
* silly me. use the switch() variable, not the case value.jakemsr2010-09-121-3/+3
|
* use audio(4) DVACT_{QUIESCE,RESUME}jakemsr2010-09-121-101/+3
|
* remove the powerhook code. All architectures now use the ca_activate treederaadt2010-09-071-12/+1
| | | | | traversal code to suspend/resume ok oga kettenis blambert
* All PWR_{SUSPEND,RESUME} can now be replaced by DVACT_{SUSPEND,RESUME}deraadt2010-09-061-2/+2
|
* Add DVACT_QUIECE support. This is called before splhigh() and beforederaadt2010-08-311-1/+4
| | | | | | | | DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
* do not return EOPNOTSUPP for unknown activate actionsderaadt2010-08-311-10/+10
|
* Since the changes in neo(4) work, it is very likely that the exact samederaadt2010-08-271-27/+3
| | | | | mechnical changes work in these drivers too. Testing can occur after this commit.
* sync hardware and software buffer positions on resumejakemsr2010-08-091-3/+41
| | | | ok deraadt
* suspend/resume support for auich, and some infrastructure in ac97jakemsr2010-08-081-12/+139
| | | | "commit" deraadt
* if interrupt mapping fails, say sojakemsr2010-08-031-1/+2
| | | | ok deraadt
* add two new members to structs audio_encoding and audio_prinfo.jakemsr2010-07-151-9/+18
| | | | | | | | | | for both structs, the new members are 'bps' and 'msb', which describe the number of bytes per sample and data alignment in the sample, respectively. drivers must properly set these fields in the 'query_encoding', 'set_parameters' and 'get_default_params' hardware interface methods. discussed with ratchov, deraadt
* Fix various problems of auich on SiS 7012 based chips:ratchov2010-06-071-65/+160
| | | | | | | | | | | | | | | | | - rework auich_halt_pipe() and use it to ensure AUICH_RR is set only after DMA is halted (spec says to do so) - rework auich_calibrate(): clear interrupt and event bits in AUICH_STS and ensure CIV counter is not changed. - in the interrupt handler, set LVI to (qptr - 1) rather than the max value (bug introduced by previous commit) All fixes are from Christopher Zimmermann <madroach at zakweb.de>, Thanks! tested on two different intel-based auich devices, ok jakemsr
* Do not print ac97 link rate message unless debug is enabled.dcoppa2010-03-301-5/+5
| | | | | | Adapted from NetBSD OK jakemsr@
* SiS devices seem unable to reset dma block index to zero, causingratchov2010-01-141-7/+21
| | | | | | | | | | 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
* BUS_DMA_NOCACHE is defined on all archs that include this driverjakemsr2009-11-051-5/+1
| | | | from Brad
* SiS 7012 uses different multichannel control bits (data from linux).jakemsr2008-10-281-5/+23
| | | | | | makes 4 channel output work for Anathae Townsend. thanks for testing. ok ratchov@
* audio(9) says low level drivers are allowed to change the requestedjakemsr2008-10-251-9/+30
| | | | | | | | | | | | | | 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@
* S/PDIF output support in ac97(4), auich(4) and auvia(4)jakemsr2008-10-231-52/+90
| | | | | | | | from NetBSD tested by a few with no regressions. optical works for jsg@. ok ratchov@
* enable 4 and 6 channel support.jakemsr2008-10-231-1/+23
| | | | | | | tested by a few. no regressions, but 4 and 6 channel playback is not working with all codecs yet. ok ratchov@
* this driver uses three dma segments; play, record, calibrate.jakemsr2008-09-151-33/+43
| | | | | | | | | | | | | | | | | 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@
* use ac97 default parameters for auich(4), auixp(4) and auvia(4).jakemsr2008-05-251-2/+9
| | | | | | they may have codecs which only handle 48kHz sampling rates. ok ratchov@
* allow low level audio drivers to specify a default sample format,jakemsr2008-04-211-2/+3
| | | | | | | | | instead of 8-bit mono mulaw @ 8kHz. this is just the infrastructure; no drivers are specifying a default yet. ok ratchov@, deanna@
* 8-bit has been emulated for some time now. quit lying.jakemsr2008-03-241-2/+2
|
* if the ac97 codec is fixed-rate, ac97_set_rate() will return thejakemsr2008-02-121-8/+6
| | | | | | | | | | | | | | | | | | | | | 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.
* don't unconditionally return here, still need to set recording parametersjakemsr2008-02-081-2/+4
| | | | | | | | when configuring for full-duplex. fixes problem noticed by todd@ ok todd@
* bring in lots of ac97(4) and auvia(4) updates from NetBSDjakemsr2008-01-151-5/+21
| | | | | | | | | | | | | | | | | 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
* - use endian-specific conversions, instead of relying onjakemsr2007-10-231-32/+112
| | | | | | machine-dependent #defines - use the correct conversions for slinear_le:16 -> ulinear_be:16 - fix mono recording by using various stereo -> mono conversions
* replace auich's DMA and interrupt handling with code from NetBSD'sjakemsr2007-10-201-249/+335
| | | | | | | auich. fixes recording from the microphone input as well as full-duplex operation. tested by brad@, sthen@, deanna@ and ckuethe@. thanks.
* Some bzero() -> M_ZERO. ok jakemsr@krw2007-09-171-3/+2
|
* add proper recording encodings to auich(4).jakemsr2007-08-021-14/+49
| | | | tested by brad@
* Avoid void * arithmetic, okay deraadt@, suggestions from millert@pedro2006-12-291-3/+3
|