Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
AUDIOCTL(8)		FreeBSD	System Manager's Manual		   AUDIOCTL(8)

NAME
     audioctl -- get or	set audio driver variables

SYNOPSIS
     audioctl [-f file]
     audioctl [-n] [-f file] name ...
     audioctl [-nq] [-f	file] name=value ...

DESCRIPTION
     The audioctl utility retrieves or sets audio(4) driver variables.	The
     options are as follows:

     -f	file
	     Specifies the audio control device	or the audio device.  The de-
	     fault is /dev/audioctl0.

     -n	     Suppress printing of the variable name.

     -q	     Suppress all output when setting a	variable.

     name=value
	     Attempt to	set the	specified variable name	to value.

     If	the audio control device is used, then values are only stored in the
     audio(4) driver; they will	be submitted to	the hardware the next time the
     device is opened for playback or recording.  If the audio device is used
     instead of	the control device, then values	are negotiated with the	hard-
     ware immediately; this requires exclusive access to the device.  Vari-
     ables may only be changed if the device is	not opened for playback	or
     recording by another process.

     The following variable names are available:

	   Name		      Meaning
	   name		      device name, as shown by dmesg(8)
	   mode		      current device mode ( play, record, or both)
	   pause	      set if not attempting to start
	   active	      set if playing or	recording
	   nblks	      number of	blocks (in frames) in the play buffer
	   blksz	      number of	frames per block
	   rate		      sample rate in Hz
	   encoding	      current sample format
	   play.channels      number of	play channels
	   play.bytes	      bytes played since playback started
	   play.errors	      bytes inserted during underruns
	   record.channels    number of	recording channels
	   record.bytes	      bytes recorded since device started
	   record.errors      bytes dropped during overruns

     Encoding names use	the following scheme: signedness (s or u) followed by
     the precision in bits, the	byte-order (le or be), the number of bytes per
     sample, and the alignment (msb or lsb).  Only the signedness and the pre-
     cision are	mandatory.  Examples: u8, s16le, s24le3, s24le4lsb.

FILES
     /dev/audioctlN  audio control devices
     /dev/audioN     audio devices

EXAMPLES
     Display the number	of bytes of silence inserted during play buffer	under-
     runs since	device started:

	   # audioctl play.errors

     Use signed	24-bit samples and 44100Hz sample rate:

	   # audioctl -f /dev/audio0 encoding=s24 rate=44100

     Note the use of /dev/audio0 to force negotiation with the hardware.  If
     the above parameters are not supported by the hardware, then supported
     ones will be selected instead.

SEE ALSO
     aucat(1), cdio(1),	audio(4), mixerctl(8), sysctl(8)

HISTORY
     The audioctl command first	appeared in NetBSD 1.3.

FreeBSD	13.0			April 23, 2020			  FreeBSD 13.0

NAME | SYNOPSIS | DESCRIPTION | FILES | EXAMPLES | SEE ALSO | HISTORY

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=audioctl&sektion=8&manpath=OpenBSD+6.9>

home | help