summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/isa/sb16.c
Commit message (Collapse)AuthorAgeFilesLines
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Audio drivers failed to detect failure condition and attempted toyongari2004-10-131-1/+1
| | | | | | | | | | assign DMA address to the wrong address. It can cause system lockup or other mysterious errors. Since most sound cards requires low DMA address(BUS_SPACE_MAXADDR_24BIT) sndbuf_alloc() would fail when the audio driver is loaded after long running of operations. Approved by: jake (mentor) Reviewed by: truckman, matk
* Change sb_lock() calls to sbc_lockassert() and remove the sb_unlock()truckman2004-09-121-4/+2
| | | | | | | | | | | calls in sb_cmd2() and sb_getmixer(). The lock has already be grabbed before these functions are called. This is a RELENG_5 candidate. PR: 71189 Submitted by: stephane MFC after: 3 days
* 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
* Improve mapping of relative to absolute volume.josef2004-06-141-2/+15
| | | | | | | | | | I added bounds checking to the patch and cg improved the formular. Submitted by: Andriy Gapon <avg@icyb.net.ua> PR: kern/65485 Approved by: cg Reviewed by: imp, rwatson, le
* Remove extraneous spaces.truckman2004-05-131-1/+1
|
* Implement sbc_lockassert() and sb_lockassert() functions to allowtruckman2004-05-131-3/+12
| | | | | | | | | | | | | proper locking to be checked at runtime. Remove sb_lock() and sb_unlock() calls from sb_reset_dsp() because the latter is called from sb_setup() with the lock already held. Add a call to sb_lockassert(). Surround the call to sb_reset_dsp() in sb16_attach() with sb_lock() and sb_unlock() calls. Tested by: Bartek Marcinkiewicz <junior AT p233.if.pwr.wroc.pl>
* 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-4/+8
| | | | | 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/+3
| | | | Approved by: tanimura (mentor)
* update my email address.cg2003-09-071-1/+1
|
* Mega busdma API commit.scottl2003-07-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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
* - Clean up ISA DMA supports.nyan2003-02-071-15/+17
| | | | | | | - Rename all sndbuf_isadma* functions to sndbuf_dma* and move them into sys/dev/sound/isa/sndbuf_dma.c. No response from: sound
* Do not return(foo()) in void function.semenu2002-12-181-1/+1
| | | | | Submitted by: marius@alchemy.franken.de MFC after: 3 days
* Add support for controlling line1 mixer device, which on some cards representssobomax2002-07-301-2/+9
| | | | | | onboard FM tuner. MFC after: 2 weeks
* Fix code that had rotted behind debugging macros.scottl2002-01-251-1/+1
| | | | | Approved by: cg (in principle) MFC after: 2 weeks
* allow the hardware buffer size to be controlled with hintscg2001-09-291-31/+46
| | | | release isa dma channels on unload (ad1816, ess, sb8)
* KSE Milestone 2julian2001-09-121-1/+1
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* 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.
* Correct obviously wrong mistakes.green2001-07-021-1/+1
|
* Make all this compile on 4.3, modulus sbuf.green2001-07-021-2/+2
|
* 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-2/+0
| | | | | | | | | | | | | | | 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.
* fix whitespace bogonscg2001-03-251-1/+1
|
* mega-commit.cg2001-03-241-31/+53
| | | | | | | | | | | | | | | 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.
* fix a typo preventing the second dma channel being releasedcg2001-03-161-1/+3
| | | | use isa_dma_release when releasing dma channels
* update code dealing with snd_dbuf objects to do so using a functional interfacecg2000-12-231-36/+41
| | | | | | | | | | | | | | | modify chn_setblocksize() to pick a default soft-blocksize appropriate to the sample rate and format in use. it will aim for a power of two size small enough to generate block sizes of at most 20ms. it will also set the hard-blocksize taking into account rate/format conversions in use. update drivers to implement setblocksize correctly: updated, tested: sb16, emu10k1, maestro, solo updated, untested: ad1816, ess, mss, sb8, csa not updated: ds1, es137x, fm801, neomagic, t4dwave, via82c686 i lack hardware to test: ad1816, csa, fm801, neomagic others will be updated/tested in the next few days.
* kobjify.cg2000-12-181-75/+39
| | | | | | | | | | this gives us several benefits, including: * easier extensibility- new optional methods can be added to ac97/mixer/channel classes without having to fixup every driver. * forward compatibility for drivers, provided no new mandatory methods are added.
* adjust dma channels for vibra16x; recording should now work. full duplex doescg2000-11-071-18/+33
| | | | not work on vibra16x, so is disabled.
* fix paste-o in mixer code - actually set right channel volume instead ofcg2000-11-061-1/+2
| | | | doing the left channel twice.
* split up sb16 and sb/sbpro driverscg2000-10-281-487/+396
| | | | | | | we do not support sb versions <2.00, and the sb8 driver has not been tested yet. these drivers are not yet enabled by default.
* add reinit functions to mixerscg2000-10-261-0/+1
| | | | | unstaticize chn_start() add reset/resetdone functions to channels
* detach supportcg2000-09-091-5/+26
| | | | | | | remove un-needed setdir functions add bus_teardown_intr calls where necessary destroy our dma tags where necessary destroy ac97 before releasing resources
* change mixer api slightlycg2000-09-011-6/+14
| | | | | | | | | change channel interface - kobj implementation coming soonish make pcm_makelinks not panic if modular add pcm_unregister() these changes support newpcm kld unloading, but this is only implemented by ds1.c
* rework feeder sytem to allow feeders in kldscg2000-08-201-22/+29
| | | | | | | | modify driver capability reporting format to list every audio format seperately- required for above and because we could not previously indicate that mono was unsupported. there should be no functional impact.
* add module metadata. this is a hack, sound drivers will eventually present acg2000-07-031-1/+4
| | | | bus to which pcm, mixer, etc will attach.
* Unused include: #include "sbc.h"peter2000-06-101-2/+0
|
* handle emulated dma readscg2000-05-261-1/+1
| | | | don't try to get sample size from snd_dbuf
* split up ess and sb codecg2000-03-281-317/+13
| | | | | | rewrite ess mixer to use native registers rewrite play/rec code to use more accurate timer when available add code to use audio2 for playback, but disable it as no irqs are generated
* Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags.phk2000-03-131-2/+2
| | | | | Define ISADMA_{READ,WRITE,RAW} macros with the same numeric values as the B_{READ,WRITE,RAW} and use them instead throughout.
* fix ess end-of-buffer repeatingcg2000-02-141-6/+2
| | | | | Submitted by: nhibma Approved by: jkh
* general tidyupcg2000-01-101-162/+221
|
* argh, forgot the bus_dma_tag_creates.cg2000-01-051-1/+2
| | | | also, panic if channel init fails instead of derefing null.
* allocate isa bounce buffers of the right size for ess/mss cards, fixescg2000-01-051-2/+4
| | | | panics reported
* make ess cards use a 64k buffer again, by implementing esschan_init()cg1999-12-301-6/+13
|
* - latest 2ndbuffer patchcg1999-12-291-0/+2
| | | | | | | - make chn_setdir work for rec on isa cards - note: es1371 does not irq in smp Submitted by: tanimura
* Don't pass u_int32_t pointers to BUS_READ_IVAR since it tends to makedfr1999-12-241-3/+3
| | | | alphas panic.
* don't use the sbpro mic vol register during init on ess cards; it causescg1999-12-211-1/+2
| | | | feedback and we use the native one elsewhere.
* minor cosmeticscg1999-12-201-1/+0
|
* fix for ess cards to use auto-init dma mode, so they workcg1999-12-191-4/+4
|
OpenPOWER on IntegriCloud