Age | Commit message (Collapse) | Author |
|
ok jmc@ guenther@ tb@
|
|
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
|
|
sbdsp.c r1.42 "Replace audio(9) get_props() with duplex check in open()
in partial duplex drivers" added it to the wrong function.
|
|
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
|
|
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
|
|
Each only used one for a printf() call in *_attach().
Seen while tweaking their *_hw_if struct.
OK gnezdo ratchov
|
|
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
|
|
c99 6.11.5:
"The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature."
ok miod@ tb@
|
|
|
|
ok krw@
|
|
ok miod@
|
|
|
|
ok mpi@ ratchov@ "More const is good" deraadt@
|
|
net/if_pppx.c pointed out by jsg@
ok gnezdo@ deraadt@ jsg@ mpi@ millert@
|
|
unused but intended to be used to correlate audio and wskbd devices.
ok ratchov@
|
|
feedback and ok tb@ jmc@ ok ratchov@
|
|
|
|
shows gains up to 50%) by skipping attach of irrelevant devices, which are
tagged CD_SKIPHIBERNATE in the per-driver cfdriver. In particular, usb devices
are not attached, so they don't need to detach during the suspend-unpack-resume.
New bootblocks are required (which tell the kernel it's job is unhibernate
before configure runs)
tested by various
|
|
|
|
|
|
member of 'struct scsi_xfer' has always been pointed at the 'struct scsi_generic
cmdstore' member of the same instance. So nuke 'cmdstore' and remove the '*'
from cmd. Take the address of cmd as required by the various casts.
No intentional functional change.
luna88k test by aoyama@, sparc64 test by jmatthew@
Identification of 2009's last *cmd use and ok jmatthew@
|
|
|
|
This e.g. makes the driver also work on iMac11,2.
ok kettenis@, jung@
|
|
OK deraadt@, mpi@
|
|
uses in drivers.
Use WDSDEBUG sections like the rest of the debug output. Fix some printf()
format problems that were missed in the previous sweep.
|
|
driver successfully compiles on one or more of amd64, i386, hppa.
|
|
fields to struct scsibus_attach_args. Nuke the struct scsi_link *
(saa_sc_link) in scaibus_attach_args.
Explicitly initialize each field in scsibus_attach_args variables.
|
|
adapter_buswidth, adapter_softc) from struct scsi_link to struct
scsibus_attach_args.
Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
|
|
In sparc64 autoconf access 'luns' via sb_luns and 'adapter_buswidth'
via sb_adapter_buswidth.
Removes last post-config uses of the copies of bus related
information in scsi_link.
|
|
statement. All to make upcoming diff(s) smaller and easier to read.
|
|
ok dlg@ tobhe@
|
|
"new" API.
ok dlg@ tobhe@
|
|
|
|
immediately before initializing the only field in the struct.
|
|
miod explained it was initially a long as it was thought drivers may
need to allocate storage but in practice they don't need more than
32 bits for an attribute.
suggested and reviewed by miod@
|
|
Suggested by John Carmack. miod agrees a rename would make sense and
explained it was initially thought drivers may need to allocate storage
but in practice they don't need more than 32 bits for an attribute.
ok mpi@
|
|
In pcppi(4), convert from ticks to milliseconds.
While we're doing this, we can also convert spkr(4), too.
The spkr(4) conversion from ticks to milliseconds is trickier because
the driver is written with musical intervals (whole notes, quarter
notes, etc.), not the typical units (seconds, milliseconds, etc.) used
in most software.
I think the conversion is correct... but the code is a challenging
read, so it might be subtly incorrect.
ratchov@ intends to move spkr(4) into the attic sometime soon so I
doubt it matters much if I got it wrong.
Input from schwarze@, jsg@, and ratchov@.
Tested by schwarze@.
ok ratchov@
|
|
uio.uio_resid is a size_t, not an int. Change the format string
accordingly.
|
|
wds_minphys() is just duplicating what minphys() will do. Nuke it.
|
|
With input from miod@.
No complaints on tech@ after a month.
|
|
inducing. Rename scsi_adapter member 'scsi_minphys' to 'dev_minphys'
to reflect what it is supposed to do. Use consistent naming convention
(<dev>_minphys) for the actual device functions.
No functional change.
|
|
system minphys(). scsi_minphys() will do that and cd/sd/st will call
scsi_minphys().
ok jmatthew@ as part of larger diff
|
|
ok tedu@ krw@ deraadt@
|
|
in drivers. Terse one liners, NULLs instead of 0's, explicitly specify
all members, etc.
Nuke #ifdef notyet blocks related to the scsi_adapter in aic.
No intentional functional change.
ok tedu@
|
|
ok deraadt
|
|
ok kn@
|
|
|
|
From Joe Gidi.
|
|
ok tedu@
|
|
are later passed to timeout_add() which panics if the given ticks are
negative. While here, clamp arguments in pcppi_bell() in order to
prevent overflow.
ok visa@
Reported-by: syzbot+23089c40a85aa70bed6f@syzkaller.appspotmail.com
|