summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/maestro.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add mixer save/restore capability to the audio(4) driver andratchov2018-04-111-3/+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-18/+1
|
* Remove drain(), query_encoding(), mappage() and get_default_params()ratchov2016-09-141-41/+2
| | | | | methods from all audio drivers and from the audio_if structure as they are never called.
* Unbreak build when AUDIO_DEBUG is defined: fix printf(9) formatratchov2016-05-131-2/+2
| | | | mistakes.
* Remove all audio format conversion code from the kernel (btw holdingratchov2015-05-111-29/+3
| | | | | | | | | 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@
* Replace all queue *_END macro calls except CIRCLEQ_END with NULL.doug2014-09-131-3/+3
| | | | | | | | CIRCLEQ_* is deprecated and not called in the tree. The other queue types have *_END macros which were added for symmetry with CIRCLEQ_END. They are defined as NULL. There's no reason to keep the other *_END macro calls. ok millert@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-2/+2
| | | | after discussions with beck deraadt kettenis.
* ansify some function definitions.brad2013-11-151-123/+45
| | | | | | no functional change. ok sthen@
* 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-15/+41
| | | | | | | | | | | | | 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
* repair pci powerstate handling. The extra timeouts were not needed.deraadt2012-10-211-8/+1
| | | | | | Furthermore, all the extra powering up and down caused resumes to not work. ok ratchov
* Use the generic PCI power management code instead of rolling our own.kettenis2011-12-231-30/+5
|
* remove the powerhook code. All architectures now use the ca_activate treederaadt2010-09-071-13/+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-17/+18
| | | | | mechnical changes work in these drivers too. Testing can occur after this commit.
* add two new members to structs audio_encoding and audio_prinfo.jakemsr2010-07-151-9/+12
| | | | | | | | | | 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
* these files don't need to include proc.h anymore. ok oga for agptedu2010-04-081-2/+1
|
* make various strings ("can't map mem space" and similar) more consistentsthen2009-03-291-5/+5
| | | | | | | between instances, saving space in the kernel. feedback from many (some incorporated, some left for future work). ok deraadt, kettenis, "why not" miod.
* audio(9) says low level drivers are allowed to change the requestedjakemsr2008-10-251-4/+3
| | | | | | | | | | | | | | 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@
* the codec is not readable. If we try to read it the ac-link enters a kind ofratchov2007-10-221-1/+10
| | | | | | | | "busy state" in which it's not writeable. This fix tags the host as unable to read the codec, so the ac97 driver doesn't try to read it, instead it keeps in memory copy of all codec registers. Fixes pr 2451 ok jakemsr
* MALLOC -> mallocgilles2007-10-091-3/+3
| | | | ok krw@
* Avoid void * arithmetic, okay deraadt@, suggestions from millert@pedro2006-12-291-2/+2
|
* zap maestro_reg.h, since it's only used in the kernel.espie2006-10-011-2/+315
| | | | okay deraadt@
* do not set PCI_COMMAND_MASTER_ENABLE explicitly as it's already set in pcisubmatch(); kettenis@ testing; brad@ okmickey2005-08-091-8/+1
|
* do not provide round_buffer if not needed unless explained why in commentsmickey2005-04-161-12/+2
|
* make sure round_blocksize does not produce 0 after alignmentmickey2005-04-141-2/+2
|
* initialize blocksize from the trigger_input routine; fixes a div by zerofgsch2003-06-061-1/+2
| | | | | error. problem and patch by Gabriel Kihlman in PR/2856. millert@ ok.
* Final __P removal plus some cosmetic fixupsmillert2002-03-141-5/+5
|
* First round of __P removal in sysmillert2002-03-141-60/+60
|
* make all audio drivers use the new allocm and round_buffersize decl's.ericj2002-01-201-6/+4
| | | | 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/+5
| | | | as the mmap offset.
* Correct some pryntf() usage: get the correct number of arguments in themiod2001-09-211-2/+3
| | | | correct order.
* Stereo jitter suppressor.espie2001-09-051-3/+22
| | | | | | | | Idea from FreeBSD. This code was not put in initially because I had no problematic card to test. Thanks to Chris Kuethe <ckuethe@pyxis.cns.ualberta.ca> for having such a card and testing this code.
* 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.
* fix mmap.espie2001-08-021-2/+5
| | | | | | Add workaround for uvm brain-deadness (allow open O_RDWR, which is necessary for mmap to work, since mmap(PROT_WRITE) does NOT work on devices)
* 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.
* it is notright to malloc() w/ WAITOK at attach time, put back NULL check and change to NOWAITmickey2001-05-161-2/+4
|
* No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)ho2001-05-161-3/+1
|
* correct dmesg, save spacederaadt2001-03-131-25/+18
|
* Add half of PT101 support: init codec, no mixer. And provide forespie2001-01-161-33/+107
| | | | | | | audio/maestro without a functional mixer. Add hardware volume support, enable corresponding interrupt so that volume control works within cdio.
* Activate other maestro makes, per Theo's request.espie2001-01-121-34/+43
|
* Sound driver for some ESS maestro models. Work by d@ and me, based onespie2001-01-111-0/+1538
the FreeBSD driver, and some linux code. Probably some tweaks to reach out for more pci cards (some models are currently commented out, and we have yet to find a card where stereo output gets de-synchronized, as the FreeBSD driver claims happens). Suspends/resume works, recording and keyboard volume control on the way. This is not derived from the NetBSD driver in any way. Just happens that both works reached completion at the same time.