summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
Commit message (Collapse)AuthorAgeFilesLines
* Fix a long-standing bug where select on vchans doesn't workmatk2004-02-191-3/+13
| | | | | | (never wake up) by iterating over them when they exist. Approved by: tanimura (mentor)
* Add dependency to snd_via8233mr2004-01-291-0/+1
|
* Change KASSERT() in feed_vchan16() into an explicit test and call totruckman2004-01-288-140/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | panic() so that the buffer overflow just beyond this point is always caught, even when the code is not compiled with INVARIANTS. Change chn_setblocksize() buffer reallocation code to attempt to avoid the feed_vchan16() buffer overflow by attempting to always keep the bufsoft buffer at least as large as the bufhard buffer. Print a diagnositic message Danger! %s bufsoft size increasing from %d to %d after CHANNEL_SETBLOCKSIZE() if our best attempts fail. If feed_vchan16() were to be called by the interrupt handler while locks are dropped in chn_setblocksize() to increase the size bufsoft to match the size of bufhard, the panic() code in feed_vchan16() will be triggered. If the diagnostic message is printed, it is a warning that a panic is possible if the system were to see events in an "unlucky" order. Change the locking code to avoid the need for MTX_RECURSIVE mutexes. Add the MTX_DUPOK option to the channel mutexes and change the locking sequence to always lock the parent channel before its children to avoid the possibility of deadlock. Actually implement locking assertions for the channel mutexes and fix the problems found by the resulting assertion violations. Clean up the locking code in dsp_ioctl(). Allocate the channel buffers using the malloc() M_WAITOK option instead of M_NOWAIT so that buffer allocation won't fail. Drop locks across the malloc() calls. Add/modify KASSERTS() in attempt to detect problems early. Abuse layering by adding a pointer to the snd_dbuf structure that points back to the pcm_channel that owns it. This allows sndbuf_resize() to do proper locking without having to change the its API, which is used by the hardware drivers. Don't dereference a NULL pointer when setting hw.snd.maxautovchans if a hardware driver is not loaded. Noticed by Ryan Sommers <ryans at gamersimpact.com>. Tested by: Stefan Ehmann <shoesoft AT gmx.net> Tested by: matk (Mathew Kanner) Tested by: Gordon Bergling <gbergling AT 0xfce3.net>
* Fix a panic in dsp_clone when trying to access a soundmatk2004-01-251-0/+3
| | | | | | | device that doesn't exists. I'm using my discretion and committing without mentor approval since Seigo is away. Noticed by: Maxime Henrion <mux@freebsd.org>
* Sync with DFBSD v.1.16. Add new codecs IDs, fix some spelling.matk2004-01-231-3/+21
| | | | Approved by: des (interim mentor)
* Reduce latency when using the SNDCTL_DSP_RESET ioctl by callingmatk2004-01-201-2/+10
| | | | | | | chn_resetbuf(). Submited by: Pyun YongHyeon <yongari@kt-is.co.kr> Approved by: tanimura (mentor)
* Fix a panic when kldloading a sound driver. Do this by replacing thematk2004-01-205-217/+95
| | | | | | link-list of dev_t's with named variables. Remove used code. Approved by: tanimura (mentor)
* As previously announced: discontinue use of makedev() call in soundcode.phk2004-01-176-56/+171
| | | | | | | | | | | This takes us a lot closer to refcounting dev_t. This patch originally by cg@ with a few minor changes by me. It is largely untested, but has been HEADSUP'ed twice, so presumably people have not found any issues with it. Submitted by: cg@
* Specify the right location of the generated header.obrien2004-01-121-1/+1
|
* Add Audigy support.obrien2004-01-111-93/+521
| | | | | | I started with a year-old patch by Orlando Bassotto <orlando.bassotto@ieo-research.it>, and ported it to 5.2-CURRENT along with fixing the problems working with pre-Audigy cards.
* Remove EMUDEBUG [un]def. This should be done in the Makefile.obrien2004-01-111-1/+0
|
* Sync with Creative's 8010.h rev 1.51.obrien2004-01-091-0/+7
|
* The last argument to mtx_init() should be MTX_DEF, not 0. This is not atruckman2003-12-082-2/+2
| | | | functional change since MTX_DEF happens to be defined as 0.
* Fix some locking violations by creating seperate mutex classesmatk2003-12-051-3/+6
| | | | | | | for play and record channels. Approved by: seigo (mentor) Approved by: scottl (re)
* Fix a panic due to holding a lock over calls to uiomove.matk2003-11-273-30/+39
| | | | | | | Pointed out by: Artur Poplawski Explained by: Don Lewis (truckman) Approved by: tanimura (mentor) Approved by: scottl (re)
* Add ID for ALC658 CODEC.kuriyama2003-11-111-0/+1
| | | | | Tested on: GIGABYTE GA-8S655FX-L Reviewed by: orion
* Fix sound LOR problems:scottl2003-11-113-108/+113
| | | | | | | | | | | | | | | | 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
* - Implement selwakeuppri() which allows raising the priority of atanimura2003-11-092-3/+3
| | | | | | | | | | | | | thread being waken up. The thread waken up can run at a priority as high as after tsleep(). - Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities. - Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs. Not objected in: -arch, -current
* Don't attempt to destroy the driver mutex when it hasn't yetdeischen2003-10-291-1/+1
| | | | | | been created. This has been sitting in my local tree for far too long; I can't believe noone else has come across this yet.
* Recognize the Avance Logic ALC655 codec found on some ICH4/5-baseddes2003-10-121-0/+1
| | | | | | | | motherboards, such as the Gigabyte I848P. PR: kern/54176 Submitted by: Chris Keladis <chris@cmc.optus.net.au> Forgotten by: orion
* A couple of months' worth of back-burner hacking: restructure to betterdes2003-10-122-89/+189
| | | | | handle the minor (but significant) differences between the various Vortex chips; add (incomplete) support for playback.
* Fixed world breakage in previous commit. Somehow the wrong include wasbde2003-09-171-1/+1
| | | | removed in the world although the correct one was removed in the universe.
* Don't include another driver's private reg.h file (sioreg.h). Includingbde2003-09-162-2/+0
| | | | ns16550.h is now sufficient.
* Correctly reset ich[3-5] sound cards on resume. This fixes audio playbacknjl2003-09-151-0/+30
| | | | | | | | | | | after suspend/resume for me. PR: Submitted by: iwasaki Reviewed by: orion Approved by: cg Obtained from: MFC after:
* update my email address.cg2003-09-0736-37/+37
|
* Recognize the sound chip on the Opteron-based nForce3 motherboardsobrien2003-09-031-0/+4
| | | | (such as the Asus SK8N).
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-0219-41/+41
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Add Creative SB AudioPCI CT4730 rev A.orion2003-08-291-2/+18
| | | | | Submitted by: David Xu <davidxu@FreeBSD.org> PR: kern/54810
* Add Creative EV1938.orion2003-08-291-0/+2
| | | | | Submitted by: David Xu <davidxu@FreeBSD.org> PR: kern/54810
* Add sound support for the AMD64 8111 chip.obrien2003-08-281-0/+4
| | | | | PR: kern/55932 Submitted by: Mark Kettenis <kettenis@chello.nl>
* When present use ogain instead of master for surround sound channels.orion2003-08-231-14/+14
| | | | | | The latter has lead to reports of broken audio. Do not swap ogain and master when headphones detected.
* 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)
* Fix an off-by-one error in feed_monotostereo16() that caused theiedowse2003-08-231-1/+1
| | | | | | | | first sample in the buffer to be ignored. The bug caused a repetitive glitch in one of the stereo channels when playing mono sound on configurations that use the monotostereo16 feeder. Reviewed by: orion
* Prefer new location of pci include files (which have only been in theimp2003-08-2221-43/+43
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Additional VT1616 id.orion2003-08-211-1/+1
| | | | Submitted by: Greg Lewis
* Apply Rudolf Cejka's patch for:orion2003-08-212-47/+42
| | | | | | | | | | | | o AD1980 hook. o ac97_fix_auxout. and: o Associate AC97_MIX_AUXOUT with SOUND_MIXER_OGAIN rather than SOUND_MIXER_MONITOR. o Add ac97_fix_tone to remove tone controls from mixer if invalid.
* Add patch for AD198x.orion2003-08-212-0/+7
| | | | Submitted by: Oleg Sharoiko, Rudolf Cejka.
* handle locking when creating or destroying vchans bettercg2003-08-182-38/+104
|
* try to make really sshort sounds actually playcg2003-08-181-16/+43
|
* modify commentscg2003-08-151-3/+11
|
* disable resume code implementing panic().cg2003-08-141-1/+6
| | | | this needs to be reimplemented properly.
* Switch from legacy to native mode for ICH4 and ICH5.orion2003-08-102-21/+22
| | | | | | | Submitted by: Shin-ichi YOSHIMOTO <yosimoto@waishi.jp> Test by: Markko Merzin <markko@short.cut.ee> PR: kern/53242 MFC after: 5 days
* Change gcc-specific aggregate initialization member specifiersdds2003-08-052-12/+12
| | | | | | | into C9X initializer designators. Reviewed by: schweikh (mentor) MFC after: 4 weeks
* * add a function to display a complete feeder chain on the console, forcg2003-07-072-1/+18
| | | | | | | | | debugging. * set the parent of non-format feeders, so that sndstat doesn't miss out things like feeder_rate. MFC: 1 week
* * support ich5cg2003-07-061-9/+14
| | | | | | | PR: kern/53242 Submitted by: Shin-ichi Yoshimoto <yosimoto@waishi.jp> (partly) Tested by: Dominic Marks <dom@cus.org.uk> (version in PR) MFC after: 1 week
* * add support for amd-768 audio, as used on many dual athlon boards. onlycg2003-07-061-19/+23
| | | | | | | | | | | tested for playback. * modify device name strings for ich chips to better conform with their common names. * remove superflous 'AC97 controller' from nforce device names. MFC after: 1 week
* Mega busdma API commit.scottl2003-07-0124-28/+56
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Set a lower bound on fragment size rather than returning a failuremdodd2003-06-261-4/+2
| | | | | | | when the user specifies a maximum fragment size < 2. This is the behavior that Linux provides and fixes the problem I've observed in Tribes2 where sounds effects are delayed by 1/2 a second.
* Add (but do not connect) a half-finished driver for Aureal Vortex cards.des2003-06-012-0/+811
| | | | The mixer works, pcm support is half done.
* Fix lock order reversal when opening device and chn_reset fails.orion2003-05-011-5/+4
| | | | | Submitted by: Jan-Espen Pettersen <sigsegv@leakingmemory.org> Tested by: Georg Funk <georgfunk@web.de>
OpenPOWER on IntegriCloud