Up to [local] / src / usr.bin / sndiod
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.46 / (download) - annotate - [select for diffs], Fri May 24 15:16:09 2024 UTC (2 weeks, 2 days ago) by ratchov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.45: +6 -3 lines
Diff to previous 1.45 (colored) to selected 1.32 (colored)
sndiod: Propagate the controls' display string to clients. with help from edd@ and armani@
Revision 1.45 / (download) - annotate - [select for diffs], Sun May 19 00:05:43 2024 UTC (3 weeks, 1 day ago) by jsg
Branch: MAIN
Changes since 1.44: +1 -3 lines
Diff to previous 1.44 (colored) to selected 1.32 (colored)
remove prototypes with no matching function; ok ratchov@
Revision 1.44 / (download) - annotate - [select for diffs], Mon Apr 22 10:39:51 2024 UTC (6 weeks, 6 days ago) by ratchov
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored) to selected 1.32 (colored)
sndiod: Return the number of controls ctl_del() has deleted.
Revision 1.43 / (download) - annotate - [select for diffs], Mon Dec 26 19:16:03 2022 UTC (17 months, 2 weeks ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5,
OPENBSD_7_4_BASE,
OPENBSD_7_4,
OPENBSD_7_3_BASE,
OPENBSD_7_3
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored) to selected 1.32 (colored)
spelling fixes; from paul tagliamonte amendments to his diff are noted on tech
Revision 1.42 / (download) - annotate - [select for diffs], Fri Apr 29 09:12:57 2022 UTC (2 years, 1 month ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE,
OPENBSD_7_2
Changes since 1.41: +2 -1 lines
Diff to previous 1.41 (colored) to selected 1.32 (colored)
Wait until the buffer is drained before closing the device Fixes last few samples not being played when very large buffers are used.
Revision 1.41 / (download) - annotate - [select for diffs], Mon Nov 1 14:43:25 2021 UTC (2 years, 7 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE,
OPENBSD_7_1
Changes since 1.40: +23 -14 lines
Diff to previous 1.40 (colored) to selected 1.32 (colored)
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
Revision 1.40 / (download) - annotate - [select for diffs], Wed Mar 3 10:19:06 2021 UTC (3 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE,
OPENBSD_7_0,
OPENBSD_6_9_BASE,
OPENBSD_6_9
Changes since 1.39: +37 -31 lines
Diff to previous 1.39 (colored) to selected 1.32 (colored)
sndiod: Move MTC/MMC state to its own global structure
Revision 1.39 / (download) - annotate - [select for diffs], Wed Mar 3 10:13:06 2021 UTC (3 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.38: +9 -4 lines
Diff to previous 1.38 (colored) to selected 1.32 (colored)
sndiod: Move MIDI control endpoint to opt structure No behavior change.
Revision 1.38 / (download) - annotate - [select for diffs], Wed Mar 3 10:00:27 2021 UTC (3 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.37: +48 -20 lines
Diff to previous 1.37 (colored) to selected 1.32 (colored)
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.
Revision 1.37 / (download) - annotate - [select for diffs], Fri Jan 29 11:38:23 2021 UTC (3 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.36: +3 -4 lines
Diff to previous 1.36 (colored) to selected 1.32 (colored)
Make audio clients use struct opt to reach the device No behavior change. This decreases the number of explicit references to the dev structure
Revision 1.36 / (download) - annotate - [select for diffs], Fri Jan 29 11:36:44 2021 UTC (3 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored) to selected 1.32 (colored)
Make control clients use struct opt to reach the device No behavior change. This decreases the number of explicit references to the dev structure.
Revision 1.35 / (download) - annotate - [select for diffs], Fri Jan 29 11:31:28 2021 UTC (3 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored) to selected 1.32 (colored)
Rename ctlslot->mask to ctlslot->self to match the rest of the code No binary change.
Revision 1.34 / (download) - annotate - [select for diffs], Fri Jan 29 11:21:00 2021 UTC (3 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.33: +1 -14 lines
Diff to previous 1.33 (colored) to selected 1.32 (colored)
Move the options list out of the device structure No behavior change. Later this will ease applying the configuration of one device to another by "just" swapping pointers.
Revision 1.33 / (download) - annotate - [select for diffs], Fri Jan 29 10:55:19 2021 UTC (3 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.32: +7 -3 lines
Diff to previous 1.32 (colored)
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.
Revision 1.32 / (download) - annotate - [selected], Fri Jan 29 10:51:24 2021 UTC (3 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.31: +9 -8 lines
Diff to previous 1.31 (colored)
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.
Revision 1.31 / (download) - annotate - [select for diffs], Thu Jan 28 11:15:31 2021 UTC (3 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored) to selected 1.32 (colored)
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
Revision 1.30 / (download) - annotate - [select for diffs], Thu Jan 28 11:02:28 2021 UTC (3 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.29: +4 -1 lines
Diff to previous 1.29 (colored) to selected 1.32 (colored)
Drop unused dev_nctl() function and few unused prototypes
Revision 1.29 / (download) - annotate - [select for diffs], Sun Jun 28 05:21:39 2020 UTC (3 years, 11 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE,
OPENBSD_6_8
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored) to selected 1.32 (colored)
Allow switching between alternate devices (-F option) with sndioctl(1)
Revision 1.28 / (download) - annotate - [select for diffs], Sun Jun 28 05:17:26 2020 UTC (3 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.27: +2 -1 lines
Diff to previous 1.27 (colored) to selected 1.32 (colored)
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.
Revision 1.27 / (download) - annotate - [select for diffs], Thu Jun 18 05:11:13 2020 UTC (3 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.26: +8 -2 lines
Diff to previous 1.26 (colored) to selected 1.32 (colored)
Don't try to open device that's already open Save the current alternate device index and skip it in dev_reopen(). Handling alternate device indices this way will ease future development as well.
Revision 1.26 / (download) - annotate - [select for diffs], Fri Jun 12 15:40:18 2020 UTC (3 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored) to selected 1.32 (colored)
On error, drop clients and close the device only if it's still open Fixes crashes when USB devices are disconnected, caused by an attempt to close the already closed device: it was closed once when its ref counter drops to zero (after the last client is disconnected) and once with an explicit call to dev_close() on the error code-path.
Revision 1.25 / (download) - annotate - [select for diffs], Thu Apr 16 12:26:55 2020 UTC (4 years, 1 month ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE,
OPENBSD_6_7
Changes since 1.24: +4 -2 lines
Diff to previous 1.24 (colored) to selected 1.32 (colored)
If available, use hardware "output.level" for volume control. With this change, there's a single outputs.level control: either the hardware one or software one. Consequently, there can't be control name clashes and there's no need to move hardware's top-level controls into the "hw/" group.
Revision 1.24 / (download) - annotate - [select for diffs], Sun Mar 8 14:52:20 2020 UTC (4 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.23: +3 -1 lines
Diff to previous 1.23 (colored) to selected 1.32 (colored)
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.
Revision 1.23 / (download) - annotate - [select for diffs], Wed Feb 26 13:53:58 2020 UTC (4 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.22: +74 -2 lines
Diff to previous 1.22 (colored) to selected 1.32 (colored)
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
Revision 1.22 / (download) - annotate - [select for diffs], Sat Sep 21 04:42:46 2019 UTC (4 years, 8 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE,
OPENBSD_6_6
Changes since 1.21: +3 -2 lines
Diff to previous 1.21 (colored) to selected 1.32 (colored)
Allow switching between devices without disconnecting clients. The new -F option allows alternate device to be specified. If the device is disconnected, the one given with the last -f or -F options will be used instead. Similarly, the new -Q option allows an alternate MIDI port to be specified. ok mpi@
Revision 1.21 / (download) - annotate - [select for diffs], Fri Jul 12 06:30:55 2019 UTC (4 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored) to selected 1.32 (colored)
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.
Revision 1.20 / (download) - annotate - [select for diffs], Tue Jun 26 07:44:35 2018 UTC (5 years, 11 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE,
OPENBSD_6_5,
OPENBSD_6_4_BASE,
OPENBSD_6_4
Changes since 1.19: +1 -3 lines
Diff to previous 1.19 (colored) to selected 1.32 (colored)
Remove redundant slot->tstate variable. It was used to determine whether the slot obeys MMC and is ready to start. The stop->opt->mmc flag indicates if it obeys MMC and the slot->pstate == SLOT_READY indicates if it's ready. So slot->tstate can be safely removed.
Revision 1.19 / (download) - annotate - [select for diffs], Tue Jun 26 07:36:27 2018 UTC (5 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored) to selected 1.32 (colored)
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.
Revision 1.18 / (download) - annotate - [select for diffs], Tue Jun 26 07:31:29 2018 UTC (5 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored) to selected 1.32 (colored)
Remove {mix,sub}.slot_cmin fields from the slot structure, as the same information is already available in the opt structure.
Revision 1.17 / (download) - annotate - [select for diffs], Tue Jun 26 07:30:26 2018 UTC (5 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.16: +1 -3 lines
Diff to previous 1.16 (colored) to selected 1.32 (colored)
Remove dev_{cmin,cmax} from the slot structure as the same information is available in the opt structure.
Revision 1.16 / (download) - annotate - [select for diffs], Tue Jun 26 07:27:44 2018 UTC (5 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.15: +1 -2 lines
Diff to previous 1.15 (colored) to selected 1.32 (colored)
Remove slot->dup which is a copy of opt->dup, and just use the latter everywhere.
Revision 1.15 / (download) - annotate - [select for diffs], Tue Jun 26 07:22:55 2018 UTC (5 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.14: +1 -2 lines
Diff to previous 1.14 (colored) to selected 1.32 (colored)
Remove slot->maxweight, because it's a copy of opt->maxweight. Just use the latter everywhere.
Revision 1.14 / (download) - annotate - [select for diffs], Tue Jun 26 07:15:17 2018 UTC (5 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored) to selected 1.32 (colored)
Initialize slot with parameters from the opt struct.
Revision 1.13 / (download) - annotate - [select for diffs], Tue Jun 26 07:13:54 2018 UTC (5 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (colored) to selected 1.32 (colored)
Move opt pointer from the sock to the slot struct.
Revision 1.12 / (download) - annotate - [select for diffs], Tue Jun 26 07:12:35 2018 UTC (5 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.11: +14 -1 lines
Diff to previous 1.11 (colored) to selected 1.32 (colored)
Replace the gloal opt list with per-device lists.
Revision 1.11 / (download) - annotate - [select for diffs], Wed Mar 23 06:16:35 2016 UTC (8 years, 2 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE,
OPENBSD_6_3,
OPENBSD_6_2_BASE,
OPENBSD_6_2,
OPENBSD_6_1_BASE,
OPENBSD_6_1,
OPENBSD_6_0_BASE,
OPENBSD_6_0
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored) to selected 1.32 (colored)
Remove unused arguments of dev_adjpar(), getbasepath() and all slotops->onvol() implementations. From David CARLIER <devnexen at gmail.com>. Thanks.
Revision 1.10 / (download) - annotate - [select for diffs], Fri Jan 8 16:17:31 2016 UTC (8 years, 5 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE,
OPENBSD_5_9
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored) to selected 1.32 (colored)
Make code fit in 80 columns, remove trailing spaces & tabs.
Revision 1.9 / (download) - annotate - [select for diffs], Mon Feb 16 06:28:05 2015 UTC (9 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE,
OPENBSD_5_8,
OPENBSD_5_7_BASE,
OPENBSD_5_7
Changes since 1.8: +3 -1 lines
Diff to previous 1.8 (colored) to selected 1.32 (colored)
add missing protos, fix spacing
Revision 1.8 / (download) - annotate - [select for diffs], Mon Mar 17 17:16:06 2014 UTC (10 years, 2 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE,
OPENBSD_5_6
Changes since 1.7: +2 -1 lines
Diff to previous 1.7 (colored) to selected 1.32 (colored)
unbreak monitoring mode, which was shifted in time by 1 block
Revision 1.7 / (download) - annotate - [select for diffs], Fri Mar 7 10:23:05 2014 UTC (10 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored) to selected 1.32 (colored)
remove unused "delta" argument from onmove callbacks
Revision 1.6 / (download) - annotate - [select for diffs], Fri Mar 7 10:15:39 2014 UTC (10 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.5: +1 -4 lines
Diff to previous 1.5 (colored) to selected 1.32 (colored)
remove unused mmc start/stop/relocate call-backs as they don't make sense for clients and are handled through midi anyway
Revision 1.5 / (download) - annotate - [select for diffs], Wed Mar 5 20:31:22 2014 UTC (10 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.4: +8 -3 lines
Diff to previous 1.4 (colored) to selected 1.32 (colored)
- properly set initial position: fixes incorrect position reporting on busy machines configured to use tiny block sizes - run play and rec cycle in the same loop. No behavior change, but the code is much simpler this way.
Revision 1.4 / (download) - annotate - [select for diffs], Wed Mar 5 20:24:16 2014 UTC (10 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.3: +1 -2 lines
Diff to previous 1.3 (colored) to selected 1.32 (colored)
remove unused "autostart" feature
Revision 1.3 / (download) - annotate - [select for diffs], Sat Sep 28 18:49:32 2013 UTC (10 years, 8 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE,
OPENBSD_5_5
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored) to selected 1.32 (colored)
Fix condition to check if a midi port is referenced. Remove unused bits.
Revision 1.2 / (download) - annotate - [select for diffs], Fri Nov 30 20:38:24 2012 UTC (11 years, 6 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4,
OPENBSD_5_3_BASE,
OPENBSD_5_3
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored) to selected 1.32 (colored)
make DEV_xxx contiguous
Revision 1.1 / (download) - annotate - [select for diffs], Fri Nov 23 07:03:28 2012 UTC (11 years, 6 months ago) by ratchov
Branch: MAIN
Diff to selected 1.32 (colored)
Remplace aucat server by a new sndiod daemon aimed to be simpler smaller and faster than aucat. It's a drop in replacement with the following exceptions that don't affect the default setup: - The sample rate and the encoding are a per-device parameters thus -r and -e options must precede the corresponding -f option - MIDI thru boxes are dynamically created and no -M option is required anymore, so -M was removed. - MIDI ports are exposed with a new ``midi/N'' name, rather than abusing MIDI thru boxes. with help from armani@, ok deraadt@