History log of /openbsd/sys/dev/isa/sbdsp.c (Results 1 – 25 of 44)
Revision Date Author Comments
# c8819f5d 02-Nov-2022 kn <kn@openbsd.org>

Remove audio(9) speaker_ctl(), let open() handle speakers where needed

Only five legacy half-duplex hardware drivers require this function to
change between playing and recording:
i386: ess(4), gus

Remove audio(9) speaker_ctl(), let open() handle speakers where needed

Only five legacy half-duplex hardware drivers require this function to
change between playing and recording:
i386: ess(4), gus(4), pas(4), sb(4)
luna88k: nec86(4)

If defined, it is always called early in audio_open(), so just move the
call from audio(4) to each hardware driver's open() handler.

SPKR_ON/OFF remain defined to leave driver-specific code unchanged.

Further cleanup (unchecked speaker_ctl() return values,
FWRITE -> AUMODE_PLAY -> SPKR_ON dances, etc.) can happen later.

Builds fine on i386.
OK ratchov

show more ...


# 88cdb168 30-Oct-2022 kn <kn@openbsd.org>

Move duplex check from sbdsp_midi_open() to sbdsp_open() where it belongs

sbdsp.c r1.42 "Replace audio(9) get_props() with duplex check in open()
in partial duplex drivers" added it to the wrong f

Move duplex check from sbdsp_midi_open() to sbdsp_open() where it belongs

sbdsp.c r1.42 "Replace audio(9) get_props() with duplex check in open()
in partial duplex drivers" added it to the wrong function.

show more ...


# f9485f68 28-Oct-2022 kn <kn@openbsd.org>

Replace audio(9) get_props() with duplex check in open() in partial duplex drivers

Make drivers which do *not* adverise AUDIO_PROP_FULLDPLEX return ENXIO
in their open() if full-duplex mode was requ

Replace audio(9) get_props() with duplex check in open() in partial duplex drivers

Make drivers which do *not* adverise AUDIO_PROP_FULLDPLEX return ENXIO
in their open() if full-duplex mode was requested.

This way, sys/dev/audio.c:audio_open() will fail immediately rather than
later through the to-be-removed get_props() check.

This is the first round for drivers with logic in their get_props(), i.e.
those that only support full-duplex mode for specific hardware:

ess(4), gus(4), pas(4) and sb(4)

All of these are i386/GENERIC only and share code through
sys/dev/isa/{ad1848,sbdsp}{.c,var.h} which are not used by any other kernel.

i386/GENERIC.MP builds and boots with this diff.
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 ...


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

spelling
feedback and ok tb@ jmc@ ok ratchov@


# 14124d57 07-Mar-2021 jsg <jsg@openbsd.org>

ansi


# 03604742 31-Dec-2019 mpi <mpi@openbsd.org>

Convert infinite sleeps to {m,t}sleep_nsec(9).

ok kn@


# 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.


# 1cf28608 25-Jun-2015 ratchov <ratchov@openbsd.org>

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

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.

show more ...


# 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 ...


# 7f58a11f 14-Sep-2014 jsg <jsg@openbsd.org>

remove uneeded proc.h includes
ok mpi@ kspillner@


# 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 ...


# f3db5e0d 30-Mar-2012 ratchov <ratchov@openbsd.org>

If the MIDI UART is not ready for output, don't spin at IPL_CLOCK;
just return and make the midi(4) driver retry later. UART buffers
are large enough for this, except eap(4) which uses interrupts for

If the MIDI UART is not ready for output, don't spin at IPL_CLOCK;
just return and make the midi(4) driver retry later. UART buffers
are large enough for this, except eap(4) which uses interrupts for
output.
help from and ok jsg@

show more ...


# 16579317 15-Jul-2010 jakemsr <jakemsr@openbsd.org>

add two new members to structs audio_encoding and audio_prinfo.
for both structs, the new members are 'bps' and 'msb', which
describe the number of bytes per sample and data alignment in the
sample,

add two new members to structs audio_encoding and audio_prinfo.
for both structs, the new members are 'bps' and 'msb', which
describe the number of bytes per sample and data alignment in the
sample, respectively. drivers must properly set these fields in
the 'query_encoding', 'set_parameters' and 'get_default_params'
hardware interface methods.

discussed with ratchov, deraadt

show more ...


# 04754779 03-Apr-2010 jakemsr <jakemsr@openbsd.org>

instead of returning EINVAL if an unsupported sample rate was
requested, just use a supported sample rate. makes paramter
negotiation much easier. problem noted and patch tested on
several sb(4) de

instead of returning EINVAL if an unsupported sample rate was
requested, just use a supported sample rate. makes paramter
negotiation much easier. problem noted and patch tested on
several sb(4) devices by J.C Roberts, thanks.

show more ...


# 6f56b5fe 31-Jul-2009 sthen <sthen@openbsd.org>

remove unused variable definition; unbreaks kernel build.
"do it" marco@


# b1faeb59 31-Jul-2009 blambert <blambert@openbsd.org>

timeout_add -> timeout_add_msec

ok jakemsr@


# 63d2e802 14-Jan-2008 jakemsr <jakemsr@openbsd.org>

return earlier if the device index is negative

ok ratchov


# 489c8cc1 05-Nov-2007 jakemsr <jakemsr@openbsd.org>

audio encoding conversion cleanup

- the endianness of the conversions don't depend on the endianness
of machine the conversions are built on, but the endianness of the
audio data itself. choose

audio encoding conversion cleanup

- the endianness of the conversions don't depend on the endianness
of machine the conversions are built on, but the endianness of the
audio data itself. choose encoding conversions explicitly, instead
of relying on #defines based on the endianness of the machine.
- replace home-grown conversions with comparable conversions in
auconv.c and mulaw.c
- use the proper conversion for ulinear_be:16 -> slinear_le:16 in
auixp(4)

thanks ajacoutot@ and sthen@ for !x86 testing

show more ...


# 3957c1c0 29-Dec-2006 pedro <pedro@openbsd.org>

Avoid void * arithmetic, okay deraadt@, suggestions from millert@


# e7e79399 15-Apr-2005 mickey <mickey@openbsd.org>

make sure aligment does not return zero block size


# 09fbfc43 09-Jan-2004 brad <brad@openbsd.org>

remove uvm_extern.h

tested on alpha, i386, powerpc, sparc64, m68k.

ok miod@


# 2627362d 27-Apr-2003 ho <ho@openbsd.org>

strcpy/sprintf cleanup of sys/dev. miod@, deraadt@ says to commit.


# c4071fd1 14-Mar-2002 millert <millert@openbsd.org>

First round of __P removal in sys


# 7e06754d 12-Feb-2002 fgsch <fgsch@openbsd.org>

accept sample rates <= highrate.


12