summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/cmpci.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mark some suspend/resume functions always returning zero as void; ok ratchov@miko2018-09-141-4/+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-6/+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-32/+1
|
* Remove drain(), query_encoding(), mappage() and get_default_params()ratchov2016-09-141-58/+2
| | | | | methods from all audio drivers and from the audio_if structure as they are never called.
* For unsupported sample formats, don't return EINVAL but set the closestnaddy2015-06-181-15/+7
| | | | available format. ok ratchov@
* Remove all audio format conversion code from the kernel (btw holdingratchov2015-05-111-115/+7
| | | | | | | | | 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@
* 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/+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 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
* mark S8 encoding as emulated; only S16LE and U8 are natively supportednaddy2011-06-291-2/+2
| | | | ok ratchov@
* use nitems(); no binary change for drivers that are compiled on amd64.jasper2011-04-031-7/+6
| | | | ok claudio@
* only print out of sync messages when compiled for debuggingjakemsr2010-10-091-5/+5
|
* check current hardware position in interrupt handler. it's possiblejakemsr2010-10-081-19/+59
| | | | | more than one block was used since the last time the interrupt handler was run.
* silly me. use the switch() variable, not the case value.jakemsr2010-09-121-3/+3
|
* autoconf activate suspend/resume for cmpci(4). uses audio(4)jakemsr2010-09-121-2/+42
| | | | DVACT_{QUIESCE,RESUME}.
* add two new members to structs audio_encoding and audio_prinfo.jakemsr2010-07-151-1/+8
| | | | | | | | | | 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
|
* configure the input and output ports in trigger_{input,output} insteadjakemsr2009-05-061-3/+6
| | | | of set_params so they only get configured when necessary.
* - explicitely disable some s/pdif features (ac3 passthrough, 24 and 32-bitjakemsr2009-05-061-6/+24
| | | | | | | | modes, "double speed") - connect s/pdif output to the correct controller channels fixes s/pdif output, which I partly broke when adding multichannel support. problem reported and patches tested by Antti Harri, thanks.
* make various strings ("can't map mem space" and similar) more consistentsthen2009-03-291-4/+4
| | | | | | | 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-9/+7
| | | | | | | | | | | | | | 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@
* specify alternate default audio parameters to make the default expansionjakemsr2008-05-291-2/+14
| | | | | | | | factor 1 also obsoletes a XXX workaround in azalia ok ratchov@
* Remove commented out NetBSD __KERNEL_RCSID macro usage.brad2008-05-131-6/+1
| | | | ok dlg@
* allow low level audio drivers to specify a default sample format,jakemsr2008-04-211-1/+2
| | | | | | | | | instead of 8-bit mono mulaw @ 8kHz. this is just the infrastructure; no drivers are specifying a default yet. ok ratchov@, deanna@
* - add support for 4, 6, and 8 channel playbackjakemsr2008-01-091-45/+218
| | | | | | | | - print chip version in `audioctl version' - advertise some features of supported hardware in the man page - CMI8768 now working properly yes! ratchov@
* spacing nit.brad2007-09-131-2/+2
| | | | ok dlg@
* __inline removaljakemsr2007-09-031-35/+25
| | | | | | tested on my amd64 from bret.lambert@gmail.com via art@, thanks
* Newer cmcpci(4) sound driver, which adds S/PDIF, OPL and MPU support, somebrad2006-07-271-748/+972
| | | | | | | | | fixes for 48KHz sound and adds the C-Media CMI8738B PCI id. By ITOH Yasufumi From NetBSD Thanks to kurt@ for providing me with a CMI8738 board.
* make sure round_blocksize does not produce 0 after alignmentmickey2005-04-141-2/+2
|
* CMI can do mu-law encoding, don't use software emulation mode.kevlo2003-09-091-2/+2
| | | | deraadt@, jason@, mickey@ ok
* untils this is sync'ed, correctly set mixer_class for CMPCI_OUTPUT_CLASS.fgsch2003-06-051-2/+2
|
* strcpy/sprintf cleanup of sys/dev. miod@, deraadt@ says to commit.ho2003-04-271-48/+75
|
* Add a simplistic table driven lookup routine and use it where appropriate.jason2002-11-191-10/+8
|
* Final __P removal plus some cosmetic fixupsmillert2002-03-141-7/+7
|
* First round of __P removal in sysmillert2002-03-141-45/+45
|
* make all audio drivers use the new allocm and round_buffersize decl's.ericj2002-01-201-8/+10
| | | | 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.
* return 1 from interrupt handled; kevloderaadt2001-10-031-2/+2
|
* 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.
* Driver for C-Media CMI8x38 Audio Chip present on several all-in-onemillert2000-04-271-0/+1577
motherboards (ie: bultin audio + video). Written by Takuya SHIOZAKI.