History log of /openbsd/sys/dev/pci/emuxki.c (Results 1 – 25 of 61)
Revision Date Author Comments
# cc5bdd41 26-Oct-2022 kn <kn@openbsd.org>

Make audio(9) get_props() optional, remove it from duplex drivers

The property bits of audio(9) are obsolete and ought to be removed
completely.

sys/dev/audio.c:audio_open() currently uses get_prop

Make audio(9) get_props() optional, remove it from duplex drivers

The property bits of audio(9) are obsolete and ought to be removed
completely.

sys/dev/audio.c:audio_open() currently uses get_props() to bail out if
read *and* write was requested on a non-duplex driver.

Drivers that currently support playing but not recording need adjustment
before the API can be cleaned up.

Drivers that advertise themselves as full duplex, i.e. those that always
return AUDIO_PROP_FULLDUPLEX unconditionally in their get_props() currently
always succeed this check.

As this is the only property, losen audio_open()'s DIAGNOSTIC check and only
do the duplex check if the driver provides get_props().

This allows for simple removal of get_props() from full-duplex drivers
without adding any other code or without changing functionality.

This includes all audio drivers under sys/dev/pci/ (maestro(4) being the
only unfinished exception here).

Other drivers as well as the API change can then follow in smaller diffs.

This builds on amd64, arm64, i386, macppc and sparc64.
amd64 with azalia(4) still plays, records as well as plays and records
at the same time on my X230 as tested with

$ aucat -i play.wav [-o rec.wav]

alpha and hppa tests by miod
OK ratchov miod

show more ...


# 5a8d990a 19-Oct-2022 kn <kn@openbsd.org>

Use C99 struct init for struct audio_hw_if

This audio(9) struct will lose a member, but drivers init their struct quite
inconsistently, most pre-C99 style.

Use C99 style everywhere, to get rid of a

Use C99 struct init for struct audio_hw_if

This audio(9) struct will lose a member, but drivers init their struct quite
inconsistently, most pre-C99 style.

Use C99 style everywhere, to get rid of all annoying differences and allow
for easy member removals/additions:
- don't change current order of members
- no explicit NULL members
- no comments or blank lines
- trailing comma in last member line

GENERIC.MP builds fine with this on arm64, amd64, i386 and sparc64.

macppc and alpha build-tested by miod
OK ratchov miod

show more ...


# 18b10ac7 18-Oct-2022 kn <kn@openbsd.org>

Remove unused AUDIO_PROP_{MMAP,INDEPENDENT}

AUDIO_PROP_FULLDUPLEX is the only audio(9) in use, the other two died with
commit 1cf2860827c8ca659d8097d8da94a5ae5b888c53
Author: ratchov <ratchov@open

Remove unused AUDIO_PROP_{MMAP,INDEPENDENT}

AUDIO_PROP_FULLDUPLEX is the only audio(9) in use, the other two died with
commit 1cf2860827c8ca659d8097d8da94a5ae5b888c53
Author: ratchov <ratchov@openbsd.org>
Date: Thu Jun 25 06:43:45 2015 +0000

Reimplement the audio driver in a simpler way, removing unused/unusable
functionality. Same API and ABI except for the removed bits and no
behaviour change for programs using libsndio. With help from armani@
and mpi@, thanks.

but remained defined and set in drivers.

and the following merely moved them when they were dead code already:

commit 9215aa3dfad387bca877a805534df6dcfe8722eb
Author: ratchov <ratchov@openbsd.org>
Date: Wed Aug 31 07:22:43 2016 +0000

Delete unused ioctls and associated macros. Move macros that are still
used internally by low-level drivers from sys/audioio.h to
dev/audio_if.h instead of deleting them.

None of this is used in base or ports; codesearch.debian.net only shows
AUDIO_PROP_{CAPTURE,PLAYBACK} in firefox-esr, mozjs and cubeb.

