summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/esa.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mark some suspend/resume functions always returning zero as void; ok ratchov@miko2018-09-141-10/+7
|
* Add mixer save/restore capability to the audio(4) driver andratchov2018-04-111-2/+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
* If you use sys/param.h, you don't need sys/types.hderaadt2017-09-081-2/+1
|
* Remove (likely wrong) code commented since revision 1.1. Fromratchov2016-12-121-8/+1
| | | | Michael W. Bombardieri <mb at ii.net>
* Remove unused getdev() audio driver functions.ratchov2016-09-191-18/+1
|
* Remove drain(), query_encoding(), mappage() and get_default_params()ratchov2016-09-141-50/+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-54/+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@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-5/+5
| | | | after discussions with beck deraadt kettenis.
* 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/+14
| | | | | | | | | | | | | 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
* remove pci_set_powerstate() calls that are not needed, since the pcideraadt2012-10-111-6/+1
| | | | | framework does these more correctly ok kettenis
* Make sure we only return 1 from the interrupt handler if the interruptkettenis2011-12-071-3/+5
| | | | | | actually was for us. Fixes problems when the interrupt is shared. tested by stu@, ok mikeb@
* use nitems(); no binary change for drivers that are compiled on amd64.jasper2011-04-031-2/+2
| | | | ok claudio@
* remove the powerhook code. All architectures now use the ca_activate treederaadt2010-09-071-15/+1
| | | | | traversal code to suspend/resume ok oga kettenis blambert
* Since the changes in neo(4) work, it is very likely that the exact samederaadt2010-08-271-8/+16
| | | | | mechnical changes work in these drivers too. Testing can occur after this commit.
* kill PWR_STANDBY (apm can use PWR_SUSPEND instead). While here, renumberderaadt2010-08-271-2/+1
| | | | | | | PWR_{SUSPEND,RESUME} so that they match the values of DAVCT_{SUSPEND,RESUME} so that we can eventually (many more steps...) kill the powerhook garbage and use the activate mechanism. no objections
* add two new members to structs audio_encoding and audio_prinfo.jakemsr2010-07-151-14/+17
| | | | | | | | | | 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
* sizeof -> nitems, found by parfait; ok dlgderaadt2009-11-131-6/+6
|
* The two "firmware" arrays only contained 16 bit values, but were beingderaadt2009-06-021-4/+4
| | | | | | | | | | being stored in an array of 32 bits. waste of memory. The bandpass filter table only contained 16 bit values, but was being treaded as if it was in an array of 32 bit values, thus what was being loaded into the chip was totally wrong and this probably explains why I remember it sounded horrid. Not tested on real hardware; incorrect array accesses discovered by Parfait ok oga
* 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@
* use ac97 default parameters for these ac97 based drivers.jakemsr2008-05-291-2/+9
| | | | | | | | | | | 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-2/+3
| | | | | | | | | instead of 8-bit mono mulaw @ 8kHz. this is just the infrastructure; no drivers are specifying a default yet. ok ratchov@, deanna@
* Use pci_set_powerstate(), shrinking the code and unifying the differentfgsch2007-10-221-22/+4
| | | | versions. ok by many.
* Some bzero() -> M_ZERO. ok jakemsr@krw2007-09-171-3/+2
|
* Wow, this is clearly wrong (found in esa_set_params):brad2006-01-251-2/+2
| | | | | | | | | | if (p->channels < 1 && p->channels > 2) return EINVAL; Change the 'and' to an 'or' so the check actually does something. From jmcneill NetBSD ok krw@
* Move contents of sys/select.h to sys/selinfo.h in preparation for amillert2005-11-211-2/+2
| | | | | userland-visible sys/select.h. Consistent with what Net and Free do. OK deraadt@, tested with full ports build by naddy@.
* do not set PCI_COMMAND_MASTER_ENABLE explicitly as it's already set in pcisubmatch(); kettenis@ testing; brad@ okmickey2005-08-091-7/+1
|
* use PCI_PMCSR instead of some magic value.fgsch2003-10-071-3/+3
| | | | ok krw@ henning@
* make dmesg prints closer to the rest of the driversmickey2003-08-111-12/+6
|
* strcpy/sprintf cleanup of sys/dev. miod@, deraadt@ says to commit.ho2003-04-271-2/+2
|
* Add a simplistic table driven lookup routine and use it where appropriate.jason2002-11-191-14/+8
|
* free resources on failures in attach, kill some spaces; from grendel@zeitbombe.orgmickey2002-10-041-15/+25
|
* Use & to test if bits are set, not &&; art@ ok.aaron2002-08-081-2/+2
|
* tag repairderaadt2002-04-081-1/+1
|
* Allegro-1 and Maestro 3 driver ported from netbsdfrantzen2002-04-081-0/+1735
ok deraadt@