Commit Graph

67 Commits

Author SHA1 Message Date
Alexandre Ratchov d1c4d40cb9 Sync to OpenBSD.
Mostly the new AUDIO{REC,PLAY}DEVICE envoronment variables
and many man-page improvements.
2020-11-29 13:04:18 +01:00
Alexandre Ratchov 62bc69d71c sndioctl: Flush stdout before polling
If stdout is not flushed, output is not seen by programs using
sndioctl through a pipe (ex. "sndioctl -m | cat" displays nothing).

Patch from Érico Nogueira <ericonr@disroot.org>, idea
from Duncan Overbruck <mail@duncano.de>
2020-09-07 07:14:39 +02:00
Alexandre Ratchov 97413ec614 sndioctl: Check control types and skip unknown ones 2020-06-28 07:52:52 +02:00
Alexandre Ratchov 7d0bfffd42 sndioctl: add "mute" example, from espie@ 2020-06-28 07:52:16 +02:00
Alexandre Ratchov 2494f95430 Allow control names to start with digits or underscores 2020-06-16 07:56:34 +02:00
Alexandre Ratchov 14b0682012 Add SIOCTL_SEL control type 2020-06-16 07:51:45 +02:00
Alexandre Ratchov 2c8bea3f08 sndioctl: Print lists as comma separated nodes 2020-05-05 06:43:52 +02:00
Alexandre Ratchov e2d1813cfa sndioctl: When -m is used, print only controls that changed 2020-05-05 06:36:48 +02:00
Alexandre Ratchov e4b2fc0b6e sndioctl: Use a dedicated routine to print single mixer entry 2020-05-05 06:33:25 +02:00
Alexandre Ratchov b3a1b52f6a sndioctl: factor code to print numbers 2020-05-05 06:22:30 +02:00
Alexandre Ratchov d785baf4f3 sndioctl: Display numbers with 3 decimal places, from schwarze@ 2020-04-30 16:23:02 +02:00
Alexandre Ratchov 5324c19a9c sndioctl.1 fixes, from schwarze@ 2020-04-30 16:22:51 +02:00
Alexandre Ratchov fcb50e68af man pages to cvs 2020-04-24 08:59:57 +02:00
Alexandre Ratchov a04ab3f18c sndioctl: Add -q option to suppress output when setting variables 2020-04-16 14:52:54 +02:00
Alexandre Ratchov 2254b715af sndioctl: Add -n option to suppress variable name in output 2020-04-16 14:51:20 +02:00
Alexandre Ratchov 420dd67129 Make parse_unit return signed int 2020-03-13 19:24:21 +01:00
Alexandre Ratchov 0009401f46 Sync sndioctl to cvs 2020-02-26 18:15:30 +01:00
Alexandre Ratchov c6c63cff50 Fix sndioctl SYNOPSYS and usage string. 2020-02-26 18:14:59 +01:00
Alexandre Ratchov 1d644ba2a8 Fix .Dt and Mdocdate in man pages 2020-02-26 18:13:17 +01:00
Alexandre Ratchov cc30ccae23 bump copyright year 2020-02-24 07:00:49 +01:00
Alexandre Ratchov c2226012ed Remove SIOCTL_DEVANY 2020-02-22 14:55:40 +01:00
Alexandre Ratchov e55971c61e Add "maxval" attribute to sioctl_desc structure.
As control may have different max values, make sndioctl
expose floats in the [0:1] range.
2020-02-22 14:52:20 +01:00
Alexandre Ratchov 2207b5e6db Represent sndioctl controls as floats in the [0:1] interval 2020-02-22 10:34:40 +01:00
Alexandre Ratchov 503acf3845 Clarify in parse_dec() comment that it for integers. 2020-02-21 12:17:15 +01:00
Alexandre Ratchov dace20874d Add max value to parse_dec() 2020-02-16 17:37:12 +01:00
Alexandre Ratchov 5c0d9010fb Better error message about out-of-range integer 2020-02-12 09:35:05 +01:00
Alexandre Ratchov cb1c15989c Properly handle '/' separator in sndioctl. 2020-02-10 15:04:43 +01:00
Alexandre Ratchov 97442bf983 Use "control" instead of "group" in error message. 2020-02-10 15:02:36 +01:00
Alexandre Ratchov ad896452d6 sndioctl(1) manual fixes from jmc@ 2020-02-09 15:15:11 +01:00
Alexandre Ratchov b431cc5fd0 Sync sndioctl.1 to reality.
We use channel numbers and not ranges, channels are between
square brakets. Controls have group names.
2020-02-09 12:03:03 +01:00
Alexandre Ratchov 92cc5b7bba Allow digits in control names 2020-02-05 17:28:15 +01:00
Alexandre Ratchov 0ac817ab82 Rename node->str to node->name3 2020-01-23 07:38:14 +01:00
Alexandre Ratchov f51534ae26 Rename sioctl_chan to sioctl_node 2020-01-23 07:16:27 +01:00
Alexandre Ratchov 95cf650953 Rename nextgrp -> nextfunc, tweak comments. 2020-01-17 07:12:52 +01:00
Alexandre Ratchov 36616e67a6 Remove unused selpos routine. 2020-01-17 07:02:45 +01:00
Alexandre Ratchov 9bf7d85e7f sndioctl: Use (mandatory) group prefix. 2020-01-17 06:57:37 +01:00
Alexandre Ratchov d8e69e7e93 Remove SIOCTL_HALF 2020-01-17 06:34:38 +01:00
Alexandre Ratchov 1534d4f816 s/SIOCTL_INTMAX/SIOCTL_VALMAX 2020-01-16 07:47:23 +01:00
Alexandre Ratchov 74ae9cda72 Make the control group a simple string.
To handle nested devices, just prefix the group with the "dev."
prefix. To avoid namespace conflicts, put program controls in a
new "app" group.

The "master.level" control is renamed to "output.level" to match the
hardware name. This way snd/0 and rsnd/0 end-up with the same control
name.
2020-01-13 09:27:06 +01:00
Alexandre Ratchov 166293b14a Require channel to be between square brackets. 2020-01-11 16:07:16 +01:00
Alexandre Ratchov d2057194b1 Rename _setctl -> _setval and _onctl -> _onval 2020-01-03 15:30:06 +01:00
Alexandre Ratchov 6e83bb6a4f Rename siomix -> sioctl, stop using "mixer" word. 2020-01-03 15:19:25 +01:00
Alexandre Ratchov efeed79b56 Don't try to add deleted controls (aka SIOMIX_NONE). 2019-08-30 16:45:19 +02:00
Alexandre Ratchov 7178903317 mixer: use (name, unit) couple for groups as well 2017-08-03 01:53:40 +02:00
Alexandre Ratchov 1129bb3390 fix trailing spaces in mixer-specific bits 2017-05-18 15:27:11 +02:00
Alexandre Ratchov 3ede574e2e store values in ints 2016-05-17 13:25:16 +02:00
Alexandre Ratchov 50e5b13815 rename namespace -> group (it's c++ keyword) 2016-05-15 14:45:32 +02:00
Alexandre Ratchov 5a63dff869 intruduce namespaces 2016-01-28 19:17:11 +01:00
Alexandre Ratchov 043bb0950a remove labels, use the stream name instead. Disallow digits in
stream names and use the "unit" integer instead.
2015-09-04 17:08:12 +02:00
Alexandre Ratchov eb8224b11c update labels dynamically 2015-08-26 12:49:39 +02:00