ratchov points out that audio_if.h and audioio.h are private interfaces
and the codesearch shows SunOS and NetBSD bits (#ifdef'd out on OpenBSD).

OK ratchov

show more ...


# 0d6a2fde 21-Mar-2022 miod <miod@openbsd.org>

Constify struct {audio,midi,radio,video}_hw_if. No functional change.

ok mpi@ ratchov@ "More const is good" deraadt@


# 8d2c75e4 11-Mar-2022 mpi <mpi@openbsd.org>

Constify struct cfattach.


# 2baa08e2 16-Feb-2022 anton <anton@openbsd.org>

Make room for a cookie argument passed to audio_attach_mi(). Currently
unused but intended to be used to correlate audio and wskbd devices.

ok ratchov@


# 4b1a56af 09-Jan-2022 jsg <jsg@openbsd.org>

spelling
feedback and ok tb@ jmc@ ok ratchov@


# 1e358671 17-Jun-2020 mortimer <mortimer@openbsd.org>

Do not do logical negation of a bitshifted field.

Prompted by warning from clang 10.

ok patrick@


# b5a441dc 13-Sep-2018 miko <miko@openbsd.org>

clarify that config_activate_children() is called unconditionally in *activate().

ok ratchov@


# b27348b2 08-Sep-2017 deraadt <deraadt@openbsd.org>

If you use sys/param.h, you don't need sys/types.h


# 56fd3f56 19-Sep-2016 ratchov <ratchov@openbsd.org>

Remove unused getdev() audio driver functions.


# 7cb42e31 14-Sep-2016 ratchov <ratchov@openbsd.org>

Remove drain(), query_encoding(), mappage() and get_default_params()
methods from all audio drivers and from the audio_if structure as they
are never called.


# c396a5fe 11-Aug-2015 ratchov <ratchov@openbsd.org>

Don't inline long functions as this tends to increase object size
with no benefit.

ok millert, "correct" deraadt


# ac2bb4f3 11-May-2015 ratchov <ratchov@openbsd.org>

Remove all audio format conversion code from the kernel (btw holding
the kernel_lock), as we already do better conversions in
user-mode. Yet, no need for every single driver to fiddle with the
conver

Remove all audio format conversion code from the kernel (btw holding
the kernel_lock), as we already do better conversions in
user-mode. Yet, no need for every single driver to fiddle with the
conversion code as they are done transparently by common MI code. With
help from armani and miod, support from mpi

ok armani@

show more ...


# 21dab745 14-Mar-2015 jsg <jsg@openbsd.org>

Remove some includes include-what-you-use claims don't
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.

ok tedu@ deraadt@


# 9f6fb5c7 13-Jul-2014 deraadt <deraadt@openbsd.org>

Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishian
ok tedu


# df2ac69f 12-Jul-2014 tedu <tedu@openbsd.org>

add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.


# 37ecb596 06-Dec-2013 deraadt <deraadt@openbsd.org>

Add a DVACT_WAKEUP op to the *_activate() API. This is called after the
kernel resumes normal (non-cold, able to run processes, etc) operation.
Previously we were relying on specific DVACT_RESUME op

Add a DVACT_WAKEUP op to the *_activate() API. This is called after the
kernel resumes normal (non-cold, able to run processes, etc) operation.
Previously we were relying on specific DVACT_RESUME op's in drivers
creating callback/threads themselves, but that has become too common,
indicating the need for a built-in mechanism.
ok dlg kettenis, tested by a sufficient amount of people

show more ...


# 2fbb9e0d 23-Jun-2013 brad <brad@openbsd.org>

Remove unsigned comparison < 0.

Pointed out by LLVM.

ok ratchov@


# 61932e14 24-May-2013 ratchov <ratchov@openbsd.org>

Since audio code is mp safe, establish isa and pci audio interrupts
with the IPL_MPSAFE flag. In certain circumstances, this prevents
interrupt handlers from waiting the global kernel_lock possibly (

Since audio code is mp safe, establish isa and pci audio interrupts
with the IPL_MPSAFE flag. In certain circumstances, this prevents
interrupt handlers from waiting the global kernel_lock possibly (hold
by slower code) to be released.

ok kettenis

show more ...


# 886882aa 15-May-2013 ratchov <ratchov@openbsd.org>

Introduce a global interrupt-aware mutex protecting data
structures (including sound-card registers) from concurent
access by syscall and interrupt code-paths. Since critical
sections remain the same

Introduce a global interrupt-aware mutex protecting data
structures (including sound-card registers) from concurent
access by syscall and interrupt code-paths. Since critical
sections remain the same, calls to splraise/spllower can be
safely replaced by calls to mtx_enter/mtx_leave with two
exceptions: (1) mutexes are not reentrant (the inner splraise
is thus removed), and (2) we're not allowed to sleep with a
mutex (either msleep is used or the mutex is released before
sleeping).

ok and help from kettenis, a lot of work from armani

show more ...


# 0b1c7607 03-Jul-2011 matthew <matthew@openbsd.org>

Remove config_activate() and DVACT_ACTIVATE. PCMCIA's the only thing
that's ever used it, and it's long since been changed to use
DVACT_{QUIESCE,SUSPEND,RESUME} instead.

ok deraadt@, dlg@; miod@ al

Remove config_activate() and DVACT_ACTIVATE. PCMCIA's the only thing
that's ever used it, and it's long since been changed to use
DVACT_{QUIESCE,SUSPEND,RESUME} instead.

ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it
up a few weeks ago

show more ...


# e6ca3d0d 17-Jun-2011 mk <mk@openbsd.org>

M_WAITOK cleanup of two cases:

1) Allocating with M_WAITOK, checking for NULL, and calling panic() is
pointless (malloc() will panic if it can't allocate) so remove the check
and the call.

2) Alloc

M_WAITOK cleanup of two cases:

1) Allocating with M_WAITOK, checking for NULL, and calling panic() is
pointless (malloc() will panic if it can't allocate) so remove the check
and the call.

2) Allocating with M_WAITOK, checking for NULL, and then gracefully
handling failure to allocate is pointless. Instead also pass M_CANFAIL
so malloc() doesn't panic so we can actually handle it gracefully.

1) was done using Coccinelle.

Input from oga.

ok miod.

show more ...


# 299fb045 03-Apr-2011 jasper <jasper@openbsd.org>

use nitems(); no binary change for drivers that are compiled on amd64.

ok claudio@


# 16db9b43 12-Sep-2010 jakemsr <jakemsr@openbsd.org>

silly me. use the switch() variable, not the case value.


123