summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pci/ds1.c
Commit message (Collapse)AuthorAgeFilesLines
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-1/+1
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* When calculating the block size to use for a particular sample rate,iedowse2003-08-231-4/+6
| | | | | | | | | | | round the result up to a multiple of 4 bytes so that it will always be a multiple of the sample size. Also use the actual buffer size from sc->bufsz instead of the default DS1_BUFFSIZE. This fixes panics and bad distortion I have seen on Yamaha DS-1 hardware, mainly when playing certain Real Audio media. Reviewed by: orion (an earlier version of the patch)
* 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-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix bogus maxsegsz parameter for bus_dma_tag_create().simokawa2003-04-161-1/+1
| | | | MFC: 1 week
* Implement a "sndbuf_getbufaddr" function and use it instead of vtophys().cognet2003-02-201-11/+11
| | | | Reviewed by: orion
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* (hopefully) fix build breakage some people are seeingcg2002-11-261-1/+1
| | | | Approved by: re
* Add lock type arguments to callers of snd_mtxcreate().jhb2002-04-041-1/+1
|
* use pcm_getbuffersize()cg2001-10-081-14/+22
| | | | use seperate dma tags for buffers and control info
* 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 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.
* mega-commit.cg2001-03-241-15/+26
| | | | | | | | | | | | | | | 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 blocksizing for playback, implement blocksizing for recordcg2001-01-241-1/+12
|
* update to return correct blocksize- these chips have a fixed irq rate, socg2000-12-251-0/+8
| | | | block size varies only with format and rate.
* update code dealing with snd_dbuf objects to do so using a functional interfacecg2000-12-231-8/+6
| | | | | | | | | | | | | | | 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-87/+65
| | | | | | | | | | 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.
* fix warningscg2000-09-171-2/+0
|
* disable 16bit mono support- this will be handled by software conversion tocg2000-09-091-1/+1
| | | | stereo as hardware mono is very noisy
* detach supportcg2000-09-091-21/+11
| | | | | | | remove un-needed setdir functions add bus_teardown_intr calls where necessary destroy our dma tags where necessary destroy ac97 before releasing resources
* initial support for multiple ac97 codecscg2000-09-051-1/+1
|
* change mixer api slightlycg2000-09-011-10/+66
| | | | | | | | | 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
* remove stuff accidentally left in last commitcg2000-08-291-16/+0
|
* suspend/resume for ds1 drivercg2000-08-291-9/+51
| | | | | PR: misc/20891 Submitted by: Ira L. Cooper <ira@mit.edu>
* Fix disordered arguments to bus_space_barrier().dfr2000-08-281-1/+1
|
* rework feeder sytem to allow feeders in kldscg2000-08-201-9/+19
| | | | | | | | 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.
* do the ac97 init delay for all chips and increase it to 500mscg2000-07-301-2/+3
|
* add module metadata. this is a hack, sound drivers will eventually present acg2000-07-031-1/+3
| | | | bus to which pcm, mixer, etc will attach.
* Unused includes: #include "pci.h", #include "pcm.h"peter2000-06-101-3/+0
|
* Increase delay from 10mu to 1000mu when reading play control size. Thisdan2000-06-091-1/+1
| | | | allows the YMF744 to initialize properly.
* support recordingcg2000-06-061-55/+234
|
* With this evil hack the DS1 driver works on our Intel desktoppeter2000-06-011-2/+14
| | | | | | | | motherboards that use YMF740's. It has a strange subvendor and subdevice ID and requires a disturbingly long delay after the ac97 codec init. Cameron hasn't had this driver tested on another 740 yet, so we don't know if this is a quirk of all 740's, or if its just something about the codec that Intel used.
* if we get bad values for playctrlsize, the firmware may not have initialisedcg2000-06-011-1/+11
| | | | yet so retry.
* add a bit more diagnostic info for the bus_dmamap_load failure casecg2000-05-311-5/+8
|
* yamaha ds1/ds1e pci sound driver - work in progress, mixer and playback only.cg2000-05-311-0/+788
tested on ymf724f only. conf/files entry is commented out, enable it manually to test this code and let me know results.
OpenPOWER on IntegriCloud