Age | Commit message (Collapse) | Author |
|
|
|
Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.
Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.
OK mpi@
|
|
Assert that the KERNEL_LOCK() has to be held before grabbing `audio_lock'
to prevent lock ordering issues inside selwakeup().
ok visa@, ratchov@
|
|
ok mpi
|
|
ok deraadt
|
|
|
|
selwakeup() was called in the interrupt handler, i.e. with the
audio_lock held. We can't just grab the KERNEL_LOCK needed by
selwakeup(), because locks would be taken in the wrong order. Solve
this by defering selwakeup() calls to a softintr, called with the
KERNEL_LOCK held.
Mostly from mpi@, ok mpi@.
|
|
Whenever a "mixer" control is changed by a program or with volume
keys, its index may be read from the /dev/audioctlN device using
the read(2) syscall. Only one reader at a time is allowed.
|
|
The audio_mixer_{read,write} names are misleading: these functions are
not the methods of the read and write syscalls. No object change.
|
|
ok ratchov@
|
|
ok ratchov@
|
|
buffer size instead of failing. Problem found and fix tested
by Joe Davis <me at jo.ie>, thanks!
|
|
The first sets the block size in frames, which is necessarily common
to play and recording directions no matter the number of channels. The
second sets the number of blocks per buffer for the given
direction. Together, these two functions allow audio drivers to easily
set the block size, matching both playback and recording constraints.
The round_blocksize() didn't allow to do so because it returns the
block size in *bytes*. Since the driver doesn't know if it's called
for the play or for the record block size, it's impossible to
calculate the block size in all cases if play and record number of
channels are different.
ok mpi@
|
|
As the audio_buf structure is per-direction, this makes play and
recording code similar. No behavior change.
|
|
Makes the code easier to read, no behabior change.
|
|
Allows playback to start automatically as soon as there's enough data,
even if the AUDIO_START ioctl is not called. This is mainly useful to
quickly test & debug low level drivers with simple shell commands.
|
|
using bounce buffers. In this case, hardware underruns are managed
by the driver on the bounce buffers, not the audio ring buffer.
|
|
using bounce buffers, like the uaudio(4) driver.
ok mpi
|
|
already scheduled and whether we have to unref the device ourselves.
ok tedu@, ratchov@
|
|
ok anton
|
|
is void* so no need to cast; ok ratchov@
|
|
enum, sets, and values. This is simpler and less error prone. This
fixes the record.enable elements replacing the last few hardware
mixer controls.
Help from Laurence Tratt, tested by landry@
|
|
knob to take the new "sysctl" value, which is the default. In this
case, the device behavior is determined by the new "kern.audio.record"
sysctl(2), which defaults to zero.
ok florian
|
|
is disabled, the device records silence. The control may be modified
only by root and defaults to "off", ie. recording is disabled by
default.
ok florian, deraadt
|
|
use it during suspend/resume. Remove driver-specific mixer
save/restore bits that don't need to be duplicated in every
low-lever driver.
ok mpi
|
|
ring read pointer from wrapping, in turn allowing the process to read
past the ring boundaries.
ok deraadt@
|
|
Michael W. Bombardieri, thanks.
|
|
whether the device is started before using structures shared with the
interrupt handler. From Michael W. Bombardieri, tested by me.
|
|
From Michael Bombardieri, thanks.
|
|
From Jan Stary <hans at stare.cz>, thanks.
|
|
|
|
Michael W. Bombardieri <mb at ii.net>. Thanks.
|
|
drivers nor exposed to user-land. Remove definitions and code to
handle convertions.
|
|
From Michael W. Bombardieri. Thanks.
|
|
|
|
Michael W. Bombardieri <mb at ii.net>. Thanks
|
|
about buffer parameters. No behaviour change.
|
|
large data structure and if the compiler gets clever and inlines some code
we hit the stack size compiler warning. This makes things compile with clang.
ok ratchov@
|
|
device, and factor it into a single function. Without this fix, if the
device is open in full-duplex mode, it could start with empty play
buffer.
|
|
telling the audio subsystem about this later on in boot. (Mute state
is maintained by the BIOS over a suspend, hibernate, reboot, etc -- this
may be last missing piece of the puzzle we tore our hair out in Brisbane)
diagnosis and code by Anton Lindqvist, ok ratchov
|
|
|
|
methods from all audio drivers and from the audio_if structure as they
are never called.
|
|
used internally by low-level drivers from sys/audioio.h to
dev/audio_if.h instead of deleting them.
|
|
|
|
It's intended for use with diagnostic tools (like audioctl) and is of
no use to audio programs.
|
|
Fushicai USBTV007 chip.
The chip specific code has been written by Lubomir Rintel and Federico
Simoncelli. Patrick Keshishian has ported it to OpenBSD and wrote the
remaining code based on uvideo(4).
Input and help also from mpi@ and ratchov@.
ok mpi
|
|
bytes) then, adjust the block size accordingly. Fixes zaudio(4) not
starting when large blocks are requested. Found and reported by
Andre Smagin <as at smagin.com>, thanks.
|
|
block size multiplier (in bytes) and for the driver block size
multiplier (in frames). No behaviour change.
|
|
set and get parameters. This is much simpler.
ok semarie, armani, tweaks from jmc
|
|
|