summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pci/cmi.c
Commit message (Collapse)AuthorAgeFilesLines
* Use BUS_PROBE_DEFAULT in preference to 0 and BUS_PROBE_LOW_PRIORITY inimp2005-03-011-4/+4
| | | | | preference to some random negative number to allow other drivers a bite at the apple.
* BUS_SPACE_UNRESTRICTED shouldn't be used with the bus_alloc_resourceimp2005-02-011-2/+2
| | | | interface. Instead, move to the convenience _any interface.
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Rename the sound device drivers:tanimura2004-07-161-1/+1
| | | | | | | | | | | | | | - `sound' The generic sound driver, always required. - `snd_*' Device-dependent drivers, named after the sound module names. Configure accordingly to your hardware. In addition, rename the `snd_pcm' module to `sound' in order to sync with the driver names. Suggested by: cg
* This driver certainly works fine turning INTR_MPSAFE back on. For thosegreen2004-04-211-1/+1
| | | | | | of you with other cards, please do review and test the drivers for MP-safety and disable Giant in the interrupt routines when you are sure of proper functionality.
* The newpcm headers currently #define away INTR_MPSAFE and INTR_TYPE_AVgreen2004-04-141-1/+1
| | | | | | | | | | | | | | | | | | because they bogusly check for defined(INTR_MPSAFE) -- something which never was a #define. Correct the definitions. This make INTR_TYPE_AV finally get used instead of the lower-priority INTR_TYPE_TTY, so it's quite possible some improvement will be had on sound driver performance. It would also make all the drivers marked INTR_MPSAFE actually run without Giant (which does seem to work for me), but: INTR_MPSAFE HAS BEEN REMOVED FROM EVERY SOUND DRIVER! It needs to be re-added on a case-by-case basis since there is no one who will vouch for which sound drivers, if any, willy actually operate correctly without Giant, since there hasn't been testing because of this bug disabling INTR_MPSAFE. Found by: "Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru>
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-2/+2
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Augment /dev/sndstat with the module names, if applicable.matk2004-03-061-2/+2
| | | | Approved by: tanimura (mentor)
* Fix sound LOR problems:scottl2003-11-111-25/+25
| | | | | | | | | | | | | | | | dsp_open: rearrange to only hold one lock at a time dsp_close: ditto mixer_hwvol_init: delete locking, the only consumer seems to be the ess driver and it only call it a creation time, I think the device will be stable across the sleepable malloc. cmi interrupt routine: Release locks while caller chn_intr, either this or do what emu10k1 does which is have no locks at in the interrupt handler. Submitted by: mat@cnd.mcgill.ca
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-1/+1
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Mega busdma API commit.scottl2003-07-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs
* Implement a "sndbuf_getbufaddr" function and use it instead of vtophys().cognet2003-02-201-1/+1
| | | | Reviewed by: orion
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-1/+1
| | | | especially in troff files.
* (hopefully) fix build breakage some people are seeingcg2002-11-261-1/+1
| | | | Approved by: re
* Make sure channel buffer start is associated with channel, otherwiseorion2002-08-231-3/+3
| | | | | getptr is broken. Noise reported by Thomas Draney <tmdraney@yahoo.com> who also tested the patch.
* Add lock type arguments to callers of snd_mtxcreate().jhb2002-04-041-1/+1
|
* Addition of sysctl variable to enable spdif. By default spdif is disabled.orion2001-12-171-2/+26
| | | | MFC after: 3 days
* Change the module name from 'snd_cmipci' to 'snd_cmi' to match thejhb2001-10-241-3/+3
| | | | | filename, module name in the loader, the dependency in snd_driver.ko, and to be consistent with other sound drivers.
* use pcm_getbuffersize()orion2001-10-101-5/+9
|
* Convert the CMedia driver to using a device mutex and INTR_MPSAFE.green2001-09-081-2/+28
|
* Fix return value of setblocksize functions. Recording is interspersedorion2001-09-031-1/+1
| | | | with silent intervals otherwise.
* many changes:cg2001-08-231-3/+3
| | | | | | | | | | | | | | | * add new channels to the end of the list so channels used in order of addition * de-globalise definition of struct snddev_info and provide accessor functions where necessary. * move the $FreeBSD$ tag in each .c file into a macro and allow the /dev/sndstat handler to display these when set to maximum verbosity to aid debugging. * allow each device to register its own sndstat handler to reduce the amount of groping sndstat must do in foreign structs.
* Use the M_ZERO flag to malloc(9)greid2001-06-211-2/+1
| | | | | Reviewed by: cg MFC after: 1 week
* use a global devclass for all drivers - i'm not entirely sure why thiscg2001-06-161-25/+24
| | | | | | | | | | | | | | | worked before. mixer, dsp and sndstat are seperate devices - give them their own cdevsws instead of demuxing requests sent to a single cdevsw. use the si_drv1/si_drv2 fields in dev_t structures for holding information specific to an open instance of mixer/dsp. nuke /dev/{dsp,dspW,audio}[0-9]* links - this functionality is now provided using cloning. various locking fixes.
* Quieten when re-triggering.orion2001-04-071-0/+4
|
* Centralize DMA buffer configuration.orion2001-04-041-53/+38
| | | | | | | | Simplify initialization and remove offending DMA channel resets there. The resets trash whatever is pointed to DMA registers, but at cmi_attach() time the DMA registers have not been initialized with valid addresses. Reviewed by: Cameron Grant <gandalf@vilnya.demon.co.uk>
* - Added suspend/resume support.orion2001-03-291-228/+311
| | | | | | | | | | | | | - Added 4 speaker enable to initialization sequence. - Removed delays between register pokes which appear to aggravate a problem this card has sampling at 44.1kHz. With any form of delay, skew relative to system clock at 44.1kHz is usually in range 0-25% (now 0-3%). No other rates exhibit this problem. - Changed structs cmi_* to sc_*. Approved by: Cameron Grant <gandalf@vilnya.demon.co.uk>
* mega-commit.cg2001-03-241-11/+11
| | | | | | | | | | | | | | | this introduces a new buffering mechanism which results in dramatic simplification of the channel manager. as several structures have changed, we take the opportunity to move their definitions into the source files where they are used, make them private and de-typedef them. the sound drivers are updated to use snd_setup_intr instead of bus_setup_intr, and to comply with the de-typedefed structures. the ac97, mixer and channel layers have been updated with finegrained locking, as have some drivers- not all though. the rest will follow soon.
* Change ordering of SPDIF register pokes. SPDIF enable needs to be theorion2001-03-211-4/+2
| | | | | last poke in sequence. Enabling SPDIF was coercing output rate to 48K, not good for 44.1K tracks.
* MFS: don't ignore the result of mixer_init()cg2001-03-051-56/+57
|
* add driver for CMedia CMI8338/CMI8738 sound chipscg2001-02-041-0/+887
Submitted by: Orion Hodson <O.Hodson@cs.ucl.ac.uk>
OpenPOWER on IntegriCloud