| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- `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
|
| |
|
|
|
|
|
|
|
|
| |
rid of the MTX_DUPOK flag on channel mutexes, which allows witness to
do a better job of lock order checking. Nuke snd_chnmtxcreate() since
it is no longer needed.
Tested by: matk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
link-list of dev_t's with named variables. Remove used code.
Approved by: tanimura (mentor)
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
functional change since MTX_DEF happens to be defined as 0.
|
| |
|
| |
|
|
|
|
| |
Approved by: trb
|
|
|
|
| |
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
|
|
|
|
|
|
|
|
|
| |
vchan creation doesn't lead to /dev entry creation if the new vchan is the
first child of a channel,
This fix a panic that happens when loading a sound driver module, creating
vchans and unloading the driver.
Approved by: cg
MFC after: 3 days
|
|
|
|
| |
Approved by: re
|
|
|
|
|
| |
Approved by: re
Reviewed by: orion
|
|
|
|
|
|
|
| |
destroyed and struct pcm_channel freed.
Reviewed by: cg
MFC after: 3 days
|
|
|
|
| |
sndstat output after removing uaudio.
|
|
|
|
| |
courtesy of fenner).
|
|
|
|
|
|
|
|
|
|
| |
has been specified through /boot/loader.conf as opposed to setting it
in /etc/sysctl.conf. Only PCMDIR_PLAY channel can be used as a parent
of virtual channel. Do not initialize a new vchan for a given physical
channel if other physical channel already has one created.
PR: 31597
Approved by: obrien (mentor)
|
|
|
|
|
| |
PR: kern/40157
Submitted by: Dan Lukes <dan@obluda.cz>
|
|
|
|
| |
now objects to (as it should, it is not legal C).
|
| |
|
|
|
|
| |
passed to mtx_init().
|
|
|
|
|
|
|
|
|
|
| |
* be more specific in verbose boot messages
* allow the feeder subsystem to veto pcm* attaching if there is an error
initialising the root feeder
* don't free/malloc a new tmpbuf when resizing a snd_dbuf to the same size as
it currently is
* store the feeder description in the feeder structure instead of mallocing
space for it
|
|
|
|
|
| |
Approved by: cg (in principle)
MFC after: 2 weeks
|
|
|
|
| |
reading the feeder sourcecode
|
| |
|
|
|
|
|
| |
add method for retrieving "buffersize" hints for pcm devices, adjusted for
specified minimum, maximum and default values.
|
|
|
|
|
|
|
|
|
|
|
| |
no longer possible to unload the driver module while sound is playing
(which resulted in a panic).
- Fix a similar problem with the sndstat device that I found while looking
at the above.
- Append a newline character to error messages in pcm_unregister()
Reviewed by: cg
MFC after: 10 days
|
|
|
|
|
| |
one hardware record channel. new devices, /dev/dsprX.Y where X is unit
number and Y is channel index.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
only define INTR_TYPE_AV if it is not already defined.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
if a device has vchans already but they are all busy, allocate another one
at open() time, up to a maximum of hw.snd.maxvchans.
when creating/destroying vchans, don't make/remove a devnode for the
first/last one as it replaces a hardchan.
|
|
|
|
|
| |
n > 0, n vchans will be assigned to any devices that subsequently register
with a single playback channel.
|
|
|
|
| |
add spls so this code will work on 4.x
|
| |
|
|
|
|
|
|
| |
cycling channel numbers.
remove unused fields from struct snddev_info.
|
|
|
|
|
|
|
|
|
| |
1: most drivers are sensitive to timing, and
2: the handlers are MPSAFE and need a chance to get into the kernel
before some other non-mpsafe handler blocks the ithread on Giant in
shared irq cases.
Reviewed by: cg (in principle)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
PR: kern/28084
|
|
|
|
|
| |
does not provide a struct sbuf, sbuf_new(9) will allocate one and return
a pointer to it.
|
|
|
|
|
|
|
| |
around, use a common function for looking up and extracting the tunables
from the kernel environment. This saves duplicating the same function
over and over again. This way typically has an overhead of 8 bytes + the
path string, versus about 26 bytes + the path string.
|
|
|
|
|
|
| |
implement setblocksize for vchans
don't panic when doing certain ioctls or aborting on a vchan
xmms now works with vchans
|
|
|
|
|
| |
and I botched testing. This is a perfect example of how NOT to do
this sort of thing. :-(
|
|
|
|
|
| |
SYSCTL_*() macros. TUNABLE_INT_DECL() was an odd name because it didn't
actually declare the int, which is what the name suggests it would do.
|