1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-04 23:35:36 -08:00
Commit Graph

15 Commits

Author SHA1 Message Date
ratchov
4aaef610e0 sndio: Add a display string to the sioctl_open API
For hardware devices, add a server.device control
with a single item and the device name as display
string.

Add the necessary sndioctl(1) bits to print it.
2024-05-24 15:10:26 +00:00
ratchov
ec8a3410fb Add sio_flush(3) function to stop playback immediately
The new sio_flush(3) functions works the same way as sio_stop(3),
except that it doesn't wait for play buffer to be drained. Instead,
it discards its contents and returns immediately.
2022-04-29 08:30:48 +00:00
ratchov
4f3fcc3939 Allow switching between alternate devices (-F option) with sndioctl(1) 2020-06-28 05:21:38 +00:00
ratchov
49f67e12e9 Add a new SIOCTL_SEL control type to select one of a predefined set of
mutually exclusive values. It's the same as SIOCTL_LIST except that
exactly one list element may be selected.
2020-06-28 05:17:25 +00:00
ratchov
433bc80544 Fix comments about sioctl_desc's maxval field 2020-06-18 04:44:11 +00:00
ratchov
d07fece68e Add API to control audio device parameters exposed by sndiod.
The API exposes controls of modern audio hardware and sndiod software
volume knobs in a uniform way.  Hardware knobs are exposed through
sndiod.  Multiple programs may use the controls at the same time
without the need to continuously scan the controls.

For now sndiod exposes only its own controls and the master output and
input volumes of the underlying hardware (if any), i.e. those
typically exposed by acpi volume keys.

ok deraadt
2020-02-26 13:53:58 +00:00
ratchov
bde5d16205 Expose internal functions necessary to open audio devices and midi
ports using existing file descriptors.
2015-12-20 11:29:29 +00:00
espie
493ea52444 hex constants unsigned, prevents some gcc warnings
okay ratchov@
2012-08-22 08:56:46 +00:00
ratchov
7690362d6c Include sys/types.h rather than sys/param.h to pull BYTE_ORDER macros.
suggested by deraadt@
2012-07-08 17:55:50 +00:00
ratchov
9f9aa69f52 Make the "default" string a valid device name that has the same effect
as NULL has. This will (hopefully) simplify ports where the user
passes the device string.
2012-05-23 19:25:11 +00:00
ratchov
7207b06990 Use "unsigned int" rather than "unsigned". No object change.
suggested by deraadt@
2012-04-11 06:05:43 +00:00
ratchov
4c68e88197 make sio_onvol(3) return a integer exposing whether a volume knob
is available for the stream. As we're at it, remove macros and
functions that are neither used nor documented.
2010-11-06 20:25:42 +00:00
ratchov
bb957eee77 use const qualifier in libsndio, making it slightly more consistent
with open(2) and write(2) syscalls.
from Thomas Pfaff, jakemsr is fine with it
2009-07-25 11:27:14 +00:00
ratchov
6efede295b Currently midi capable programs can control midi hardware, but
cannot cooperate with other programs.  The aim of this change is
to allow any program to send midi data to other programs as they
were midi hardware. For instance, this change should solve the
longstanding problem of using a midi sequencer with software
synthesizers. More precisely:

 - new midicat(1) utility (actually hardlink to aucat(1)).
   it creates software midi thru boxes, allowing programs
   to send midi messages to other programs as they were
   midi(4) hardware.

 - new midi api in libsndio (see mio_open(3)), to access
   midi(4) devices and midicat(1) sockets in a uniform way.

 - new device naming scheme <service>:<unit>[.<option>],
   common to audio and midi.

 - new sndio(7) manual describing concepts and naming

The current audio device naming still works, but people having
scripts or configuration files containing device names could read
the sndio(7) man page and slowly start updating device names.

discussed with jakemsr@ and deraadt@, help form jmc@
2009-07-25 08:44:26 +00:00
ratchov
fcb16ac022 move src/lib/libsndio/sndio.h into src/include where other include
files leave.

requested by deraadt@, ok miod@
2009-04-21 19:14:33 +00:00