History log of /openbsd/usr.bin/sndiod/sock.c (Results 1 – 25 of 49)
Revision Date Author Comments
# 4d8b188f 24-May-2024 ratchov <ratchov@openbsd.org>

sndiod: Propagate the controls' display string to clients.

with help from edd@ and armani@


# 3e5ee6d4 24-May-2024 ratchov <ratchov@openbsd.org>

sndiod: Use a 'unsigned char *' for the pointer to the temp sock buffer


# d9a51c35 26-Dec-2022 jmc <jmc@openbsd.org>

spelling fixes; from paul tagliamonte
amendments to his diff are noted on tech


# ec8a3410 29-Apr-2022 ratchov <ratchov@openbsd.org>

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 discar

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.

show more ...


# 36355b88 01-Nov-2021 ratchov <ratchov@openbsd.org>

Stop binding audio devices exposed by sndiod to physical devices

This a shift towards a new model: clients connect to logical devices
(created with -s option) then the server routes data to/from the

Stop binding audio devices exposed by sndiod to physical devices

This a shift towards a new model: clients connect to logical devices
(created with -s option) then the server routes data to/from the
underlying physical device (registered with -f option). The binding
may be changed at run-time with the server.device control exposed by
sndioctl(1).

As audio devices exposed by sndiod(8) are not bound to fixed physical
devices anymore, the physical audio device number component of
sndio(7) descriptors was removed.

fixes, help from and ok denis, edd

show more ...


# 0e6be583 03-Mar-2021 ratchov <ratchov@openbsd.org>

sndiod: Move MTC/MMC state to its own global structure


# 5fb8f3c9 03-Mar-2021 ratchov <ratchov@openbsd.org>

sndiod: Move MIDI control endpoint to opt structure

No behavior change.


# 99580020 03-Mar-2021 ratchov <ratchov@openbsd.org>

sndiod: Move controls out of the device structure

Moving to a global server-wide controls list is necessary to expose
controls that are not associated to a particular device (ex. a device
selector).

sndiod: Move controls out of the device structure

Moving to a global server-wide controls list is necessary to expose
controls that are not associated to a particular device (ex. a device
selector).

The current hack to use the device-side sioctl_desc->addr variable as
client-side key can't work anymore. So, we use a unique dynamically
allocated ctl->addr key; this is much cleaner. A new "scope" enum
(with two "void *" arguments) is used to determine what the control
does control. This adds flexibility and allows to easily add new
control types that are not associated to devices.

No behavior change.

show more ...


# c67d5b9a 29-Jan-2021 ratchov <ratchov@openbsd.org>

Make audio clients use struct opt to reach the device

No behavior change. This decreases the number of explicit references
to the dev structure


# bb6cfcd4 29-Jan-2021 ratchov <ratchov@openbsd.org>

Make control clients use struct opt to reach the device

No behavior change. This decreases the number of explicit references
to the dev structure.


# c7054416 29-Jan-2021 ratchov <ratchov@openbsd.org>

Rename ctlslot->mask to ctlslot->self to match the rest of the code

No binary change.


# e5be4cb8 29-Jan-2021 ratchov <ratchov@openbsd.org>

Move the control client state out of the device structure

No behavior change. Later this will ease changing the controlled
device by "just" swapping pointers.


# 0600d38b 29-Jan-2021 ratchov <ratchov@openbsd.org>

Move the audio clients state out of the device structure

No behavior change. Later this will ease moving clients from one
device to another by "just" swapping pointers.


# dff6ad49 28-Jan-2021 ratchov <ratchov@openbsd.org>

Dont attempt to drain disconnected clients

Clients are always drained before they disconnect, so this change
affects programs that die unexpectedly or loose thier network
connection.

Besides the ba

Dont attempt to drain disconnected clients

Clients are always drained before they disconnect, so this change
affects programs that die unexpectedly or loose thier network
connection.

Besides the bad style, this change fixes a theoretical bug when the
disconnected client slot could be recycled and given to another client
while it's being drained

show more ...


# 72ca3e97 26-Apr-2020 ratchov <ratchov@openbsd.org>

Bypass authentication and create no session for root

ok deraadt


# 326545d4 25-Apr-2020 ratchov <ratchov@openbsd.org>

Get a reference to the device when "snd/N" MIDI ports are opened

As the master output level control is not in software any longer the
device needs to opened for adjustments to work.


# e575fbde 08-Mar-2020 ratchov <ratchov@openbsd.org>

Don't forget to notify clients when controls list is ready.

This is needed because when devices are swapped, clients need to know
when to rebuild their user interface.


# d07fece6 26-Feb-2020 ratchov <ratchov@openbsd.org>

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

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

show more ...


# 2988007f 12-Jul-2019 ratchov <ratchov@openbsd.org>

Add affinity between the program and its mixer control.

Currently, if there are two instances of the same program, sndiod will
allocate one volume control to each. If both programs disconnect and
re

Add affinity between the program and its mixer control.

Currently, if there are two instances of the same program, sndiod will
allocate one volume control to each. If both programs disconnect and
reconnect, the information of which control is assigned to which
program is lost. This makes difficult to run two instances of a player
and crossfade between each other with a MIDI controller.

To address this, the program chooses a 32-bit "id" (for now the
process pid) and sends it to the server. The server records the id in
the client's slot structure. When the server accepts a new
connection, it uses the id to identify the slot the client used during
the previous connection; if it was not recycled yet, it's assigned to
the program.

show more ...


# f933f6d7 29-Jun-2019 ratchov <ratchov@openbsd.org>

Check if syscalls return -1 instead of any negative or non-zero value.

ok deraadt


# edbb4404 26-Jun-2018 ratchov <ratchov@openbsd.org>

Move slot-related debug printfs from sock_hello() to slot_new().


# 23321a5c 26-Jun-2018 ratchov <ratchov@openbsd.org>

Convert all the slot_xxx() routines to use the number of channels
instead of the maximum channel number. This way the code is simpler.
No behaviour change.


# 3b704fe7 26-Jun-2018 ratchov <ratchov@openbsd.org>

Remove {mix,sub}.slot_cmin fields from the slot structure, as the same
information is already available in the opt structure.


# 521be3b0 26-Jun-2018 ratchov <ratchov@openbsd.org>

Remove dev_{cmin,cmax} from the slot structure as the same information
is available in the opt structure.


# 27eacac5 26-Jun-2018 ratchov <ratchov@openbsd.org>

Don't set slot's {slot,dev}_cmin parameters in slot_setpar() routine,
as their value doesn't change once the slot is initialized.


12