OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.47 / (download) - annotate - [select for diffs], Mon Jan 9 17:13:46 2023 UTC (16 months, 1 week 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, HEAD
Changes since 1.46: +2 -4 lines
Diff to previous 1.46 (colored)

shorten SYNOPSIS from three versions to two (me) then one (ratchov),
plus all the cleanup that goes with;

ok ratchov

Revision 1.46 / (download) - annotate - [select for diffs], Sun Jan 8 08:27:17 2023 UTC (16 months, 1 week ago) by jmc
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

- tweak the text relating to -w
- sync usage() and SYNOPSIS

ok ratchov

Revision 1.45 / (download) - annotate - [select for diffs], Sun Jan 8 06:58:07 2023 UTC (16 months, 1 week ago) by ratchov
Branch: MAIN
Changes since 1.44: +41 -19 lines
Diff to previous 1.44 (colored)

Add -w option to display variables periodically

The purpose of -w is to monitor underruns without triggering long
kernel code-paths (ex. fork and exec of new audioctl process) that may
cause additional underruns than the ones being monitored.

ok chehola, edd

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

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

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jul 12 15:09:19 2021 UTC (2 years, 10 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

Change the error reporting pattern throughout the tree when unveil
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.

Work done and verified by Ashton Fagg <ashton@fagg.id.au>

ok deraadt@ semarie@ claudio@

Revision 1.42 / (download) - annotate - [select for diffs], Sun Feb 2 05:25:41 2020 UTC (4 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.41: +2 -6 lines
Diff to previous 1.41 (colored)

Drop 'mixer' variable whose value is not used.

It was introduced by mistake in r1.39.

Revision 1.41 / (download) - annotate - [select for diffs], Sun Feb 2 05:21:15 2020 UTC (4 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.40: +8 -8 lines
Diff to previous 1.40 (colored)

Rename {print,parse}_val() functions to {print,parse}_field()

No object change.

Revision 1.40 / (download) - annotate - [select for diffs], Sat Feb 1 18:07:49 2020 UTC (4 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.39: +5 -5 lines
Diff to previous 1.39 (colored)

Rename print_names flag to show_names.

Avoids confusion with print_xxx routines; no object change.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Feb 1 18:06:19 2020 UTC (4 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.38: +53 -38 lines
Diff to previous 1.38 (colored)

Move commands processing into it's own routine.

Makes the code more readable and easier to tweak; no bahavior change.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Jan 30 05:17:07 2020 UTC (4 years, 3 months ago) by ratchov
Branch: MAIN
Changes since 1.37: +3 -3 lines
Diff to previous 1.37 (colored)

Don't open the device for reading.

Revision 1.37 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:00 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.36: +8 -8 lines
Diff to previous 1.36 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Sep 17 14:14:39 2018 UTC (5 years, 8 months ago) by mestre
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.35: +6 -1 lines
Diff to previous 1.35 (colored)

unveil(2) "path" (/dev/audioctl0 by default, or changed via args) with rw
access and disable further calls to unveil(2) with unveil(NULL, NULL).

OK ratchov@

Revision 1.35 / (download) - annotate - [select for diffs], Wed May 31 04:18:58 2017 UTC (6 years, 11 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.34: +4 -2 lines
Diff to previous 1.34 (colored)

close fd on an exit path

Revision 1.34 / (download) - annotate - [select for diffs], Wed Aug 31 09:48:26 2016 UTC (7 years, 8 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

close an opened fd before returning from main
ok guenther@

Revision 1.33 / (download) - annotate - [select for diffs], Tue Jun 21 22:35:39 2016 UTC (7 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)

use the same argument name for -f in usage() as in SYNOPSIS;

Revision 1.32 / (download) - annotate - [select for diffs], Tue Jun 21 21:16:42 2016 UTC (7 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.31: +4 -1 lines
Diff to previous 1.31 (colored)

Make usage string match the man page.

suggested by jmc@

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jun 21 06:26:50 2016 UTC (7 years, 10 months ago) by ratchov
Branch: MAIN
Changes since 1.30: +221 -379 lines
Diff to previous 1.30 (colored)

Reimplement audioctl using new api in a simper way.

- group all encoding parameters in a signle string, ex.  "s16le",
  this way we use the same naming scheme as aucat, sndiod and many
  ports.
- remove "properties" as they are not used any longer
- remove the list of encodings as there's no benefit in having it.
  We don't have lists for other parameters (sample rates, channel
  numbers) either.
- add -q option, to look like sysctl
- remove unused -a option
- stop using symlinks in /dev, most other software doesn't use
  them.

ok semarie@

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jan 29 10:23:56 2016 UTC (8 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.29: +25 -21 lines
Diff to previous 1.29 (colored)

Display play and record parameters that are not independent
as a single variable (this corresponds to the way the audio
driver handles them). As we're at it, drop unused/duplicate
parameters.

ok mpi

Revision 1.29 / (download) - annotate - [select for diffs], Tue Jul 28 20:51:10 2015 UTC (8 years, 9 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.28: +11 -15 lines
Diff to previous 1.28 (colored)

Use new AUDIO_GETPOS ioctl() to ensure "bytes" and "errors" counters
are consistent.

Revision 1.28 / (download) - annotate - [select for diffs], Tue May 26 18:17:12 2015 UTC (8 years, 11 months ago) by ratchov
Branch: MAIN
Changes since 1.27: +9 -3 lines
Diff to previous 1.27 (colored)

Exposes number of bytes processed by the sound card (as returned
by AUDIO_GET{I,O}OFFS) instead of the number of bytes processed
minus the xruns (as returned by AUDIO_GETINFO).

ok armani

Revision 1.27 / (download) - annotate - [select for diffs], Sat May 16 12:51:24 2015 UTC (9 years ago) by ratchov
Branch: MAIN
Changes since 1.26: +1 -4 lines
Diff to previous 1.26 (colored)

Display simply "play" when play mode is set (furthermore, "playsync",
aka PLAY_ALL mode is not used anymore)

Revision 1.26 / (download) - annotate - [select for diffs], Sat May 16 12:48:50 2015 UTC (9 years ago) by ratchov
Branch: MAIN
Changes since 1.25: +1 -9 lines
Diff to previous 1.25 (colored)

remove reference to encodings the kernel doesn't expose anymore

Revision 1.25 / (download) - annotate - [select for diffs], Sun Feb 8 23:40:34 2015 UTC (9 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

in getopt() blocks, stop incrementing flag variable which are supposed
to just be 0/1
ok miod florian

Revision 1.24 / (download) - annotate - [select for diffs], Tue Sep 23 06:47:37 2014 UTC (9 years, 7 months ago) by ratchov
Branch: MAIN
Changes since 1.23: +1 -28 lines
Diff to previous 1.23 (colored)

Hide unused, duplicate and/or misleading fields.

ok armani, shadchin, kspillner

Revision 1.23 / (download) - annotate - [select for diffs], Wed Nov 13 18:50:05 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

handle missing proto

Revision 1.22 / (download) - annotate - [select for diffs], Fri Jul 27 00:21:17 2012 UTC (11 years, 9 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Fix initializer botch introduced in r1.20 when 'oldval' field was
added into middle of struct field (sic), without adding appropriate
initializer values. Move field to end of struct and let 0 be it's
value.

Spotted and diff from David Julio.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jul 15 03:43:12 2010 UTC (13 years, 10 months ago) by jakemsr
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.20: +7 -3 lines
Diff to previous 1.20 (colored)

add two new members to structs audio_encoding and audio_prinfo.
for both structs, the new members are 'bps' and 'msb', which
describe the number of bytes per sample and data alignment in the
sample, respectively.  drivers must properly set these fields in
the 'query_encoding', 'set_parameters' and 'get_default_params'
hardware interface methods.

discussed with ratchov, deraadt

Revision 1.20 / (download) - annotate - [select for diffs], Thu Nov 12 07:32:26 2009 UTC (14 years, 6 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.19: +49 -33 lines
Diff to previous 1.19 (colored)

When values are changed, log the change in the ``name: old -> new''
format, as mixerctl does. If -n is used log the new value only.
from Pawlowski Marcin Piotr <pmp.openbsd at gmail.com>, thanks.
ok jakemsr

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jun 26 05:42:20 2008 UTC (15 years, 10 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.18: +1 -8 lines
Diff to previous 1.18 (colored)

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.

OK deraadt@

Revision 1.18 / (download) - annotate - [select for diffs], Fri Apr 25 06:43:49 2008 UTC (16 years ago) by jakemsr
Branch: MAIN
Changes since 1.17: +7 -4 lines
Diff to previous 1.17 (colored)


display count of playback frame errors (underruns) in play.errors like we
do with record.errors for recording (overruns).

ok ratchov

Revision 1.17 / (download) - annotate - [select for diffs], Sat Mar 22 11:05:31 2008 UTC (16 years, 2 months ago) by ratchov
Branch: MAIN
Changes since 1.16: +3 -1 lines
Diff to previous 1.16 (colored)

add audio(4) driver the ability to use different block sizes for play and
record modes. This makes possible to have blocks of the same duration if the
play and record formats are different. The API change is backward
compatible, so it shouldn't be noticed by current audio ports.

ok jakemsr

Revision 1.16 / (download) - annotate - [select for diffs], Mon Nov 26 13:36:34 2007 UTC (16 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.15: +5 -2 lines
Diff to previous 1.15 (colored)

if no arguments given, assume a nice default; ok miod jakemsr deanna

Revision 1.15 / (download) - annotate - [select for diffs], Thu Sep 27 21:55:54 2007 UTC (16 years, 7 months ago) by sobrado
Branch: MAIN
Changes since 1.14: +12 -12 lines
Diff to previous 1.14 (colored)

style(9) fixes, optional flags without arguments come first;
while here, some spacing fixes

ok deanna@, jakemsr@

Revision 1.14 / (download) - annotate - [select for diffs], Mon Sep 17 13:46:11 2007 UTC (16 years, 8 months ago) by jakemsr
Branch: MAIN
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (colored)

implement the output_muted member of audio_info_t as found in original
Sun audio.

input from and ok ratchov

Revision 1.13 / (download) - annotate - [select for diffs], Mon Aug 6 19:16:06 2007 UTC (16 years, 9 months ago) by sobrado
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

the ellipsis is not an optional argument; while here, sync the usage
and synopsis of commands

lots of good ideas by jmc@

ok jmc@

Revision 1.12 / (download) - annotate - [select for diffs], Tue Mar 14 19:36:44 2006 UTC (18 years, 2 months ago) by moritz
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.11: +10 -10 lines
Diff to previous 1.11 (colored)

More use of const and fix a signed/unsigned comparison.
From David Hill. ok ray@ jaredy@

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jul 6 02:46:06 2004 UTC (19 years, 10 months ago) by vincent
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.10: +56 -57 lines
Diff to previous 1.10 (colored)

make -w optional to set options, so audioctl is consistent with
"new" sysctl/mixerctl

ok millert@, "go for it" deraadt@

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jun 21 01:39:07 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

()

Revision 1.9 / (download) - annotate - [select for diffs], Wed Apr 16 01:36:39 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.8: +11 -10 lines
Diff to previous 1.8 (colored)

kill += snprintf

Revision 1.8 / (download) - annotate - [select for diffs], Fri Dec 13 16:36:52 2002 UTC (21 years, 5 months ago) by naddy
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

audio_prinfo.seek is int now; document and sync
ok miod@ millert@

Revision 1.7 / (download) - annotate - [select for diffs], Tue Dec 10 09:03:37 2002 UTC (21 years, 5 months ago) by pvalchev
Branch: MAIN
Changes since 1.6: +35 -44 lines
Diff to previous 1.6 (colored)

ansi, KNF, other style(9) improvements and logic simplification; andrushock@korovino.net

Revision 1.6 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:44 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.5: +7 -7 lines
Diff to previous 1.5 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Nov 21 13:58:06 2000 UTC (23 years, 6 months ago) by aaron
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.4: +4 -4 lines
Diff to previous 1.4 (colored)

Sync usage() output and man page; mpech@prosoft.org.lv

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jul 15 22:10:47 1998 UTC (25 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.3: +3 -2 lines
Diff to previous 1.3 (colored)

fullduplex, and UINT

Revision 1.3 / (download) - annotate - [select for diffs], Thu Apr 30 13:46:18 1998 UTC (26 years ago) by provos
Branch: MAIN
Changes since 1.2: +8 -3 lines
Diff to previous 1.2 (colored)

From NetBSD: Lennart Augustsson
environment variable for default audioctl device

Revision 1.2 / (download) - annotate - [select for diffs], Sun Apr 26 22:27:25 1998 UTC (26 years ago) by provos
Branch: MAIN
Changes since 1.1: +1 -0 lines
Diff to previous 1.1 (colored)

$OpenBSD$

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Apr 26 21:44:40 1998 UTC (26 years ago) by provos
Branch: AUDIOCTL
CVS Tags: AUDIOCTL10
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

audioctl from NetBSD, mostly by Lennart Augustsson <augustss@cs.chalmers.se>

Revision 1.1 / (download) - annotate - [select for diffs], Sun Apr 26 21:44:40 1998 UTC (26 years ago) by provos
Branch: MAIN

Initial revision

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.