Age | Commit message (Collapse) | Author |
|
feedback and ok jmc@ miod, ok millert@
|
|
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
|
|
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
|
|
1st edition of Kernighan and Ritchie's The C Programming Language, to
that of the parameter-type-list form described in the ANSI X3.159-1989
standard.
In ISO/IEC 9899:2023 drafts, there is only one form of function definition.
"N2432 Remove support for function definitions with identifier lists".
ok kettenis@
|
|
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@
|
|
This happens on the new 14" and 16" Macbook Pro where we deliberately use
a framebuffer that skips the first few lines to avoid "the notch".
The offset of the first pixel is added to struct wsdisplay_fbinfo. The
stride is added as well, mirroring the value returned by the
WSDISPLAYIO_LINEBYTES ioctl, such that we can retire that one in the
future. A compat ioctl is implemented to help the transition. The compat
code will be removed after OpenBSD 7.3 has been released.
ok miod@
|
|
Also remove unneeded includes of <sys/poll.h> and <sys/select.h>.
Some addenda from jsg@.
OK miod@ mpi@
|
|
ok mpi@ ratchov@ "More const is good" deraadt@
|
|
ok miod@
|
|
unused but intended to be used to correlate audio and wskbd devices.
ok ratchov@
|
|
ok miod@
|
|
feedback and ok tb@ jmc@ ok ratchov@
|
|
ok patrick@
|
|
"new" API.
ok dlg@ tobhe@
|
|
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@
|
|
ok kettenis@
|
|
Remove the tick conversion stuff and use timeout_add_msec(9) directly.
Compile-tested by kn@.
ok kn@
|
|
With input from kn@.
Compile-tested by kn@.
ok kn@
|
|
ok kn@
|
|
All callers sleep indefinitely.
With help from visa@.
ok visa@, ratchov@, kn@
|
|
them.
OK otto@ deraadt@
|
|
ok guenther@ tb@ deraadt@
|
|
The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.
No objection from millert@, ok tedu@, bluhm@
|
|
ok krw@ mpi@
|
|
ok deraadt@ krw@
|
|
|
|
this means packets are consistently counted in one place, unlike the
many and various ways that drivers thought they should do it.
ok mpi@ deraadt@
|
|
as upper layers calls it with AUDIO_ENCODING_ULINEAR_{LE,BE} only.
|
|
|
|
methods from all audio drivers and from the audio_if structure as they
are never called.
|
|
|
|
|
|
all the local ones to ``nticks''.
ok stefan@, deraadt@
|
|
Compile test and ok tobiasu@
|
|
drivers still set IFF_NOTRAILERS while others do not. Remove all usage of
the flag from the drivers which in ancient times used it (and the modern
drivers which blindly copied it from those drivers of yore).
suggested by guenther. ok mpi
|
|
dequeueing a packet, then drop the packet if it can't be sent, rather than
using two phase dequeue then commit.
Adjust sc_tx_cnt using atomic operations, take the kernel lock before
calling gem_start or gem_init from the interrupt handler, and use an
interrupt barrier when taking the interface down.
With all this done, we can mark the interrupt handler for pci (but not sbus)
attached gem(4) as mpsafe.
mpi@ wrote this initially, I fixed bugs to keep sparc64 happy and kept it up
to date with ifq changes.
ok mpi@ dlg@
|
|
|
|
there are two things shared between the network stack and drivers
in the send path: the send queue and the IFF_OACTIVE flag. the send
queue is now protected by a mutex. this diff makes the oactive
functionality mpsafe too.
IFF_OACTIVE is part of if_flags. there are two problems with that.
firstly, if_flags is a short and we dont have any MI atomic operations
to manipulate a short. secondly, while we could make the IFF_OACTIVE
operates mpsafe, all changes to other flags would have to be made
safe at the same time, otherwise a read-modify-write cycle on their
updates could clobber the oactive change.
instead, this moves the oactive mark into struct ifqueue and provides
an API for changing it. there's ifq_set_oactive, ifq_clr_oactive,
and ifq_is_oactive. these are modelled on ifsq_set_oactive,
ifsq_clr_oactive, and ifsq_is_oactive in dragonflybsd.
this diff includes changes to all the drivers manipulating IFF_OACTIVE
to now use the ifsq_{set,clr_is}_oactive API too.
ok kettenis@ mpi@ jmatthew@ deraadt@
|
|
|
|
|
|
ok dlg@
|
|
|
|
|
|
This changes numbers of the SIOCSIFMEDIA and SIOCGIFMEDIA ioctls and
grows struct ifmediareq.
Old ifconfig and dhclient binaries can still assign addresses, however
the 'media' subcommand stops working. Recompiling ifconfig and dhclient
with new headers before a reboot should not be necessary unless in very
special circumstances where non-default media settings must be used to
get link and console access is not available.
There may be some MD fallout but that will be cleared up later.
ok deraadt miod
with help and suggestions from several sharks attending l2k15
|
|
initializing variables before they get used.
|
|
ok bluhm@, claudio@, dlg@
|
|
Note that pseudo-drivers not using if_input() are not affected by this
conversion.
ok mikeb@, kettenis@, claudio@, dlg@
|
|
|
|
ok krw@ miod@
|
|
not available to programs anyway.
|