summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/eap.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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@
* Add mixer save/restore capability to the audio(4) driver andratchov2018-04-111-19/+1
| | | | | | | | use it during suspend/resume. Remove driver-specific mixer save/restore bits that don't need to be duplicated in every low-lever driver. ok mpi
* Remove unused getdev() audio driver functions.ratchov2016-09-191-17/+1
|
* Remove drain(), query_encoding(), mappage() and get_default_params()ratchov2016-09-141-61/+3
| | | | | 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-76/+8
| | | | | | | | | 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@
* Release CPU mutexes on EINVAL.doug2014-08-201-1/+3
| | | | ok guenther@
* 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.
* Add a DVACT_WAKEUP op to the *_activate() API. This is called after thederaadt2013-12-061-7/+3
| | | | | | | | 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-12/+19
| | | | | | | | | | | | | 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
* If the MIDI UART is not ready for output, don't spin at IPL_CLOCK;ratchov2012-03-301-22/+21
| | | | | | | just return and make the midi(4) driver retry later. UART buffers are large enough for this, except eap(4) which uses interrupts for output. help from and ok jsg@
* 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@
* autoconf activate, suspend/resume supportjakemsr2010-09-221-7/+111
|
* add two new members to structs audio_encoding and audio_prinfo.jakemsr2010-07-151-9/+15
| | | | | | | | | | 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
* Lock the sample rate of es1731-based devices to 48kHz (ie theratchov2010-06-201-119/+23
| | | | | | | | codec rate). The es1731 has a hardware sample rate converter but we don't know how to program it (no documentation) and the current code is wrong (breaks full-duplex). ok jakemsr, landry
* these files don't need to include proc.h anymore. ok oga for agptedu2010-04-081-2/+1
|
* avoid possibly using an uninitialized variable.jakemsr2009-02-151-5/+8
| | | | problem found by chl@, fix tested by jasper@.
* initialize the sample rate converter on es1371 chips to 48 kHz insteadjakemsr2008-12-291-5/+5
| | | | | | | of 22.5 kHz, since this is an ac97(4) device, and the default sample rate for ac97(4) is 48 kHz. tested by jasper@, thanks
* audio(9) says low level drivers are allowed to change the requestedjakemsr2008-10-251-6/+9
| | | | | | | | | | | | | | 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@
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* use ac97 default parameters for these ac97 based drivers.jakemsr2008-05-291-3/+10
| | | | | | | | | | | this makes the emulation expansion factor 1 by default since there's no emulation. previously the factor was 2 because these drivers emulate 8-bit ulaw playback with 16-bit linear encodings. having a factor other than 1 by default creates block size and hiwat/lowat issues with applications that set the block size and hiwat before other parameters. ok ratchov@
* allow low level audio drivers to specify a default sample format,jakemsr2008-04-211-1/+3
| | | | | | | | | instead of 8-bit mono mulaw @ 8kHz. this is just the infrastructure; no drivers are specifying a default yet. ok ratchov@, deanna@
* outputs.master.mute, inputs.dac.mute, record.volume.mute and record.sourceratchov2008-03-211-31/+1
| | | | | | are already initialized in ac97.c, we dont need to set them here too. ok jakemsr
* repair input vs output confusionjakemsr2007-11-121-10/+10
| | | | | | makes 'audioctl play.gain' work correctly from NetBSD
* Add optional flush method to MIDI hardware interface.jsg2006-04-071-1/+2
| | | | | | | Allow umidi(4) to send multiple events in a single USB transfer. This greatly improves the number of interrupts umidi is able to generate. From Alexandre Ratchov.
* do not set PCI_COMMAND_MASTER_ENABLE explicitly as it's already set in pcisubmatch(); kettenis@ testing; brad@ okmickey2005-08-091-7/+1
|
* KNF and zap trailing whitespace.niallo2005-04-251-96/+96
| | | | no binary changes.
* use delay() and not tsleep() in attach. makes driver work properly withniallo2005-04-251-2/+2
| | | | | | | | ``Ensoniq CT5880''-based card. from netbsd rev 1.59 ok mickey@
* do not provide round_buffer if not needed unless explained why in commentsmickey2005-04-161-10/+3
|
* make sure round_blocksize does not produce 0 after alignmentmickey2005-04-141-2/+2
|
* Support for the eap MIDI UART from NetBSD.jsg2004-12-171-1/+111
| | | | Tested by serveral people. ok millert@, mickey@
* Don't link to ac97 specs from individual drivers.jsg2004-12-071-2/+1
| | | | ok mickey@
* don't read registers all the time, solves timeout issues. from Joris Vinktedu2004-03-181-2/+15
|
* time bound some of the loops instead of depending on pci read to determinejason2003-05-141-1/+3
| | | | the loop time... icky poo! ok millert, tested by margarida
* strcpy/sprintf cleanup of sys/dev. miod@, deraadt@ says to commit.ho2003-04-271-43/+67
|
* Change timeout detection from > or >= EAP_XXX_TIMEOUT to ==.millert2003-04-051-6/+6
| | | | | The > was wrong and >= is not needed (== is suuficient). OK krw@ From Patrick Latifi
* Add a simplistic table driven lookup routine and use it where appropriate.jason2002-11-191-21/+10
|
* make all audio drivers use the new allocm and round_buffersize decl's.ericj2002-01-201-6/+6
| | | | will ease porting, and generally cleans up a bit
* Change the audio_hm_if->mappage interface to return paddr_t and take off_tart2001-10-311-4/+4
| | | | as the mmap offset.
* Remove useless "\n%s" from the attach routine to match OpenBSD attach norms.millert2001-09-061-6/+5
| | | | naddy@ OK
* sync up to NetBSD; reviewed by csapuntz@naddy2001-09-061-683/+382
| | | | | | - better support for more chip revisions - split register definitions into separate header file - KNF
* Change pci_intr_map to take pci_attach_args as an argument.art2001-08-251-3/+2
| | | | | | | | | | | All callers actually took all arguments to pci_intr_map from pci_attach_args structs, so this simplifies code. This also allows more complicated interrupt assignment schemes like the one on sparc64. This makes sparc64 pci interrupts work. Inspired by the same change in NetBSD.
* Make pci_mapreg_map take an extra argument where we canniklas2001-06-121-2/+2
| | | | | | | put a size limitation of the PCI region to map. That makes the PERC 3/Di raid controller usable, as it publishes too much PCI memory for us to map in the kernel virtual memory. As we only access the first 256 byte it is of no use to map 128MB of kvm.
* Fix AK4531 data sheet link. Ok'd by deraadt@kevlo2000-08-161-2/+2
|
* Reset AC97 codec on ES1371 revisions 7 and above. Thanks to Alejo Sanchezcsapuntz2000-07-181-2/+8
| | | | for pointin this out.
* (hopefully) fix pauses reported by ES1370 userscsapuntz1999-12-131-67/+192
| | | | | | | | | | Fix failure to start playing in my ES1371-based card. Was caused by a disabled sample rate converter. Support for newer ES1371 variants Codec and sample-rate converter functions updated to reflect black magic in FreeBSD
* Print out the irq in attach. Thanks downsj@cvscsapuntz1999-10-101-2/+2
|