OpenBSD CVS

CVS log for src/usr.bin/sndioctl/sndioctl.c


[BACK] Up to [local] / src / usr.bin / sndioctl

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.20 / (download) - annotate - [select for diffs], Mon Apr 22 10:49:01 2024 UTC (3 weeks, 6 days ago) by ratchov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.19: +2 -7 lines
Diff to previous 1.19 (colored)

sndioctl: Remove assert about duplicate controls

On the sndiod(8) side device controls are not ordered. While switching
from one device to another, a new control (of the new device) may
appear before an old control with the same name is removed. As
discussed in sioctl_open(3), once the full description increment is
fetched (i.e. the call-back is invoked with NULL sioctl_desc
structure) the representation of the control set is consistent.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Jan 31 21:38:01 2023 UTC (15 months, 2 weeks ago) by ratchov
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.18: +3 -3 lines
Diff to previous 1.18 (colored)

Fix a typo in a comment and spacing

from weerd@

Revision 1.18 / (download) - annotate - [select for diffs], Mon Dec 26 19:16:03 2022 UTC (16 months, 3 weeks ago) by jmc
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

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

Revision 1.17 / (download) - annotate - [select for diffs], Sat Dec 25 16:25:07 2021 UTC (2 years, 4 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.16: +6 -1 lines
Diff to previous 1.16 (colored)

Don't accept an empty string as selector value

"looks good" edd@

Revision 1.16 / (download) - annotate - [select for diffs], Wed Mar 3 09:40:43 2021 UTC (3 years, 2 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.15: +2 -1 lines
Diff to previous 1.15 (colored)

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 Erico Nogueira <ericonr@disroot.org>, idea
from Duncan Overbruck <mail@duncano.de>

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jun 28 05:21:39 2020 UTC (3 years, 10 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.14: +0 -0 lines
Diff to previous 1.14 (colored)

Allow switching between alternate devices (-F option) with sndioctl(1)

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jun 28 05:17:26 2020 UTC (3 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.13: +42 -12 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Thu Jun 18 05:33:16 2020 UTC (3 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.12: +9 -2 lines
Diff to previous 1.12 (colored)

Check control types and skip unknown ones.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Jun 18 05:28:49 2020 UTC (3 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.11: +8 -12 lines
Diff to previous 1.11 (colored)

Allow names to start with digits or underscores

Revision 1.11 / (download) - annotate - [select for diffs], Mon May 25 09:14:50 2020 UTC (3 years, 11 months ago) by mestre
Branch: MAIN
Changes since 1.10: +8 -1 lines
Diff to previous 1.10 (colored)

For regular users sndioctl(1) can be restricted to pledge(2) "stdio", but since
it can also be run by root to access the raw devices directly for testing
purposes it also needs "audio" promise

hint from semarie@ ok ratchov@

Revision 1.10 / (download) - annotate - [select for diffs], Sun May 17 05:39:32 2020 UTC (4 years ago) by ratchov
Branch: MAIN
Changes since 1.9: +16 -7 lines
Diff to previous 1.9 (colored)

Print lists as comma-separated items

Revision 1.9 / (download) - annotate - [select for diffs], Sun May 17 05:37:49 2020 UTC (4 years ago) by ratchov
Branch: MAIN
Changes since 1.8: +6 -4 lines
Diff to previous 1.8 (colored)

When -m is used, don't print controls that didn't change

Revision 1.8 / (download) - annotate - [select for diffs], Sun May 17 05:35:57 2020 UTC (4 years ago) by ratchov
Branch: MAIN
Changes since 1.7: +43 -14 lines
Diff to previous 1.7 (colored)

When -m is used, always print one line per control

Revision 1.7 / (download) - annotate - [select for diffs], Sun May 17 05:32:01 2020 UTC (4 years ago) by ratchov
Branch: MAIN
Changes since 1.6: +19 -14 lines
Diff to previous 1.6 (colored)

Factor code to print numbers, no behavior change

Revision 1.6 / (download) - annotate - [select for diffs], Mon Apr 27 21:44:47 2020 UTC (4 years ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.5: +14 -3 lines
Diff to previous 1.5 (colored)

Display multi-state controls with exactly three decimal places.
Because for now, the maximum raw value of such controls is either
127 or 255, that assures that whenever the raw value changes, the
displayed value changes, too.  At the same time, it preserves the
property that control values are not shown with excessive, misleading
precision.
If controls will ever be introduced that will have maximum raw
values of less than 100 or of more than 999, the number of decimal
places should then be reduced or increased for such controls as
appropriate.
With important help and an OK from ratchov@.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Apr 16 12:57:14 2020 UTC (4 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

Make parse_unit return signed int

This allows using -1, meaning "no unit information".

Revision 1.4 / (download) - annotate - [select for diffs], Thu Apr 16 10:13:12 2020 UTC (4 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.3: +9 -5 lines
Diff to previous 1.3 (colored)

Add -q option to suppress output when setting variables, as does mixerctl

Revision 1.3 / (download) - annotate - [select for diffs], Thu Apr 16 09:07:24 2020 UTC (4 years, 1 month ago) by ratchov
Branch: MAIN
Changes since 1.2: +14 -9 lines
Diff to previous 1.2 (colored)

Add -n option to suppress variable name in output, similar to mixerctl

Revision 1.2 / (download) - annotate - [select for diffs], Wed Feb 26 14:47:48 2020 UTC (4 years, 2 months ago) by ratchov
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Sync usage string and SYNOPSYS to what the code does.

Suggested by jmc.

Revision 1.1 / (download) - annotate - [select for diffs], Wed Feb 26 13:58:48 2020 UTC (4 years, 2 months ago) by ratchov
Branch: MAIN

Add sndioctl utility to control audio parameters exposed by sndiod.

ok deraadt

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.